-
Notifications
You must be signed in to change notification settings - Fork 131
/
build.gradle
65 lines (56 loc) · 1.19 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
apply plugin: 'java'
group = 'com.github.yeriomin'
version = '0.44.2'
sourceCompatibility = JavaVersion.VERSION_1_5
targetCompatibility = JavaVersion.VERSION_1_5
compileJava.options.encoding = 'UTF-8'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.0'
}
}
repositories {
jcenter()
}
apply plugin: 'com.google.protobuf'
sourceSets {
main {
java {
srcDir 'src/main/java'
srcDir 'build/generated/source/proto/main/javalite'
}
}
}
jar {
exclude("*.proto")
}
dependencies {
testCompile "junit:junit:4.12"
testCompile group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.5.0'
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.0.0'
}
plugins {
javalite {
artifact = 'com.google.protobuf:protoc-gen-javalite:3.0.0'
}
}
generateProtoTasks {
all()*.plugins {
javalite { }
}
all().each { task ->
task.builtins {
remove java
}
}
}
}