bdledger-java-sdk/build.gradle
2018-09-14 10:15:36 +08:00

65 lines
1.2 KiB
Groovy

buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.6'
}
}
plugins {
id 'java'
id 'com.google.protobuf' version '0.8.6'
}
group 'org.bdchain'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
def grpc_java_version = '1.14.0'
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
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.6.0"
}
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
testCompile group: 'junit', name: 'junit', version: '4.12'
}