diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index c05949c8..06d2f806 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -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 @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: 'recursive' @@ -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 @@ -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 diff --git a/buildSrc/src/main/groovy/io.aergo.heraj.java-library-conventions.gradle b/buildSrc/src/main/groovy/io.aergo.heraj.java-library-conventions.gradle index 681714b1..5339a4a5 100644 --- a/buildSrc/src/main/groovy/io.aergo.heraj.java-library-conventions.gradle +++ b/buildSrc/src/main/groovy/io.aergo.heraj.java-library-conventions.gradle @@ -180,7 +180,6 @@ jacocoTestReport { reports { xml.required = true html.required = true - csv.enabled = false } } diff --git a/core/protobuf/build.gradle b/core/protobuf/build.gradle index bfd33b85..7c7fb4ed 100644 --- a/core/protobuf/build.gradle +++ b/core/protobuf/build.gradle @@ -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 { @@ -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 } diff --git a/gradle.properties b/gradle.properties index b5500bd3..807e7da1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 @@ -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