diff --git a/README.md b/README.md index 99ca370..b9b1b3d 100644 --- a/README.md +++ b/README.md @@ -89,4 +89,5 @@ See [node-mitmproxy](https://github.com/jvilk/mitmproxy-node/blob/master/README. ## Develop -Upload to Central Repository with command `./gradlew uploadArchives` \ No newline at end of file +Upload to Central Repository with command `./gradlew uploadArchives` +Set username and password in `build.gradle` file \ No newline at end of file diff --git a/build.gradle b/build.gradle index 623443b..6b779fb 100644 --- a/build.gradle +++ b/build.gradle @@ -46,9 +46,10 @@ artifacts { } signing { setRequired { - // signing is only required if the artifacts are to be published - sign configurations.archives + // condition for when signing is required + gradle.taskGraph.hasTask("uploadArchives") } + sign configurations.archives } @@ -62,10 +63,10 @@ uploadArchives { // Destination repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { - authentication(userName: hasProperty('ossrhUsername'), password: hasProperty('ossrhPassword')) + authentication(userName: 'username', password: 'password') } snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { - authentication(userName: hasProperty('ossrhUsername'), password: hasProperty('ossrhPassword')) + authentication(userName: 'username', password: 'password') } // Add required metadata to POM