From a26b29b29b2250aad9c69f0b86eccd167f66b836 Mon Sep 17 00:00:00 2001 From: Appu Goundan Date: Fri, 5 Apr 2024 12:01:28 -0400 Subject: [PATCH] Generate java client for proto at build Stop using pre-generated protobuf client libraries, just use the proto files directly when generating clients. This allows us to update proto-gen versions without worrying about conflicts. Signed-off-by: Appu Goundan --- .github/workflows/cifuzz.yaml | 7 +++++-- sigstore-java/build.gradle.kts | 14 ++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cifuzz.yaml b/.github/workflows/cifuzz.yaml index 2a6f4eda0..7c4a02aef 100644 --- a/.github/workflows/cifuzz.yaml +++ b/.github/workflows/cifuzz.yaml @@ -20,7 +20,10 @@ jobs: language: jvm - name: Upload Crash uses: actions/upload-artifact@v4 - if: failure() && steps.build.outcome == 'success' + if: failure() # && steps.build.outcome == 'success' with: name: artifacts - path: ./out/artifacts + path: | + ./out/artifacts + ./**/crash-* + ./**/Crash_* diff --git a/sigstore-java/build.gradle.kts b/sigstore-java/build.gradle.kts index 452e59fc5..a8df76cbd 100644 --- a/sigstore-java/build.gradle.kts +++ b/sigstore-java/build.gradle.kts @@ -20,13 +20,11 @@ dependencies { implementation("io.github.erdtman:java-json-canonicalization:1.1") - implementation("dev.sigstore:protobuf-specs:0.3.0") { - because("It generates Sigstore Bundle file") - } - implementation(platform("com.google.protobuf:protobuf-bom:3.25.3")) - implementation("com.google.protobuf:protobuf-java-util") { - because("It converts protobuf to json") - } + protobuf("dev.sigstore:protobuf-specs:0.3.0") + protobuf("com.google.api.grpc:proto-google-common-protos:2.37.1") + + implementation(platform("com.google.protobuf:protobuf-bom:4.26.1")) + implementation("com.google.protobuf:protobuf-java-util") // grpc deps implementation(platform("io.grpc:grpc-bom:1.62.2")) @@ -64,7 +62,7 @@ dependencies { protobuf { protoc { - artifact = "com.google.protobuf:protoc:3.25.3" + artifact = "com.google.protobuf:protoc:4.26.1" } plugins { id("grpc") {