Alex Klyubin | 381b7e6 | 2016-09-01 19:04:38 -0700 | [diff] [blame] | 1 | // Generic Gradle project |
| 2 | |
Alex Klyubin | c2f7b71 | 2016-08-29 14:49:40 -0700 | [diff] [blame] | 3 | apply plugin: 'java' |
Songchun Fan | d404451 | 2020-01-16 16:06:51 -0800 | [diff] [blame] | 4 | apply plugin: 'com.google.protobuf' |
Alex Klyubin | 44132f6 | 2016-11-28 10:55:19 -0800 | [diff] [blame] | 5 | |
| 6 | sourceCompatibility = '1.8' |
| 7 | |
| 8 | repositories { |
| 9 | jcenter() |
| 10 | } |
| 11 | |
Songchun Fan | d404451 | 2020-01-16 16:06:51 -0800 | [diff] [blame] | 12 | buildscript { |
| 13 | repositories { |
| 14 | jcenter() |
| 15 | } |
| 16 | dependencies { |
| 17 | classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.11' |
| 18 | } |
Alex Klyubin | 44132f6 | 2016-11-28 10:55:19 -0800 | [diff] [blame] | 19 | } |
Songchun Fan | d404451 | 2020-01-16 16:06:51 -0800 | [diff] [blame] | 20 | |
| 21 | dependencies { |
| 22 | implementation 'com.google.protobuf:protobuf-javalite:3.8.0' |
Khaled Abdelmohsen | cb9fe1e | 2020-02-20 17:32:28 +0000 | [diff] [blame] | 23 | testImplementation 'junit:junit:4.13' |
Songchun Fan | d404451 | 2020-01-16 16:06:51 -0800 | [diff] [blame] | 24 | } |
| 25 | |
| 26 | protobuf { |
| 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 | } |