setup: update project setup and build

This commit is contained in:
Nex Zhu
2022-11-14 15:25:58 +08:00
parent bc6b9bcb4c
commit bf08b23fde
8 changed files with 193 additions and 144 deletions

View File

@@ -9,7 +9,7 @@ buildscript {
plugins {
id 'java'
id 'com.google.protobuf' version '0.8.13'
id 'com.google.protobuf' version '0.9.1'
id 'com.github.johnrengelman.shadow' version '6.0.0'
}
@@ -18,7 +18,7 @@ version 'dev-200922.1278255c'
sourceCompatibility = JavaVersion.VERSION_1_8
def grpc_java_version = '1.32.1'
def grpc_java_version = '1.41.0'
def junit_version = '5.7.0'
tasks.withType(JavaCompile) {
@@ -43,7 +43,7 @@ test {
javadoc {
source = sourceSets.main.allJava
classpath = configurations.compile
classpath = configurations.runtimeClasspath
options {
encoding 'UTF-8'
charSet 'UTF-8'
@@ -75,13 +75,13 @@ repositories {
}
dependencies {
compile 'io.grpc:grpc-netty-shaded:' + grpc_java_version
compile 'io.grpc:grpc-protobuf:' + grpc_java_version
compile 'io.grpc:grpc-stub:' + grpc_java_version
implementation 'io.grpc:grpc-netty-shaded:' + grpc_java_version
implementation 'io.grpc:grpc-protobuf:' + grpc_java_version
implementation 'io.grpc:grpc-stub:' + grpc_java_version
if (JavaVersion.current().isJava9Compatible()) {
// Workaround for @javax.annotation.Generated
// see: https://github.com/grpc/grpc-java/issues/3633
compile 'javax.annotation:javax.annotation-api:1.3.2'
implementation 'javax.annotation:javax.annotation-api:1.3.2'
}
testImplementation 'org.junit.jupiter:junit-jupiter-api:' + junit_version
testImplementation 'org.junit.jupiter:junit-jupiter-params:' + junit_version