File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,15 +20,7 @@ android {
2020 versionName " 1.0"
2121 testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
2222 }
23-
24- // fail on android lint warnings if failOnWarning is set true
25- lintOptions {
26- abortOnError true
27- if (rootProject. hasProperty(" failOnWarnings" ) && rootProject. failOnWarnings. toBoolean()) {
28- warningsAsErrors true
29- }
30- }
31-
23+ lintOptions { abortOnError true }
3224 publishing {
3325 singleVariant(' release' ) {
3426 withSourcesJar()
@@ -52,14 +44,6 @@ dependencies {
5244 testImplementation libraries. truth
5345}
5446
55- // Enforce -Werror on java compiler if failOnWarning is set
56- tasks. withType(JavaCompile ). configureEach {
57- it. options. compilerArgs + = [" -Xlint:all" ]
58- if (rootProject. hasProperty(" failOnWarnings" ) && rootProject. failOnWarnings. toBoolean()) {
59- it. options. compilerArgs + = [" -Werror" ]
60- }
61- }
62-
6347tasks. register(" javadocs" , Javadoc ) {
6448 source = android. sourceSets. main. java. srcDirs
6549 classpath + = files(android. getBootClasspath())
Original file line number Diff line number Diff line change @@ -23,6 +23,17 @@ subprojects {
2323 group = " io.grpc"
2424 version = " 1.73.0-SNAPSHOT" // CURRENT_GRPC_VERSION
2525
26+ plugins. withId(" com.android.base" ) {
27+ android {
28+ lint {
29+ abortOnError true
30+ if (rootProject. hasProperty(' failOnWarnings' ) && rootProject. failOnWarnings. toBoolean()) {
31+ warningsAsErrors true
32+ }
33+ }
34+ }
35+ }
36+
2637 repositories {
2738 maven { // The google mirror is less flaky than mavenCentral()
2839 url " https://maven-central.storage-download.googleapis.com/maven2/"
You can’t perform that action at this time.
0 commit comments