1description = 'OpenCensus AppEngine Standard Util' 2 3apply plugin: 'java' 4apply plugin: 'com.google.protobuf' 5 6def protocVersion = '3.5.1-1' 7 8buildscript { 9 repositories { 10 maven { url "https://plugins.gradle.org/m2/" } 11 } 12 dependencies { 13 classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.5" 14 } 15} 16 17[compileJava, compileTestJava].each() { 18 it.sourceCompatibility = 1.7 19 it.targetCompatibility = 1.7 20} 21 22dependencies { 23 compile project(':opencensus-api'), 24 libraries.appengine_api, 25 libraries.guava, 26 libraries.protobuf 27 28 signature "org.codehaus.mojo.signature:java18:+@signature" 29} 30 31protobuf { 32 protoc { 33 // The artifact spec for the Protobuf Compiler 34 artifact = "com.google.protobuf:protoc:${protocVersion}" 35 } 36 37 generatedFilesBaseDir = "$projectDir/gen_gradle/src" 38 39 generateProtoTasks { 40 all().each { task -> 41 task.builtins { 42 java { 43 option 'annotate_code' 44 } 45 } 46 } 47 } 48} 49 50clean { 51 delete protobuf.generatedFilesBaseDir 52} 53