Skip to content

Commit

Permalink
Generate java client for proto at build
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
loosebazooka committed Apr 6, 2024
1 parent 1a175b4 commit 38b27b2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/cifuzz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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_*
1 change: 1 addition & 0 deletions fuzzing/oss_fuzz_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ LD_LIBRARY_PATH=\"$JVM_LD_LIBRARY_PATH\":\$this_dir \
--cp=$RUNTIME_CLASSPATH \
--target_class=$fuzzer_target \
--jvm_args=\"\$mem_settings\" \
--instrumentation_excludes=com.google.protobuf.** \
\$@" > $OUT/$fuzzer_basename
chmod u+x $OUT/$fuzzer_basename
done
14 changes: 6 additions & 8 deletions sigstore-java/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down Expand Up @@ -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") {
Expand Down

0 comments on commit 38b27b2

Please sign in to comment.