47 lines
1012 B
Groovy
47 lines
1012 B
Groovy
plugins {
|
|
id 'java-library'
|
|
id 'com.google.protobuf'
|
|
}
|
|
|
|
dependencies {
|
|
api "com.google.protobuf:protobuf-java:${protobufVersion}"
|
|
api "io.grpc:grpc-protobuf:${grpcVersion}"
|
|
api "io.grpc:grpc-stub:${grpcVersion}"
|
|
|
|
implementation "io.grpc:grpc-netty-shaded:${grpcVersion}"
|
|
|
|
compileOnly 'javax.annotation:javax.annotation-api:1.3.2'
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
proto {
|
|
srcDir rootProject.file('../../src/MxGateway.Contracts/Protos')
|
|
include 'mxaccess_gateway.proto'
|
|
include 'mxaccess_worker.proto'
|
|
}
|
|
}
|
|
}
|
|
|
|
protobuf {
|
|
protoc {
|
|
artifact = "com.google.protobuf:protoc:${protobufVersion}"
|
|
}
|
|
|
|
plugins {
|
|
grpc {
|
|
artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}"
|
|
}
|
|
}
|
|
|
|
generatedFilesBaseDir = rootProject.file('src/main/generated').absolutePath
|
|
|
|
generateProtoTasks {
|
|
all().configureEach {
|
|
plugins {
|
|
grpc {}
|
|
}
|
|
}
|
|
}
|
|
}
|