blob: 7e3058b4ef2adf18cb6c57412f7b8808b620976f [file] [log] [blame]
Eric Andersona8700a72016-07-29 11:57:41 -07001buildscript {
2 repositories {
3 mavenCentral()
4 mavenLocal()
5 }
6 dependencies {
7 classpath libraries.protobuf_plugin
8 }
9}
10
Eric Anderson99a6d8d2016-03-22 11:31:36 -070011plugins {
12 id "be.insaneprogramming.gradle.animalsniffer" version "1.4.0"
13}
14
Eric Andersona8700a72016-07-29 11:57:41 -070015apply plugin: 'com.google.protobuf'
16
Eric Anderson99a6d8d2016-03-22 11:31:36 -070017description = 'gRPC: Protobuf Lite'
18
19dependencies {
20 compile project(':grpc-core'),
Eric Andersona8700a72016-07-29 11:57:41 -070021 libraries.protobuf_lite,
Eric Anderson99a6d8d2016-03-22 11:31:36 -070022 libraries.guava
Eric Andersona8700a72016-07-29 11:57:41 -070023
24 testProtobuf libraries.protobuf
25}
26
27compileTestJava {
28 // Protobuf-generated Lite produces quite a few warnings.
29 options.compilerArgs += ["-Xlint:-rawtypes", "-Xlint:-unchecked", "-Xlint:-fallthrough"]
30}
31
32protobuf {
33 protoc {
34 if (project.hasProperty('protoc')) {
35 path = project.protoc
36 } else {
37 artifact = "com.google.protobuf:protoc:${protobufVersion}"
38 }
39 }
40 plugins {
41 javalite {
42 if (project.hasProperty('protoc-gen-javalite')) {
43 path = project['protoc-gen-javalite']
44 } else {
45 artifact = "com.google.protobuf:protoc-gen-javalite:${protobufVersion}"
46 }
47 }
48 }
49 generateProtoTasks {
50 ofSourceSet('test')*.each { task ->
51 task.builtins {
52 remove java
53 }
54 task.plugins {
55 javalite {}
56 }
57 }
58 }
Eric Anderson99a6d8d2016-03-22 11:31:36 -070059}
60
61animalsniffer {
62 signature = "org.codehaus.mojo.signature:java16:+@signature"
63}