|
1 | 1 | subprojects { |
2 | 2 | if (project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword')) { |
3 | | - plugins.withType(JavaLibraryPlugin) { |
4 | | - plugins.withType(MavenPublishPlugin) { |
5 | | - plugins.withType(SigningPlugin) { |
| 3 | + plugins.withType(MavenPublishPlugin) { |
| 4 | + plugins.withType(SigningPlugin) { |
6 | 5 |
|
7 | | - signing { |
8 | | - //requiring signature if there is a publish task that is not to MavenLocal |
9 | | - required { gradle.taskGraph.allTasks.any { it.name.toLowerCase().contains("publish") && !it.name.contains("MavenLocal") } } |
10 | | - def signingKey = project.findProperty("signingKey") |
11 | | - def signingPassword = project.findProperty("signingPassword") |
| 6 | + signing { |
| 7 | + //requiring signature if there is a publish task that is not to MavenLocal |
| 8 | + required { gradle.taskGraph.allTasks.any { it.name.toLowerCase().contains("publish") && !it.name.contains("MavenLocal") } } |
| 9 | + def signingKey = project.findProperty("signingKey") |
| 10 | + def signingPassword = project.findProperty("signingPassword") |
12 | 11 |
|
13 | | - useInMemoryPgpKeys(signingKey, signingPassword) |
| 12 | + useInMemoryPgpKeys(signingKey, signingPassword) |
14 | 13 |
|
15 | | - afterEvaluate { |
16 | | - sign publishing.publications.maven |
17 | | - } |
| 14 | + afterEvaluate { |
| 15 | + sign publishing.publications.maven |
18 | 16 | } |
| 17 | + } |
19 | 18 |
|
20 | | - publishing { |
21 | | - repositories { |
22 | | - maven { |
23 | | - name = "sonatype" |
24 | | - url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2" |
25 | | - credentials { |
26 | | - username project.findProperty("sonatypeUsername") |
27 | | - password project.findProperty("sonatypePassword") |
28 | | - } |
| 19 | + publishing { |
| 20 | + repositories { |
| 21 | + maven { |
| 22 | + name = "sonatype" |
| 23 | + url = "https://oss.sonatype.org/service/local/staging/deploy/maven2" |
| 24 | + credentials { |
| 25 | + username project.findProperty("sonatypeUsername") |
| 26 | + password project.findProperty("sonatypePassword") |
29 | 27 | } |
30 | 28 | } |
31 | 29 | } |
|
0 commit comments