2018-09-11 14:19:08 +00:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
dependencies {
|
2019-04-15 01:31:36 +00:00
|
|
|
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.8'
|
2018-09-11 14:19:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-09-11 08:06:10 +00:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
2019-04-15 01:31:36 +00:00
|
|
|
id 'com.google.protobuf' version '0.8.8'
|
2018-09-11 08:06:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
group 'org.bdchain'
|
|
|
|
version '1.0-SNAPSHOT'
|
|
|
|
|
|
|
|
sourceCompatibility = 1.8
|
|
|
|
|
2019-04-15 01:31:36 +00:00
|
|
|
def grpc_java_version = '1.20.0'
|
|
|
|
def junit_version = '5.4.1'
|
2018-09-11 14:19:08 +00:00
|
|
|
|
2018-09-14 02:15:36 +00:00
|
|
|
tasks.withType(JavaCompile) {
|
|
|
|
options.encoding = "UTF-8"
|
|
|
|
}
|
|
|
|
|
2018-11-28 08:44:52 +00:00
|
|
|
test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
// testLogging {
|
|
|
|
// events "passed", "skipped", "failed"
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
|
2018-09-14 02:15:36 +00:00
|
|
|
javadoc {
|
|
|
|
source = sourceSets.main.allJava
|
|
|
|
classpath = configurations.compile
|
|
|
|
options {
|
|
|
|
encoding 'UTF-8'
|
|
|
|
charSet 'UTF-8'
|
|
|
|
title "BDChain Java SDK API"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-09-11 14:19:08 +00:00
|
|
|
protobuf {
|
|
|
|
protoc {
|
2019-04-15 01:31:36 +00:00
|
|
|
artifact = "com.google.protobuf:protoc:3.7.1"
|
2018-09-11 14:19:08 +00:00
|
|
|
}
|
|
|
|
plugins {
|
|
|
|
grpc {
|
|
|
|
artifact = 'io.grpc:protoc-gen-grpc-java:' + grpc_java_version
|
|
|
|
}
|
|
|
|
}
|
|
|
|
generatedFilesBaseDir = "$projectDir/src"
|
|
|
|
generateProtoTasks {
|
|
|
|
all()*.plugins {
|
|
|
|
grpc {
|
|
|
|
outputSubDir = 'java'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-09-11 08:06:10 +00:00
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2018-09-11 14:19:08 +00:00
|
|
|
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
|
2018-11-28 08:44:52 +00:00
|
|
|
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
|
2018-09-11 08:06:10 +00:00
|
|
|
}
|