bdledger-java-sdk/build.gradle
2019-04-15 09:31:36 +08:00

75 lines
1.5 KiB
Groovy

buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.8'
}
}
plugins {
id 'java'
id 'com.google.protobuf' version '0.8.8'
}
group 'org.bdchain'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
def grpc_java_version = '1.20.0'
def junit_version = '5.4.1'
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 "BDChain Java SDK API"
}
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.7.1"
}
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
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
}