Skip to content

Commit

Permalink
simplify publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonahss committed Sep 22, 2023
1 parent e4fa7fd commit 01aae08
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Upload to Central Repository with command `./gradlew uploadArchives`
Set username and password in `build.gradle` file
9 changes: 5 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}


Expand All @@ -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
Expand Down

0 comments on commit 01aae08

Please sign in to comment.