Skip to content

Commit

Permalink
Prepare release 0.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Chermenin committed Feb 8, 2022
1 parent 48633d5 commit f4a977e
Showing 1 changed file with 3 additions and 60 deletions.
63 changes: 3 additions & 60 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ plugins {
}

group = "ru.chermenin"
version = "0.3.0-SNAPSHOT"
version = "0.2.2"

repositories {
mavenCentral()
}

dependencies {
implementation(kotlin("stdlib"))
implementation("com.github.ua-parser:uap-java:1.5.0")
implementation("com.github.ua-parser:uap-java:1.5.2")

// Test dependencies
testImplementation("org.jetbrains.kotlin:kotlin-test")
Expand All @@ -41,68 +41,11 @@ tasks {
}
}

val nexusUsername: String? by project
val nexusPassword: String? by project

tasks.named<Upload>("uploadArchives") {
repositories {
withConvention(MavenRepositoryHandlerConvention::class) {
mavenDeployer {
beforeDeployment { signing.signPom(this) }
}
}
withGroovyBuilder {
"mavenDeployer" {
"repository"("url" to "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
"authentication"("userName" to nexusUsername, "password" to nexusPassword)
}
"snapshotRepository"("url" to "https://oss.sonatype.org/content/repositories/snapshots/") {
"authentication"("userName" to nexusUsername, "password" to nexusPassword)
}
"pom" {
"project" {
setProperty("name", "Kotlin User Agents")
setProperty("packaging", "jar")
setProperty(
"description",
"A library to identify device, browser and some additional information from user agent strings."
)
setProperty("url", "https://code.chermenin.ru/kotlin-user-agents/")
"scm" {
setProperty("connection", "scm:")
setProperty("developerConnection", "scm:")
setProperty("url", "")
}
"developers" {
"developer" {
setProperty("id", "chermenin")
setProperty("name", "Alex Chermenin")
setProperty("email", "[email protected]")
}
}
"licenses" {
"license" {
setProperty("name", "MIT")
setProperty("url", "https://github.com/chermenin/kotlin-user-agents/blob/master/LICENSE")
setProperty("distribution", "repo")
}
}
}
}
}
}
}
}

signing {
sign(configurations.archives.get())
}

publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/OWNER/REPOSITORY")
url = uri("https://maven.pkg.github.com/chermenin/kotlin-user-agents")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN")
Expand Down

0 comments on commit f4a977e

Please sign in to comment.