Skip to content

Commit b5c298c

Browse files
authored
Merge pull request #17195 from wordpress-mobile/analysis/annotations-all-warnings-as-errors
[Compile Warnings As Errors] Annotations Module - Enable All Warnings as Errors
2 parents 7079342 + b7704dd commit b5c298c

File tree

5 files changed

+5
-26
lines changed

5 files changed

+5
-26
lines changed

build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
13
plugins {
24
id "com.automattic.android.fetchstyle"
35
id "io.gitlab.arturbosch.detekt"
@@ -103,9 +105,9 @@ allprojects {
103105
debug = false
104106
}
105107

106-
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
108+
tasks.withType(KotlinCompile).all {
107109
kotlinOptions {
108-
jvmTarget = "1.8"
110+
jvmTarget = JavaVersion.VERSION_1_8
109111
}
110112
}
111113
}

libs/annotations/build.gradle

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,8 @@ plugins {
22
id "org.jetbrains.kotlin.jvm"
33
}
44

5-
sourceCompatibility = "7"
6-
targetCompatibility = "7"
7-
8-
repositories {
9-
mavenCentral()
10-
}
115
compileKotlin {
126
kotlinOptions {
13-
jvmTarget = "1.8"
14-
}
15-
}
16-
compileTestKotlin {
17-
kotlinOptions {
18-
jvmTarget = "1.8"
7+
allWarningsAsErrors = true
198
}
209
}

libs/editor/build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ android {
4141
minSdkVersion rootProject.minSdkVersion
4242
targetSdkVersion rootProject.targetSdkVersion
4343
}
44-
compileOptions {
45-
sourceCompatibility 1.8
46-
targetCompatibility 1.8
47-
}
4844

4945
// Avoid 'duplicate files during packaging of APK' errors
5046
packagingOptions {

libs/image-editor/build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ android {
1818
vectorDrawables.useSupportLibrary = true
1919
}
2020

21-
kotlinOptions {
22-
jvmTarget = JavaVersion.VERSION_1_8
23-
}
24-
2521
sourceSets {
2622
main.java.srcDirs += 'src/main/kotlin'
2723
test.java.srcDirs += 'src/test/kotlin'

libs/processors/build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,3 @@ dependencies {
1717
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:$nhaarmanMockitoVersion"
1818
testImplementation "org.assertj:assertj-core:$assertJVersion"
1919
}
20-
21-
sourceCompatibility = "7"
22-
targetCompatibility = "7"
23-

0 commit comments

Comments
 (0)