From b7a8f604858677713242acbf38c8b29f050e06b3 Mon Sep 17 00:00:00 2001 From: Noriyuki Kazusawa Date: Sun, 14 Jun 2020 03:28:04 +0900 Subject: [PATCH] Fix property (#7) --- .gitignore | 1 - build.gradle | 16 ++++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 4e709e2..1b6985c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,3 @@ # Ignore Gradle build output directory build -gradle.properties diff --git a/build.gradle b/build.gradle index 3667a95..5027e2c 100644 --- a/build.gradle +++ b/build.gradle @@ -13,6 +13,7 @@ repositories { mavenLocal() mavenCentral() } + java { withJavadocJar() withSourcesJar() @@ -38,6 +39,13 @@ signing { sign publishing.publications } +if(!hasProperty('nexusUsername')) { + ext.nexusUsername = "dummy" +} +if(!hasProperty('nexusPassword')) { + ext.nexusPassword = "dummy" +} + publishing { publications { @@ -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}" } } }