Skip to content

Commit

Permalink
Update shared.conventions.gradle.kts
Browse files Browse the repository at this point in the history
  • Loading branch information
dhyces committed May 24, 2024
1 parent 2eb8999 commit 1c95b83
Showing 1 changed file with 23 additions and 19 deletions.
42 changes: 23 additions & 19 deletions buildSrc/src/main/kotlin/shared.conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -80,28 +80,32 @@ tasks.withType<JavaCompile>().configureEach {
// enabled = false
//}

publishing {
repositories {
maven {
name = "Local"
url = uri("file://" + findProperty("local_maven"))
}
if (hasProperty("mavenUrl")) {
if (hasProperty("publisher")) {
publishing {
repositories {
maven {
name = "Maven"
url = findProperty("mavenUrl")?.let { uri(it) }!!
credentials(PasswordCredentials::class) {
username = findProperty("mavenUsername")?.toString()
password = findProperty("mavenPassword")?.toString()
name = "Local"
url = uri("file://" + findProperty("local_maven"))
}
if (hasProperty("mavenUrl")) {
maven {
name = "Maven"
url = findProperty("mavenUrl")?.let { uri(it) }!!
credentials(PasswordCredentials::class) {
username = findProperty("mavenUsername")?.toString()
password = findProperty("mavenPassword")?.toString()
}
}
}
}
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/dhyces/trimmed")
credentials {
username = (project.findProperty("gpr.user") ?: System.getenv("USERNAME")) as String
password = (project.findProperty("gpr.key") ?: System.getenv("TOKEN")) as String
if (hasProperty("trimmedGithubPackages")) {
maven {
name = "GitHubPackages"
url = uri(findProperty("trimmedGithubPackages")?.let { uri(it) }!!)
credentials {
username = (project.findProperty("gpr.user") ?: System.getenv("USERNAME")) as String
password = (project.findProperty("gpr.key") ?: System.getenv("TOKEN")) as String
}
}
}
}
}
Expand Down

0 comments on commit 1c95b83

Please sign in to comment.