Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Downgrade source and targetCompatibility #36

Merged
merged 1 commit into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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