fix(build): restore snapshot publishing
This commit is contained in:
parent
5d88430a78
commit
c8a7fe89f1
|
@ -31,10 +31,14 @@ class TraceLogBuildExtensionImpl(
|
||||||
maven {
|
maven {
|
||||||
name = "Sonatype"
|
name = "Sonatype"
|
||||||
setUrl {
|
setUrl {
|
||||||
val repositoryId =
|
if (project.findProperty("VERSION_NAME").toString().endsWith("-SNAPSHOT")) {
|
||||||
System.getenv("SONATYPE_REPOSITORY_ID")
|
"https://oss.sonatype.org/content/repositories/snapshots/"
|
||||||
?: error("Missing env variable: SONATYPE_REPOSITORY_ID")
|
} else {
|
||||||
"https://oss.sonatype.org/service/local/staging/deployByRepositoryId/${repositoryId}/"
|
val repositoryId =
|
||||||
|
System.getenv("SONATYPE_REPOSITORY_ID")
|
||||||
|
?: error("Missing env variable: SONATYPE_REPOSITORY_ID")
|
||||||
|
"https://oss.sonatype.org/service/local/staging/deployByRepositoryId/${repositoryId}/"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
credentials {
|
credentials {
|
||||||
username = System.getenv("SONATYPE_USERNAME")
|
username = System.getenv("SONATYPE_USERNAME")
|
||||||
|
|
Loading…
Reference in New Issue