File tree Expand file tree Collapse file tree 1 file changed +9
-16
lines changed Expand file tree Collapse file tree 1 file changed +9
-16
lines changed Original file line number Diff line number Diff line change 1
1
plugins {
2
2
`kotlin- dsl`
3
+ `java- gradle- plugin`
3
4
`maven- publish`
4
5
signing
5
6
id(" io.github.gradle-nexus.publish-plugin" ) version " 2.0.0"
@@ -93,29 +94,21 @@ publishing {
93
94
}
94
95
}
95
96
96
- // Fix the groupId for plugin marker publications after they're created
97
- afterEvaluate {
98
- publishing {
99
- publications {
100
- withType<MavenPublication > {
101
- if (name.endsWith(" PluginMarkerMaven" )) {
102
- groupId = " io.github.lsd-consulting"
103
- }
104
- }
105
- }
106
- }
107
- }
108
97
109
98
signing {
110
- if (project.findProperty(" signingKey" ) != null ) {
99
+ val signingKey: String? = findProperty(" signingKey" ) as String?
100
+ val signingPassword: String? = findProperty(" signingPassword" ) as String?
101
+ val signingKeyId: String? = findProperty(" signing.keyId" ) as String?
102
+
103
+ if (signingKey != null && signingPassword != null ) {
111
104
// Use in-memory ascii-armored keys
112
- val signingKey: String? = findProperty(" signingKey" ) as String?
113
- val signingPassword: String? = findProperty(" signingPassword" ) as String?
114
105
useInMemoryPgpKeys(signingKey, signingPassword)
115
106
sign(publishing.publications)
116
- } else {
107
+ } else if (signingKeyId != null && findProperty( " signing.password " ) != null ) {
117
108
// Use signing properties in ~/.gradle/gradle.properties
118
109
sign(publishing.publications)
110
+ } else {
111
+ logger.lifecycle(" Signing disabled - no valid signing configuration found" )
119
112
}
120
113
}
121
114
You can’t perform that action at this time.
0 commit comments