1// Generic Gradle project 2 3apply plugin: 'java' 4apply plugin: 'com.google.protobuf' 5 6sourceCompatibility = '1.8' 7 8repositories { 9 jcenter() 10} 11 12buildscript { 13 repositories { 14 jcenter() 15 } 16 dependencies { 17 classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.11' 18 } 19} 20 21dependencies { 22 implementation 'com.google.protobuf:protobuf-javalite:3.8.0' 23 testImplementation 'junit:junit:4.13' 24} 25 26protobuf { 27 protoc { 28 artifact = 'com.google.protobuf:protoc:3.8.0' 29 } 30 generateProtoTasks { 31 all().each { task -> 32 task.builtins { 33 java { 34 option "lite" 35 } 36 } 37 } 38 } 39}