marcoferrer
12/17/2019, 4:17 PMplugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.61'
id 'com.google.protobuf' version '0.8.10'
}
group 'ray.eldath'
version '1.0-SNAPSHOT'
repositories {
jcenter()
mavenCentral()
maven { url '<https://oss.jfrog.org/artifactory/oss-snapshot-local>' }
}
ext {
protobufVersion = '3.11.1'
krotoPlusVersion = '0.6.0-SNAPSHOT'
coroutinesVersion = '1.3.3'
grpcVersion = '1.25.0'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
compileOnly "javax.annotation:javax.annotation-api:1.2"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion"
implementation "com.github.marcoferrer.krotoplus:kroto-plus-coroutines:$krotoPlusVersion"
implementation "com.google.protobuf:protobuf-java:$protobufVersion"
implementation "io.grpc:grpc-protobuf:$grpcVersion"
implementation "io.grpc:grpc-stub:$grpcVersion"
}
protobuf {
protoc { artifact = "com.google.protobuf:protoc:$protobufVersion" }
plugins {
kroto {
artifact = "com.github.marcoferrer.krotoplus:protoc-gen-kroto-plus:$krotoPlusVersion"
}
}
generateProtoTasks {
def krotoConfig = file("krotoPlusConfig.yaml") // Or .json, .yaml, .yml
all().each { task ->
// Adding the config file to the task inputs lets UP-TO-DATE checks
// include changes to configuration
task.inputs.files krotoConfig
task.plugins {
kroto {
outputSubDir = "java"
option "ConfigPath=${file(System.getProperty("user.dir")).toPath().toAbsolutePath().relativize(krotoConfig.toPath().toAbsolutePath()).toString()}"
}
}
}
}
}