Skip to content

Commit

Permalink
Fix property (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
nokok authored Jun 13, 2020
1 parent 973b236 commit b7a8f60
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@

# Ignore Gradle build output directory
build
gradle.properties
16 changes: 10 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ repositories {
mavenLocal()
mavenCentral()
}

java {
withJavadocJar()
withSourcesJar()
Expand All @@ -38,6 +39,13 @@ signing {
sign publishing.publications
}

if(!hasProperty('nexusUsername')) {
ext.nexusUsername = "dummy"
}
if(!hasProperty('nexusPassword')) {
ext.nexusPassword = "dummy"
}


publishing {
publications {
Expand Down Expand Up @@ -75,12 +83,8 @@ publishing {
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
if(hasProperty('nexusUserName')) {
username = "${nexusUsername}"
}
if(hasProperty('nexusPassword')) {
password = "${nexusPassword}"
}
username = "${nexusUsername}"
password = "${nexusPassword}"
}
}
}
Expand Down

0 comments on commit b7a8f60

Please sign in to comment.