buildscript { repositories { mavenCentral() } dependencies { classpath 'com.google.protobuf:protobuf-gradle-plugin:0.9.4' } } plugins { id 'java' id 'com.google.protobuf' version '0.9.4' id 'com.github.johnrengelman.shadow' version '7.1.2' } group = 'org.bdware' version = 'dev-250321' java { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } def protobuf_version = '3.25.6' def grpc_java_version = '1.71.0' def junit_version = '5.12.1' tasks.withType(JavaCompile) { options.warnings = false options.encoding = "UTF-8" } sourceSets { main { proto { // In addition to the default 'src/main/proto' srcDir 'api/grpc/pb' } } } test { useJUnitPlatform() // testLogging { // events "passed", "skipped", "failed" // } } javadoc { source = sourceSets.main.allJava classpath = configurations.compileClasspath options { encoding = 'UTF-8' charSet = 'UTF-8' title = "BDLedger Java SDK API" } } protobuf { protoc { artifact = "com.google.protobuf:protoc:" + protobuf_version } plugins { grpc { artifact = 'io.grpc:protoc-gen-grpc-java:' + grpc_java_version } } // generatedFilesBaseDir = "$projectDir/src" generateProtoTasks { all().each { task -> task.plugins { grpc { outputSubDir = "java" } } } } } repositories { mavenCentral() } dependencies { implementation 'com.google.protobuf:protobuf-java:' + protobuf_version runtimeOnly '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()) { compileOnly 'org.apache.tomcat:annotations-api:6.0.53' } 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 }