You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.9 KiB
66 lines
1.9 KiB
4 months ago
|
buildscript {
|
||
|
repositories {
|
||
|
maven { // The google mirror is less flaky than mavenCentral()
|
||
|
url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
|
||
|
mavenLocal()
|
||
|
}
|
||
|
dependencies { classpath libraries.protobuf_plugin }
|
||
|
}
|
||
|
|
||
|
apply plugin: 'com.google.protobuf'
|
||
|
|
||
|
description = 'gRPC: Protobuf Lite'
|
||
|
|
||
|
dependencies {
|
||
|
compile project(':grpc-core'),
|
||
|
libraries.protobuf_lite
|
||
|
compile (libraries.guava) {
|
||
|
// prefer 2.2.0 from libraries instead of 2.1.3
|
||
|
exclude group: 'com.google.errorprone', module: 'error_prone_annotations'
|
||
|
// prefer 3.0.2 from libraries instead of 3.0.1
|
||
|
exclude group: 'com.google.code.findbugs', module: 'jsr305'
|
||
|
// prefer 1.17 from libraries instead of 1.14
|
||
|
exclude group: 'org.codehaus.mojo', module: 'animal-sniffer-annotations'
|
||
|
}
|
||
|
|
||
|
testProtobuf libraries.protobuf
|
||
|
|
||
|
signature "org.codehaus.mojo.signature:java17:1.0@signature"
|
||
|
signature "net.sf.androidscents.signature:android-api-level-14:4.0_r4@signature"
|
||
|
}
|
||
|
|
||
|
compileTestJava {
|
||
|
// Protobuf-generated Lite produces quite a few warnings.
|
||
|
options.compilerArgs += [
|
||
|
"-Xlint:-rawtypes",
|
||
|
"-Xlint:-unchecked",
|
||
|
"-Xlint:-fallthrough",
|
||
|
"-XepExcludedPaths:.*/build/generated/source/proto/.*"
|
||
|
]
|
||
|
}
|
||
|
|
||
|
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 {} }
|
||
|
}
|
||
|
}
|
||
|
}
|