File tree Expand file tree Collapse file tree 4 files changed +40
-26
lines changed Expand file tree Collapse file tree 4 files changed +40
-26
lines changed Original file line number Diff line number Diff line change @@ -10,5 +10,6 @@ dependencies {
10
10
implementation(project(" :basics" ))
11
11
implementation(project(" :jvm" ))
12
12
implementation(" dev.sigstore.build-logic:gradle-plugin" )
13
+ implementation(" dev.sigstore:sigstore-gradle-sign-plugin:0.5.0" )
13
14
implementation(" com.gradle.plugin-publish:com.gradle.plugin-publish.gradle.plugin:1.2.1" )
14
15
}
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ plugins {
3
3
id(" build-logic.java-library" )
4
4
id(" build-logic.reproducible-builds" )
5
5
id(" build-logic.publish-to-central" )
6
+ id(" build-logic.signing" )
6
7
}
7
8
8
9
java {
@@ -17,3 +18,5 @@ publishing {
17
18
}
18
19
}
19
20
}
21
+
22
+ signing.sign(publishing.publications[" mavenJava" ])
Original file line number Diff line number Diff line change
1
+ plugins {
2
+ id(" signing" )
3
+ id(" dev.sigstore.sign" )
4
+ }
5
+
6
+ signing {
7
+ val signingKey: String? by project
8
+ val signingPassword: String? by project
9
+ useInMemoryPgpKeys(signingKey, signingPassword)
10
+ }
11
+
12
+ tasks.withType<Sign >().configureEach {
13
+ onlyIf(" Is a release" ) {
14
+ project.hasProperty(" release" )
15
+ }
16
+ onlyIf(" Signing is not skipped" ) {
17
+ ! project.hasProperty(" skipSigning" )
18
+ }
19
+ onlyIf(" PGP Signing is not skipped" ) {
20
+ ! project.hasProperty(" skipPgpSigning" )
21
+ }
22
+ }
23
+
24
+ tasks.withType< dev.sigstore.sign.tasks.SigstoreSignFilesTask > ().configureEach {
25
+ onlyIf(" Is a release" ) {
26
+ project.hasProperty(" release" )
27
+ }
28
+ onlyIf(" Signing is not skipped" ) {
29
+ ! project.hasProperty(" skipSigning" )
30
+ }
31
+ onlyIf(" Sigstore Signing is not skipped" ) {
32
+ ! project.hasProperty(" skipSigstoreSigning" )
33
+ }
34
+ }
Original file line number Diff line number Diff line change 1
1
plugins {
2
2
id(" build-logic.root-build" )
3
- // It does not support participating in precompiled script plugins
4
- id(" com.github.vlsi.stage-vote-release" ) version " 1.90"
5
3
// The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build.
6
4
`embedded- kotlin` apply false
7
5
}
8
6
9
- version = " ${findProperty(" version" )}${releaseParams.snapshotSuffix} "
10
-
11
- println (" Building Sigstore Java $version " )
12
-
13
- releaseParams {
14
- tlp.set(" sigstore-java" )
15
- organizationName.set(" sigstore" )
16
- componentName.set(" sigstore-java" )
17
- prefixForProperties.set(" s01" )
18
- svnDistEnabled.set(false )
19
- sitePreviewEnabled.set(false )
20
- nexus {
21
- prodUrl.set(uri(" https://s01.oss.sonatype.org" ))
22
- }
23
- voteText.set {
24
- """
25
- ${it.componentName} v${it.version} -rc${it.rc} is ready for preview.
26
-
27
- Git SHA: ${it.gitSha}
28
- Staging repository: ${it.nexusRepositoryUri}
29
- """ .trimIndent()
30
- }
31
- }
7
+ val calculatedVersion = property(" version" ) as String + (if (hasProperty(" release" )) " " else " -SNAPSHOT" )
32
8
33
9
allprojects {
34
- version = rootProject.version
10
+ version = calculatedVersion
35
11
}
You can’t perform that action at this time.
0 commit comments