File tree 9 files changed +28
-55
lines changed
android-interop-testing/app
example-kotlin/android/helloworld/app
9 files changed +28
-55
lines changed Original file line number Diff line number Diff line change @@ -41,14 +41,15 @@ android {
41
41
protobuf {
42
42
protoc { artifact = ' com.google.protobuf:protoc:3.10.0' }
43
43
plugins {
44
- javalite { artifact = " com.google.protobuf:protoc-gen-javalite:3.0.0" }
45
44
grpc { artifact = ' io.grpc:protoc-gen-grpc-java:1.26.0-SNAPSHOT' // CURRENT_GRPC_VERSION
46
45
}
47
46
}
48
47
generateProtoTasks {
49
48
all(). each { task ->
49
+ task. builtins {
50
+ java { option ' lite' }
51
+ }
50
52
task. plugins {
51
- javalite {}
52
53
grpc {
53
54
// Options added to --grpc_out
54
55
option ' lite'
@@ -77,9 +78,6 @@ dependencies {
77
78
implementation ' io.grpc:grpc-stub:1.26.0-SNAPSHOT' // CURRENT_GRPC_VERSION
78
79
implementation ' io.grpc:grpc-testing:1.26.0-SNAPSHOT' // CURRENT_GRPC_VERSION
79
80
80
- // workaround for https://github.com/google/protobuf/issues/1889
81
- protobuf ' com.google.protobuf:protobuf-java:3.0.2'
82
-
83
81
androidTestImplementation ' androidx.test:rules:1.1.0-alpha1'
84
82
androidTestImplementation ' androidx.test:runner:1.1.0-alpha1'
85
83
}
Original file line number Diff line number Diff line change @@ -105,11 +105,6 @@ subprojects {
105
105
}
106
106
107
107
tasks. withType(JavaCompile ) {
108
- // Protobuf-generated code produces some warnings.
109
- // https://github.com/google/protobuf/issues/2718
110
- it. options. compilerArgs + = [
111
- " -Xlint:-cast" ,
112
- ]
113
108
it. options. errorprone. excludedPaths = " .*/src/generated/[^/]+/java/.*" +
114
109
" |.*/build/generated/source/proto/[^/]+/java/.*"
115
110
}
@@ -137,8 +132,7 @@ subprojects {
137
132
perfmark : ' io.perfmark:perfmark-api:0.19.0' ,
138
133
pgv : ' io.envoyproxy.protoc-gen-validate:pgv-java-stub:0.2.0' ,
139
134
protobuf : " com.google.protobuf:protobuf-java:${ protobufVersion} " ,
140
- protobuf_lite : " com.google.protobuf:protobuf-lite:3.0.1" ,
141
- protoc_lite : " com.google.protobuf:protoc-gen-javalite:3.0.0" ,
135
+ protobuf_lite : " com.google.protobuf:protobuf-javalite:${ protobufVersion} " ,
142
136
protobuf_util : " com.google.protobuf:protobuf-java-util:${ protobufVersion} " ,
143
137
lang : " org.apache.commons:commons-lang3:3.5" ,
144
138
Original file line number Diff line number Diff line change @@ -142,19 +142,13 @@ sourceSets {
142
142
}
143
143
144
144
compileTestJava {
145
- options. compilerArgs + = [
146
- " -Xlint:-cast"
147
- ]
148
145
options. errorprone. excludedPaths = " .*/build/generated/source/proto/.*"
149
146
}
150
147
151
148
compileTestLiteJava {
152
149
options. compilerArgs = compileTestJava. options. compilerArgs
153
- // Protobuf-generated Lite produces quite a few warnings.
154
150
options. compilerArgs + = [
155
- " -Xlint:-rawtypes" ,
156
- " -Xlint:-unchecked" ,
157
- " -Xlint:-fallthrough"
151
+ " -Xlint:-cast"
158
152
]
159
153
options. errorprone. excludedPaths = " .*/build/generated/source/proto/.*"
160
154
}
@@ -168,13 +162,6 @@ protobuf {
168
162
}
169
163
}
170
164
plugins {
171
- javalite {
172
- if (project. hasProperty(' protoc-gen-javalite' )) {
173
- path = project[' protoc-gen-javalite' ]
174
- } else {
175
- artifact = libraries. protoc_lite
176
- }
177
- }
178
165
grpc { path = javaPluginPath }
179
166
}
180
167
generateProtoTasks {
@@ -184,9 +171,10 @@ protobuf {
184
171
}
185
172
ofSourceSet(' test' )* . plugins { grpc {} }
186
173
ofSourceSet(' testLite' )* . each { task ->
187
- task. builtins { remove java }
174
+ task. builtins {
175
+ java { option ' lite' }
176
+ }
188
177
task. plugins {
189
- javalite {}
190
178
grpc { option ' lite' }
191
179
}
192
180
}
Original file line number Diff line number Diff line change @@ -28,16 +28,17 @@ android {
28
28
}
29
29
30
30
protobuf {
31
- protoc { artifact = ' com.google.protobuf:protoc:3.4 .0' }
31
+ protoc { artifact = ' com.google.protobuf:protoc:3.10 .0' }
32
32
plugins {
33
- javalite { artifact = " com.google.protobuf:protoc-gen-javalite:3.0.0" }
34
33
grpc { artifact = ' io.grpc:protoc-gen-grpc-java:1.26.0-SNAPSHOT' // CURRENT_GRPC_VERSION
35
34
}
36
35
}
37
36
generateProtoTasks {
38
37
all(). each { task ->
38
+ task. builtins {
39
+ java { option ' lite' }
40
+ }
39
41
task. plugins {
40
- javalite {}
41
42
grpc { // Options added to --grpc_out
42
43
option ' lite' }
43
44
}
Original file line number Diff line number Diff line change @@ -29,14 +29,15 @@ android {
29
29
protobuf {
30
30
protoc { artifact = ' com.google.protobuf:protoc:3.10.0' }
31
31
plugins {
32
- javalite { artifact = " com.google.protobuf:protoc-gen-javalite:3.0.0" }
33
32
grpc { artifact = ' io.grpc:protoc-gen-grpc-java:1.26.0-SNAPSHOT' // CURRENT_GRPC_VERSION
34
33
}
35
34
}
36
35
generateProtoTasks {
37
36
all(). each { task ->
37
+ task. builtins {
38
+ java { option ' lite' }
39
+ }
38
40
task. plugins {
39
- javalite {}
40
41
grpc { // Options added to --grpc_out
41
42
option ' lite' }
42
43
}
Original file line number Diff line number Diff line change @@ -28,14 +28,15 @@ android {
28
28
protobuf {
29
29
protoc { artifact = ' com.google.protobuf:protoc:3.10.0' }
30
30
plugins {
31
- javalite { artifact = " com.google.protobuf:protoc-gen-javalite:3.0.0" }
32
31
grpc { artifact = ' io.grpc:protoc-gen-grpc-java:1.26.0-SNAPSHOT' // CURRENT_GRPC_VERSION
33
32
}
34
33
}
35
34
generateProtoTasks {
36
35
all(). each { task ->
36
+ task. builtins {
37
+ java { option ' lite' }
38
+ }
37
39
task. plugins {
38
- javalite {}
39
40
grpc { // Options added to --grpc_out
40
41
option ' lite' }
41
42
}
Original file line number Diff line number Diff line change @@ -29,14 +29,15 @@ android {
29
29
protobuf {
30
30
protoc { artifact = ' com.google.protobuf:protoc:3.10.0' }
31
31
plugins {
32
- javalite { artifact = " com.google.protobuf:protoc-gen-javalite:3.0.0" }
33
32
grpc { artifact = ' io.grpc:protoc-gen-grpc-java:1.26.0-SNAPSHOT' // CURRENT_GRPC_VERSION
34
33
}
35
34
}
36
35
generateProtoTasks {
37
36
all(). each { task ->
37
+ task. builtins {
38
+ java { option ' lite' }
39
+ }
38
40
task. plugins {
39
- javalite {}
40
41
grpc { // Options added to --grpc_out
41
42
option ' lite' }
42
43
}
Original file line number Diff line number Diff line change @@ -51,14 +51,15 @@ android {
51
51
protobuf {
52
52
protoc { artifact = ' com.google.protobuf:protoc:3.10.0' }
53
53
plugins {
54
- javalite { artifact = " com.google.protobuf:protoc-gen-javalite:3.0.0" }
55
54
grpc { artifact = ' io.grpc:protoc-gen-grpc-java:1.26.0-SNAPSHOT' // CURRENT_GRPC_VERSION
56
55
}
57
56
}
58
57
generateProtoTasks {
59
58
all(). each { task ->
59
+ task. builtins {
60
+ java { option ' lite' }
61
+ }
60
62
task. plugins {
61
- javalite {}
62
63
grpc { // Options added to --grpc_out
63
64
option ' lite' }
64
65
}
Original file line number Diff line number Diff line change @@ -22,18 +22,14 @@ dependencies {
22
22
}
23
23
24
24
testCompile project(' :grpc-core' )
25
- testProtobuf libraries. protobuf
26
25
27
26
signature " org.codehaus.mojo.signature:java17:1.0@signature"
28
27
signature " net.sf.androidscents.signature:android-api-level-14:4.0_r4@signature"
29
28
}
30
29
31
30
compileTestJava {
32
- // Protobuf-generated Lite produces quite a few warnings.
33
31
options. compilerArgs + = [
34
- " -Xlint:-rawtypes" ,
35
- " -Xlint:-unchecked" ,
36
- " -Xlint:-fallthrough"
32
+ " -Xlint:-cast"
37
33
]
38
34
options. errorprone. excludedPaths = " .*/build/generated/source/proto/.*"
39
35
}
@@ -46,19 +42,11 @@ protobuf {
46
42
artifact = " com.google.protobuf:protoc:${ protocVersion} "
47
43
}
48
44
}
49
- plugins {
50
- javalite {
51
- if (project. hasProperty(' protoc-gen-javalite' )) {
52
- path = project[' protoc-gen-javalite' ]
53
- } else {
54
- artifact = libraries. protoc_lite
55
- }
56
- }
57
- }
58
45
generateProtoTasks {
59
46
ofSourceSet(' test' )* . each { task ->
60
- task. builtins { remove java }
61
- task. plugins { javalite {} }
47
+ task. builtins {
48
+ java { option ' lite' }
49
+ }
62
50
}
63
51
}
64
52
}
You can’t perform that action at this time.
0 commit comments