-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alexander Chermenin
committed
Feb 8, 2022
1 parent
48633d5
commit f4a977e
Showing
1 changed file
with
3 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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") | ||
|
@@ -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") | ||
|