Skip to content

Commit

Permalink
Downgrade source and targetCompatibility (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeppeman authored Dec 21, 2024
1 parent cfad5a5 commit 92d7beb
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 29 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ buildscript {
}
dependencies {
classpath 'com.jeppeman.mockposable:mockposable-gradle:0.11'
classpath 'com.jeppeman.mockposable:mockposable-gradle:0.12'
}
}
Expand Down
25 changes: 19 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ allprojects {
google()
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = JvmTarget.JVM_21.target
}
}

tasks.withType(Test::class.java).configureEach {
testLogging {
exceptionFormat = TestExceptionFormat.FULL
Expand All @@ -50,6 +44,25 @@ allprojects {
)
}
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) {
kotlinOptions {
jvmTarget = JvmTarget.JVM_11.target
}
}

tasks.withType(JavaCompile::class).configureEach {
sourceCompatibility = JavaVersion.VERSION_11.toString()
targetCompatibility = JavaVersion.VERSION_11.toString()
}

plugins.withType(com.android.build.gradle.BasePlugin::class).configureEach {
val android = extensions.getByName("android") as com.android.build.gradle.BaseExtension
android.compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}
}

task("clean", Delete::class) {
Expand Down
5 changes: 0 additions & 5 deletions integration-tests/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ android {
packagingOptions {
resources.excludes.add("META-INF/LICENSE*")
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
}

dependencies {
Expand Down
25 changes: 19 additions & 6 deletions mockposable/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ allprojects {
google()
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = JvmTarget.JVM_21.target
}
}

tasks.withType(Test::class.java).configureEach {
testLogging {
exceptionFormat = TestExceptionFormat.FULL
Expand All @@ -51,6 +45,25 @@ allprojects {
}
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) {
kotlinOptions {
jvmTarget = JvmTarget.JVM_11.target
}
}

tasks.withType(JavaCompile::class).configureEach {
sourceCompatibility = JavaVersion.VERSION_11.toString()
targetCompatibility = JavaVersion.VERSION_11.toString()
}

plugins.withType(com.android.build.gradle.BasePlugin::class).configureEach {
val android = extensions.getByName("android") as com.android.build.gradle.BaseExtension
android.compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}

tasks.whenTaskAdded {
if (name == "generateMetadataFileForAarPublication") {
dependsOn("androidSourcesJar")
Expand Down
2 changes: 1 addition & 1 deletion mockposable/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION_NAME=0.12-SNAPSHOT
VERSION_NAME=0.13-SNAPSHOT
GROUP=com.jeppeman.mockposable

POM_DESCRIPTION=A tool that enables stubbing and verification of @Composable-annotated functions
Expand Down
5 changes: 0 additions & 5 deletions mockposable/mockposable-compiler/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ plugins {
id("com.google.devtools.ksp")
}

java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

dependencies {
compileOnly(libs.kotlin.compiler)
implementation(libs.autoservice.annotations)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ android {
buildFeatures {
compose = true
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
}

dependencies {
Expand Down

0 comments on commit 92d7beb

Please sign in to comment.