Skip to content

Commit

Permalink
JVM toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbel committed Jul 15, 2024
1 parent 4b212d1 commit 91f5d00
Show file tree
Hide file tree
Showing 34 changed files with 302 additions and 322 deletions.
4 changes: 0 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,4 @@ subprojects {
if (name != "desktopApp") {
apply(plugin = "io.gitlab.arturbosch.detekt")
}
}

extra.apply {
set("jvmTarget", "11")
}
16 changes: 9 additions & 7 deletions core/analytics/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi

plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.android.library)
}

kotlin {
androidTarget {
compilations.all {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
}
androidTarget()
jvm("desktop")

sourceSets {
Expand All @@ -22,6 +20,10 @@ kotlin {
implementation(libs.bundles.koin.android)
}
}

compilerOptions {
jvmToolchain(libs.versions.jdk.get().toInt())
}
}

android {
Expand Down
16 changes: 9 additions & 7 deletions core/common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi

plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.compose)
Expand All @@ -6,13 +10,7 @@ plugins {
}

kotlin {
androidTarget {
compilations.all {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
}
androidTarget()
jvm("desktop")

sourceSets {
Expand Down Expand Up @@ -41,6 +39,10 @@ kotlin {
api(libs.bundles.jetbrains.androidx.lifecycle.viewmodel.compose.common)
}
}

compilerOptions {
jvmToolchain(libs.versions.jdk.get().toInt())
}
}

android {
Expand Down
16 changes: 9 additions & 7 deletions core/interactor/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi

plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.compose)
Expand All @@ -6,13 +10,7 @@ plugins {
}

kotlin {
androidTarget {
compilations.all {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
}
androidTarget()
jvm("desktop")

sourceSets {
Expand All @@ -25,6 +23,10 @@ kotlin {
implementation(libs.bundles.room.paging.common)
}
}

compilerOptions {
jvmToolchain(libs.versions.jdk.get().toInt())
}
}

android {
Expand Down
16 changes: 9 additions & 7 deletions core/navigation/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi

plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.android.library)
}

kotlin {
androidTarget {
compilations.all {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
}
androidTarget()
jvm("desktop")

sourceSets {
Expand All @@ -26,6 +24,10 @@ kotlin {
api(libs.bundles.jetbrains.androidx.lifecycle.viewmodel.compose.common)
}
}

compilerOptions {
jvmToolchain(libs.versions.jdk.get().toInt())
}
}

android {
Expand Down
15 changes: 8 additions & 7 deletions core/network/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)

import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
import com.codingfeline.buildkonfig.compiler.FieldSpec.Type.STRING
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi

plugins {
alias(libs.plugins.kotlin.multiplatform)
Expand All @@ -15,13 +18,7 @@ private val tmdbApiKey: String by lazy {
}

kotlin {
androidTarget {
compilations.all {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
}
androidTarget()
jvm("desktop")

sourceSets {
Expand All @@ -37,6 +34,10 @@ kotlin {
implementation(libs.bundles.koin.android)
}
}

compilerOptions {
jvmToolchain(libs.versions.jdk.get().toInt())
}
}

android {
Expand Down
16 changes: 9 additions & 7 deletions core/notifications/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi

plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.android.library)
}

kotlin {
androidTarget {
compilations.all {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
}
androidTarget()
jvm("desktop")

sourceSets {
Expand All @@ -19,6 +17,10 @@ kotlin {
implementation(project(":core:ui"))
}
}

compilerOptions {
jvmToolchain(libs.versions.jdk.get().toInt())
}
}

android {
Expand Down
16 changes: 9 additions & 7 deletions core/persistence/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi

plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.android.library)
Expand All @@ -6,13 +10,7 @@ plugins {
}

kotlin {
androidTarget {
compilations.all {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
}
androidTarget()
jvm("desktop")

sourceSets {
Expand All @@ -32,6 +30,10 @@ kotlin {
implementation(libs.bundles.datastore.desktop)
}
}

compilerOptions {
jvmToolchain(libs.versions.jdk.get().toInt())
}
}

android {
Expand Down
16 changes: 9 additions & 7 deletions core/platform-services/foss/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi

plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.android.library)
}

kotlin {
androidTarget {
compilations.all {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
}
androidTarget()
jvm("desktop")

sourceSets {
Expand All @@ -20,6 +18,10 @@ kotlin {
implementation(libs.bundles.koin.common)
}
}

compilerOptions {
jvmToolchain(libs.versions.jdk.get().toInt())
}
}

android {
Expand Down
16 changes: 9 additions & 7 deletions core/platform-services/gms/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi

plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.android.library)
}

kotlin {
androidTarget {
compilations.all {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
}
androidTarget()
jvm("desktop")

sourceSets {
Expand All @@ -26,6 +24,10 @@ kotlin {
implementation(libs.bundles.koin.android)
}
}

compilerOptions {
jvmToolchain(libs.versions.jdk.get().toInt())
}
}

android {
Expand Down
16 changes: 9 additions & 7 deletions core/platform-services/hms/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi

plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.android.library)
}

kotlin {
androidTarget {
compilations.all {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
}
androidTarget()
jvm("desktop")

sourceSets {
Expand All @@ -20,6 +18,10 @@ kotlin {
implementation(libs.bundles.koin.common)
}
}

compilerOptions {
jvmToolchain(libs.versions.jdk.get().toInt())
}
}

android {
Expand Down
16 changes: 9 additions & 7 deletions core/platform-services/inject-android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi

plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.android.library)
}

kotlin {
androidTarget {
compilations.all {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
}
androidTarget()
jvm("desktop")

sourceSets {
Expand All @@ -22,6 +20,10 @@ kotlin {
implementation(libs.bundles.koin.android)
}
}

compilerOptions {
jvmToolchain(libs.versions.jdk.get().toInt())
}
}

android {
Expand Down
Loading

0 comments on commit 91f5d00

Please sign in to comment.