buildscript { repositories { mavenCentral() } dependencies { classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.11' } } plugins { id 'java' id 'com.google.protobuf' version '0.8.11' } group 'org.bdware' version '1.0-SNAPSHOT' sourceCompatibility = JavaVersion.VERSION_1_8 def grpc_java_version = '1.27.0' def junit_version = '5.6.0' tasks.withType(JavaCompile) { options.encoding = "UTF-8" } test { useJUnitPlatform() // testLogging { // events "passed", "skipped", "failed" // } } javadoc { source = sourceSets.main.allJava classpath = configurations.compile options { encoding 'UTF-8' charSet 'UTF-8' title "BDLedger Java SDK API" } } protobuf { protoc { artifact = "com.google.protobuf:protoc:3.11.3" } plugins { grpc { artifact = 'io.grpc:protoc-gen-grpc-java:' + grpc_java_version } } generatedFilesBaseDir = "$projectDir/src" generateProtoTasks { all()*.plugins { grpc { outputSubDir = 'java' } } } } repositories { mavenCentral() } 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 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' } testImplementation 'org.junit.jupiter:junit-jupiter-api:' + junit_version testImplementation 'org.junit.jupiter:junit-jupiter-params:' + junit_version testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:' + junit_version }