Skip to content

Commit 92d7beb

Browse files
authored
Downgrade source and targetCompatibility (#36)
1 parent cfad5a5 commit 92d7beb

File tree

7 files changed

+40
-29
lines changed

7 files changed

+40
-29
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ buildscript {
3333
}
3434
3535
dependencies {
36-
classpath 'com.jeppeman.mockposable:mockposable-gradle:0.11'
36+
classpath 'com.jeppeman.mockposable:mockposable-gradle:0.12'
3737
}
3838
}
3939

build.gradle.kts

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ allprojects {
2828
google()
2929
}
3030

31-
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
32-
kotlinOptions {
33-
jvmTarget = JvmTarget.JVM_21.target
34-
}
35-
}
36-
3731
tasks.withType(Test::class.java).configureEach {
3832
testLogging {
3933
exceptionFormat = TestExceptionFormat.FULL
@@ -50,6 +44,25 @@ allprojects {
5044
)
5145
}
5246
}
47+
48+
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) {
49+
kotlinOptions {
50+
jvmTarget = JvmTarget.JVM_11.target
51+
}
52+
}
53+
54+
tasks.withType(JavaCompile::class).configureEach {
55+
sourceCompatibility = JavaVersion.VERSION_11.toString()
56+
targetCompatibility = JavaVersion.VERSION_11.toString()
57+
}
58+
59+
plugins.withType(com.android.build.gradle.BasePlugin::class).configureEach {
60+
val android = extensions.getByName("android") as com.android.build.gradle.BaseExtension
61+
android.compileOptions {
62+
sourceCompatibility = JavaVersion.VERSION_11
63+
targetCompatibility = JavaVersion.VERSION_11
64+
}
65+
}
5366
}
5467

5568
task("clean", Delete::class) {

integration-tests/android/build.gradle.kts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ android {
4848
packagingOptions {
4949
resources.excludes.add("META-INF/LICENSE*")
5050
}
51-
52-
compileOptions {
53-
sourceCompatibility = JavaVersion.VERSION_21
54-
targetCompatibility = JavaVersion.VERSION_21
55-
}
5651
}
5752

5853
dependencies {

mockposable/build.gradle.kts

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ allprojects {
2828
google()
2929
}
3030

31-
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
32-
kotlinOptions {
33-
jvmTarget = JvmTarget.JVM_21.target
34-
}
35-
}
36-
3731
tasks.withType(Test::class.java).configureEach {
3832
testLogging {
3933
exceptionFormat = TestExceptionFormat.FULL
@@ -51,6 +45,25 @@ allprojects {
5145
}
5246
}
5347

48+
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) {
49+
kotlinOptions {
50+
jvmTarget = JvmTarget.JVM_11.target
51+
}
52+
}
53+
54+
tasks.withType(JavaCompile::class).configureEach {
55+
sourceCompatibility = JavaVersion.VERSION_11.toString()
56+
targetCompatibility = JavaVersion.VERSION_11.toString()
57+
}
58+
59+
plugins.withType(com.android.build.gradle.BasePlugin::class).configureEach {
60+
val android = extensions.getByName("android") as com.android.build.gradle.BaseExtension
61+
android.compileOptions {
62+
sourceCompatibility = JavaVersion.VERSION_11
63+
targetCompatibility = JavaVersion.VERSION_11
64+
}
65+
}
66+
5467
tasks.whenTaskAdded {
5568
if (name == "generateMetadataFileForAarPublication") {
5669
dependsOn("androidSourcesJar")

mockposable/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION_NAME=0.12-SNAPSHOT
1+
VERSION_NAME=0.13-SNAPSHOT
22
GROUP=com.jeppeman.mockposable
33

44
POM_DESCRIPTION=A tool that enables stubbing and verification of @Composable-annotated functions

mockposable/mockposable-compiler/build.gradle.kts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ plugins {
1515
id("com.google.devtools.ksp")
1616
}
1717

18-
java {
19-
sourceCompatibility = JavaVersion.VERSION_21
20-
targetCompatibility = JavaVersion.VERSION_21
21-
}
22-
2318
dependencies {
2419
compileOnly(libs.kotlin.compiler)
2520
implementation(libs.autoservice.annotations)

mockposable/mockposable-runtime/mockposable-runtime-composeui/build.gradle.kts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ android {
2222
buildFeatures {
2323
compose = true
2424
}
25-
26-
compileOptions {
27-
sourceCompatibility = JavaVersion.VERSION_21
28-
targetCompatibility = JavaVersion.VERSION_21
29-
}
3025
}
3126

3227
dependencies {

0 commit comments

Comments
 (0)