File tree Expand file tree Collapse file tree 3 files changed +14
-10
lines changed
Expand file tree Collapse file tree 3 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,20 @@ artifacts {
139139 archives javadocJar
140140}
141141
142+ import org.gradle.plugins.signing.Sign
143+ gradle. taskGraph. whenReady { taskGraph ->
144+ if (taskGraph. allTasks. any { it instanceof Sign }) {
145+ allprojects { ext. " signing.keyId" = System . getenv(' GPG_KEY_ID' ) }
146+ allprojects { ext. " signing.secretKeyRingFile" = System . getenv(' GPG_KEY_LOCATION' ) }
147+ allprojects { ext. " signing.password" = System . getenv(' GPG_PASSPHRASE' ) }
148+ }
149+ // Do not sign archives by default (a local build without gpg keyring should succeed)
150+ if (taskGraph. allTasks. any { it. name == ' build' || it. name == ' assemble' || it. name == ' publishToMavenLocal' }) {
151+ tasks. findAll { it. name == ' signArchives' || it. name == ' signDocsJar' || it. name == ' signTestJar' || it. name == ' signMavenJavaPublication' }. each { task ->
152+ task. enabled = false
153+ }
154+ }
155+ }
142156
143157publishing {
144158 publications {
@@ -187,14 +201,6 @@ publishing {
187201 }
188202}
189203
190- ext. isReleaseVersion = getProjectProperty(' TILEDB_JAVA_RELEASE' ). toBoolean()
191- tasks. withType(Sign ) {
192- onlyIf { isReleaseVersion }
193- allprojects { ext. " signing.keyId" = System . getenv(' GPG_KEY_ID' ) }
194- allprojects { ext. " signing.secretKeyRingFile" = System . getenv(' GPG_KEY_LOCATION' ) }
195- allprojects { ext. " signing.password" = System . getenv(' GPG_PASSPHRASE' ) }
196- }
197-
198204signing {
199205 sign publishing. publications. mavenJava
200206 sign configurations. archives
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ echo "${GPG_SECRET_KEYS_ENC}" | base64 --decode > ${ENCRYPTED_GPG_KEY_LOCATION}
66openssl aes-256-cbc -K $encrypted_a2869fb015d7_key -iv $encrypted_a2869fb015d7_iv -in $ENCRYPTED_GPG_KEY_LOCATION -out $GPG_KEY_LOCATION -d
77./gradlew properties -q | grep " version:" | awk ' {print $2}'
88export PROJECT_VERSION=$( ./gradlew properties -q | grep " version:" | awk ' {print $2}' )
9- export ORG_GRADLE_PROJECT_TILEDB_JAVA_RELEASE=true
109# Upload only snapshots to sonatype oss so it can make its way to maven central
1110./gradlew publishMavenJavaPublicationToMavenRepository
1211
Original file line number Diff line number Diff line change 1- TILEDB_JAVA_RELEASE =false
21TILEDB_GIT_REPOSITORY =https://github.com/TileDB-Inc/TileDB
32TILEDB_GIT_TAG =1.6.2
43TILEDB_VERBOSE =OFF
You can’t perform that action at this time.
0 commit comments