-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
18 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ plugins { | |
`java-library` | ||
`maven-publish` | ||
signing | ||
id("io.github.gradle-nexus.publish-plugin") version "1.1.0" | ||
} | ||
|
||
group = "com.target" | ||
|
@@ -40,6 +41,7 @@ tasks { | |
} | ||
} | ||
|
||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
|
@@ -80,14 +82,9 @@ publishing { | |
} | ||
developers { | ||
developer { | ||
id.set("chad-moller-target") | ||
name.set("Chad Moller") | ||
email.set("[email protected]") | ||
} | ||
developer { | ||
id.set("dtanner") | ||
name.set("Dan Tanner") | ||
email.set("[email protected]") | ||
id.set("ossteam") | ||
name.set("OSS Office") | ||
email.set("[email protected]") | ||
} | ||
} | ||
scm { | ||
|
@@ -103,10 +100,18 @@ signing { | |
val signingKey: String? by project | ||
val signingPassword: String? by project | ||
if (signingKey.isNullOrBlank() || signingPassword.isNullOrBlank()) { | ||
println("signing key or password is missing. Will disable signing. If you are publishing to sonatype, " + | ||
"export ORG_GRADLE_PROJECT_signingKey and ORG_GRADLE_PROJECT_signingPassword.") | ||
isRequired = false | ||
} else { | ||
useInMemoryPgpKeys(signingKey, signingPassword) | ||
sign(publishing.publications) | ||
} | ||
} | ||
|
||
nexusPublishing { | ||
repositories { | ||
sonatype { | ||
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) | ||
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) | ||
} | ||
} | ||
useInMemoryPgpKeys(signingKey, signingPassword) | ||
sign(publishing.publications) | ||
} |