Skip to content

Commit

Permalink
Update protobuf
Browse files Browse the repository at this point in the history
  • Loading branch information
hayarobi committed Dec 27, 2023
1 parent a4aa9b9 commit cddac31
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 23 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name: Java CI with Gradle
on:
workflow_dispatch:
push:
branches: [ "master", "develop"]
branches: [ "master", "develop", "feature/update_protobuf"]

permissions:
contents: read
Expand All @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: 'recursive'

Expand All @@ -31,7 +31,7 @@ jobs:
distribution: 'temurin'

- name: Build with Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
uses: gradle/gradle-build-action@v2
with:
arguments: build allcoverage

Expand All @@ -40,6 +40,7 @@ jobs:
- name: Unit Tests with publishing code coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{github.workspace}}/build/reports/jacoco/report.xml # optional
flags: unittests # optional
name: codecov-umbrella # optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ jacocoTestReport {
reports {
xml.required = true
html.required = true
csv.enabled = false
}
}

Expand Down
20 changes: 4 additions & 16 deletions core/protobuf/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,18 @@ plugins {
dependencies {
implementation ("io.grpc:grpc-protobuf:${grpcVersion}")
implementation ("io.grpc:grpc-stub:${grpcVersion}")
implementation ("com.google.protobuf:protobuf-java:${protocVersion}")
runtimeOnly "io.grpc:grpc-netty-shaded:${grpcVersion}"

if (JavaVersion.current().isJava9Compatible()) {
// Workaround for @javax.annotation.Generated
// see: https://github.com/grpc/grpc-java/issues/3633
implementation "javax.annotation:javax.annotation-api:${javaxAnnotationApiVersion}"
// see: https://github.com/grpc/grpc-java/issues/3633 and https://github.com/grpc/grpc-java
compileOnly 'org.apache.tomcat:annotations-api:6.0.53' // necessary for Java 9+
}
}

protobuf {
protoc {
// // for apple m1, please add protoc_platform=osx-x86_64 in $HOME/.gradle/gradle.properties
// if (project.hasProperty('protoc_platform')) {
// artifact = "com.google.protobuf:protoc:${protocVersion}:${protoc_platform}"
// } else {
// artifact = "com.google.protobuf:protoc:${protocVersion}"
// }
artifact = "com.google.protobuf:protoc:${protocVersion}"
}
plugins {
Expand All @@ -43,14 +39,6 @@ protobuf {
}
}

sourceSets {
main {
java {
srcDirs "${projectDir}/build/generated/source/proto/main/java"
}
}
}

// FIXME: custom disable options, it don't like it

tasks.withType(Javadoc).all { enabled = false }
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jmhReportVersion=0.8.0
shadowJarVersion=7.1.2

# protobuf
protobufVersion=0.8.18
protobufVersion=0.9.4
# newer version of protoc is not compatible for current heraj.
protocVersion=3.17.3
protocVersion=3.25.1

# javax
javaxAnnotationApiVersion=1.3.1
Expand All @@ -25,7 +25,7 @@ javaxAnnotationApiVersion=1.3.1
bouncyCastleVersion=1.66

# grpc
grpcVersion=1.43.2
grpcVersion=1.60.1

# utils
jacksonVersion=2.6.7
Expand Down

0 comments on commit cddac31

Please sign in to comment.