Skip to content

Commit

Permalink
Changed property names to ENVs
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippSchmelter committed Dec 6, 2024
1 parent a5889ff commit 768015a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gradle/scripts/mavenCentralPublish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
}

if (project.hasProperty('user') && project.hasProperty('password') && project.hasProperty('deployVersion')) {
if (project.hasProperty('MAVENCENTRAL_USER') && project.hasProperty('MAVENCENTRAL_PASS') && project.hasProperty('deployVersion')) {

// snapshot version differs from normal version
String versionString = project.getProperty('deployVersion')
Expand Down Expand Up @@ -75,16 +75,16 @@ if (project.hasProperty('user') && project.hasProperty('password') && project.ha
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = versionString.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username project.getProperty('user')
password project.getProperty('password')
username project.getProperty('MAVENCENTRAL_USER')
password project.getProperty('MAVENCENTRAL_PASS')
}
}
}
signing {
useInMemoryPgpKeys(
getProperty('signing.keyId'),
getProperty('signing.secretKey'),
getProperty('signing.password')
findProperty('MAVENCENTRAL_SIGNINGKEY'),
findProperty('MAVENCENTRAL_SIGNINGKEYID'),
findProperty('MAVENCENTRAL_SIGNINGPASSWORD')
)
sign publishing.publications.mavenJava
}
Expand Down

0 comments on commit 768015a

Please sign in to comment.