Skip to content

Commit 2e17f54

Browse files
committed
Try to configure gralde release and publish #6
1 parent 7edc4ad commit 2e17f54

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ nexusPublishing {
1212
sonatype {
1313
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
1414
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
15-
// System.getenv("ORG_GRADLE_PROJECT_sonatypeUsername")?.let { username.set(it) }
16-
// System.getenv("ORG_GRADLE_PROJECT_sonatypePassword")?.let { password.set(it) }
1715
}
1816
}
1917
}

buildSrc/src/main/kotlin/publishing-conventions.gradle.kts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,10 @@ publishing {
4343
}
4444
}
4545

46-
//signing {
47-
// setRequired { !project.version.toString().endsWith("-SNAPSHOT") && !project.hasProperty("skipSigning") }
48-
// if (project.hasProperty("signingKey")) {
49-
// useInMemoryPgpKeys(properties["signingKey"].toString(), properties["signingPassword"].toString())
50-
// } else {
51-
// useGpgCmd()
52-
// }
53-
// sign(publishing.publications["mavenJava"])
54-
//}
46+
signing {
47+
setRequired { !project.version.toString().endsWith("-SNAPSHOT") && !project.hasProperty("skipSigning") }
48+
val signingKey: String? by project
49+
val signingPassword: String? by project
50+
useInMemoryPgpKeys(signingKey, signingPassword)
51+
sign(publishing.publications["maven"])
52+
}

0 commit comments

Comments
 (0)