blob: e7342be75d91c877466e8e8e5e468ee3dafdf7d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
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,
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 {}
}
}
}
}
idea {
module {
testSourceDirs += file("${projectDir}/build/generated/source/proto/test/javalite/")
}
}
|