File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Use `sdk env` (or enable sdkman_auto_env) to switch to this JDK.
2+ # Gradle must be launched with Java 21 (see settings.gradle.kts).
3+ java=21.0.8-tem
Original file line number Diff line number Diff line change @@ -119,6 +119,35 @@ Sigstore Java and Sigstore Maven Plugin are signed with both PGP and sigstore.
119119| ------------- | --------- | ------ |
120120| 1.0.0 - 2.X.X | https://token.actions.githubusercontent.com | https://github.com/sigstore/sigstore-java/.github/workflows/release-sigstore-java-from-tag.yaml@refs/tags/X.X.X |
121121
122+ ## Building locally
123+
124+ Gradle must be ** launched** with Java 21, even though the library targets Java 11
125+ (see ` settings.gradle.kts ` ). Using Java 25+ breaks the Spotless formatter.
126+
127+ If you use [ sdkman] ( https://sdkman.io ) , run ` sdk env ` to pick up the pinned JDK from
128+ ` .sdkmanrc ` . Otherwise point ` JAVA_HOME ` at any Java 21 install.
129+
130+ Some tests start a local [ fulcio] ( https://github.com/sigstore/fulcio ) server, so
131+ install it and make sure it is on your ` PATH ` :
132+ ```
133+ go install github.com/sigstore/fulcio@main # installs to $(go env GOPATH)/bin
134+ ```
135+
136+ Then build:
137+ ```
138+ ./gradlew build
139+ ```
140+
141+ ### Gotchas
142+ - ` Could not find org.gradle.kotlin.kotlin-dsl... ` : a Gradle init script (e.g.
143+ ` ~/.gradle/init.d/*.gradle ` ) is overriding repositories and hiding the plugin
144+ portal. Remove or scope it.
145+ - Spotless reports ` NoSuchMethodError ... getDiagnostics() ` : you launched Gradle
146+ with Java 25+. Switch to Java 21, then ` ./gradlew --stop && ./gradlew clean build `
147+ to clear the cached lint failures.
148+ - ` Cannot run program "fulcio" ` : the fulcio binary is missing from your ` PATH `
149+ (see above).
150+
122151## Troubleshooting
123152
124153To ensure maximum compatibility with the public Sigstore infrastructure,
You can’t perform that action at this time.
0 commit comments