diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 078bc474..a485befe 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -35,11 +35,6 @@ android { versionName = Configuration.versionName multiDexEnabled = true } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } } dependencies { diff --git a/benchmark-landscapist-app/build.gradle.kts b/benchmark-landscapist-app/build.gradle.kts index 7e275c5f..7e6dfed2 100644 --- a/benchmark-landscapist-app/build.gradle.kts +++ b/benchmark-landscapist-app/build.gradle.kts @@ -27,7 +27,7 @@ android { compileSdk = Configuration.compileSdk defaultConfig { applicationId = "com.skydoves.benchmark.landscapist.app" - minSdk = 23 + minSdk = 24 targetSdk = Configuration.targetSdk versionCode = Configuration.versionCode versionName = Configuration.versionName diff --git a/benchmark-landscapist/build.gradle.kts b/benchmark-landscapist/build.gradle.kts index b0466f28..dca8abdd 100644 --- a/benchmark-landscapist/build.gradle.kts +++ b/benchmark-landscapist/build.gradle.kts @@ -35,8 +35,8 @@ android { } compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 } targetProjectPath = ":benchmark-landscapist-app" diff --git a/build-logic/convention/src/main/kotlin/AndroidLibraryComposeConventionPlugin.kt b/build-logic/convention/src/main/kotlin/AndroidLibraryComposeConventionPlugin.kt index fd813a05..a39c93ba 100644 --- a/build-logic/convention/src/main/kotlin/AndroidLibraryComposeConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/AndroidLibraryComposeConventionPlugin.kt @@ -20,8 +20,11 @@ import com.skydoves.landscapist.configureKotlinAndroid import com.skydoves.landscapist.kotlinOptions import org.gradle.api.Plugin import org.gradle.api.Project +import org.gradle.api.artifacts.VersionCatalogsExtension +import org.gradle.api.tasks.compile.JavaCompile import org.gradle.kotlin.dsl.configure import org.gradle.kotlin.dsl.dependencies +import org.gradle.kotlin.dsl.getByType class AndroidLibraryComposeConventionPlugin : Plugin { override fun apply(target: Project) { @@ -41,6 +44,12 @@ class AndroidLibraryComposeConventionPlugin : Plugin { } } + val libs = extensions.getByType().named("libs") + tasks.withType(JavaCompile::class.java).configureEach { + this.targetCompatibility = libs.findVersion("jvmTarget").get().toString() + this.sourceCompatibility = libs.findVersion("jvmTarget").get().toString() + } + dependencies { add("baselineProfile", project(":benchmark-landscapist")) } diff --git a/build-logic/convention/src/main/kotlin/com/skydoves/landscapist/KotlinAndroid.kt b/build-logic/convention/src/main/kotlin/com/skydoves/landscapist/KotlinAndroid.kt index 29d677d1..1724e8e8 100644 --- a/build-logic/convention/src/main/kotlin/com/skydoves/landscapist/KotlinAndroid.kt +++ b/build-logic/convention/src/main/kotlin/com/skydoves/landscapist/KotlinAndroid.kt @@ -23,6 +23,7 @@ import org.gradle.api.JavaVersion import org.gradle.api.Project import org.gradle.api.artifacts.VersionCatalogsExtension import org.gradle.api.plugins.ExtensionAware +import org.gradle.api.tasks.compile.JavaCompile import org.gradle.kotlin.dsl.dependencies import org.gradle.kotlin.dsl.getByType import org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions @@ -38,8 +39,8 @@ internal fun Project.configureKotlinAndroid( commonExtension.apply { compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 } kotlinOptions { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9af0c8e2..bb822b7c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] kotlin = "1.9.0" dokka = "1.8.20" -jvmTarget = "17" +jvmTarget = "11" nexusPlugin = "1.3.0" kotlinxCoroutines = "1.7.2" kotlinBinaryCompatibility = "0.13.2"