grpc-java/protobuf-lite/build.gradle

60 lines
1.3 KiB
Groovy

buildscript {
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
classpath libraries.protobuf_plugin
}
}
apply plugin: 'com.google.protobuf'
description = 'gRPC: Protobuf Lite'
dependencies {
compile project(':grpc-core'),
libraries.protobuf_lite,
libraries.guava
testProtobuf libraries.protobuf
signature "org.codehaus.mojo.signature:java16:1.1@signature"
}
compileTestJava {
// Protobuf-generated Lite produces quite a few warnings.
options.compilerArgs += ["-Xlint:-rawtypes", "-Xlint:-unchecked", "-Xlint:-fallthrough",
"-Xep:MissingOverride:OFF", "-Xep:ReferenceEquality:OFF", "-Xep:FallThrough:OFF",
"-Xep:JavaLangClash:OFF" /* The Enum protobuf clashes */]
}
protobuf {
protoc {
if (project.hasProperty('protoc')) {
path = project.protoc
} else {
artifact = "com.google.protobuf:protoc:${protocVersion}"
}
}
plugins {
javalite {
if (project.hasProperty('protoc-gen-javalite')) {
path = project['protoc-gen-javalite']
} else {
artifact = libraries.protoc_lite
}
}
}
generateProtoTasks {
ofSourceSet('test')*.each { task ->
task.builtins {
remove java
}
task.plugins {
javalite {}
}
}
}
}