Eric Anderson | a8700a7 | 2016-07-29 11:57:41 -0700 | [diff] [blame] | 1 | buildscript { |
| 2 | repositories { |
| 3 | mavenCentral() |
| 4 | mavenLocal() |
| 5 | } |
| 6 | dependencies { |
| 7 | classpath libraries.protobuf_plugin |
| 8 | } |
| 9 | } |
| 10 | |
Eric Anderson | 99a6d8d | 2016-03-22 11:31:36 -0700 | [diff] [blame] | 11 | plugins { |
| 12 | id "be.insaneprogramming.gradle.animalsniffer" version "1.4.0" |
| 13 | } |
| 14 | |
Eric Anderson | a8700a7 | 2016-07-29 11:57:41 -0700 | [diff] [blame] | 15 | apply plugin: 'com.google.protobuf' |
| 16 | |
Eric Anderson | 99a6d8d | 2016-03-22 11:31:36 -0700 | [diff] [blame] | 17 | description = 'gRPC: Protobuf Lite' |
| 18 | |
| 19 | dependencies { |
| 20 | compile project(':grpc-core'), |
Eric Anderson | a8700a7 | 2016-07-29 11:57:41 -0700 | [diff] [blame] | 21 | libraries.protobuf_lite, |
Eric Anderson | 99a6d8d | 2016-03-22 11:31:36 -0700 | [diff] [blame] | 22 | libraries.guava |
Eric Anderson | a8700a7 | 2016-07-29 11:57:41 -0700 | [diff] [blame] | 23 | |
| 24 | testProtobuf libraries.protobuf |
| 25 | } |
| 26 | |
| 27 | compileTestJava { |
| 28 | // Protobuf-generated Lite produces quite a few warnings. |
| 29 | options.compilerArgs += ["-Xlint:-rawtypes", "-Xlint:-unchecked", "-Xlint:-fallthrough"] |
| 30 | } |
| 31 | |
| 32 | protobuf { |
| 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 Anderson | 99a6d8d | 2016-03-22 11:31:36 -0700 | [diff] [blame] | 59 | } |
| 60 | |
| 61 | animalsniffer { |
| 62 | signature = "org.codehaus.mojo.signature:java16:+@signature" |
| 63 | } |