File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -80,10 +80,12 @@ def pomConfigurationFor(String pomName, String pomDescription) {
80
80
}
81
81
}
82
82
83
+ def publishToOssrh = project. hasProperty(' ossrhUsername' ) && project. hasProperty(' ossrhPassword' )
84
+
83
85
publishing {
84
86
publications {
85
87
def hamcrestProject = project(' :hamcrest' )
86
- hamcrestCore (MavenPublication ) {
88
+ hamcrest (MavenPublication ) {
87
89
from hamcrestProject. components. java
88
90
artifactId hamcrestProject. name
89
91
artifact hamcrestProject. sourcesJar
@@ -94,7 +96,7 @@ publishing {
94
96
}
95
97
}
96
98
repositories {
97
- if (hasProperty( ' ossrhUsername ' ) && hasProperty( ' ossrhPassword ' ) ) {
99
+ if (publishToOssrh ) {
98
100
maven {
99
101
def snapshotRepoUrl = " https://oss.sonatype.org/content/repositories/snapshots/"
100
102
def stagingRepoUrl = " https://oss.sonatype.org/service/local/staging/deploy/maven2/"
@@ -109,6 +111,6 @@ publishing {
109
111
}
110
112
111
113
signing {
112
- required { hasProperty( ' ossrhUsername ' ) && hasProperty( ' ossrhPassword ' ) }
113
- sign publishing. publications. hamcrestCore
114
+ required { publishToOssrh }
115
+ sign publishing. publications. hamcrest
114
116
}
You can’t perform that action at this time.
0 commit comments