From d1e69e22980fd2d6711439976f066f80f0a4c058 Mon Sep 17 00:00:00 2001 From: Romain Boisselle Date: Sun, 26 Mar 2023 23:27:54 +0200 Subject: [PATCH] Kotlin 1.8.10 --- .../compose/kodein-di-framework-compose/build.gradle.kts | 8 +++++--- .../compose/kodein-di-framework-compose/gradle.properties | 3 ++- .../kotlin/org/kodein/di/compose/androidContext.kt | 1 - .../kotlin/org/kodein/di/compose/retrievingAndroid.kt | 3 ++- .../commonMain/kotlin/org.kodein.di.compose/retrieving.kt | 8 ++++++-- .../src/commonMain/kotlin/org.kodein.di.compose/withDI.kt | 5 ++++- gradle.properties | 1 + gradle/libs.versions.toml | 6 +++--- gradle/wrapper/gradle-wrapper.properties | 2 +- kodein-di/build.gradle.kts | 2 +- settings.gradle.kts | 2 +- 11 files changed, 26 insertions(+), 15 deletions(-) diff --git a/framework/compose/kodein-di-framework-compose/build.gradle.kts b/framework/compose/kodein-di-framework-compose/build.gradle.kts index 3df9adf3..cc0a300c 100644 --- a/framework/compose/kodein-di-framework-compose/build.gradle.kts +++ b/framework/compose/kodein-di-framework-compose/build.gradle.kts @@ -10,9 +10,7 @@ kodein { api(projects.kodeinDi) } - add(kodeinTargets.jvm.jvm) { - target.setCompileClasspath() - } + add(kodeinTargets.jvm.jvm) add(kodeinTargets.jvm.android) { main.dependencies { @@ -26,6 +24,10 @@ kodein { // iosX32 not supported by jetbrains compose add(kodeinTargets.native.iosX64) add(kodeinTargets.native.iosArm64) + add(kodeinTargets.native.iosSimulatorArm64) + + add(kodeinTargets.native.macosX64) + add(kodeinTargets.native.macosArm64) } } diff --git a/framework/compose/kodein-di-framework-compose/gradle.properties b/framework/compose/kodein-di-framework-compose/gradle.properties index f3c3c8c7..83a33674 100644 --- a/framework/compose/kodein-di-framework-compose/gradle.properties +++ b/framework/compose/kodein-di-framework-compose/gradle.properties @@ -1,4 +1,5 @@ # Disable compatibility with non-hierarchical projects # https://kotlinlang.org/docs/multiplatform-hierarchy.html#for-library-authors # This is not compatible with Compose JB -kotlin.mpp.enableCompatibilityMetadataVariant=false \ No newline at end of file +kotlin.mpp.enableCompatibilityMetadataVariant=false +kotlin.native.ignoreIncorrectDependencies=true \ No newline at end of file diff --git a/framework/compose/kodein-di-framework-compose/src/androidMain/kotlin/org/kodein/di/compose/androidContext.kt b/framework/compose/kodein-di-framework-compose/src/androidMain/kotlin/org/kodein/di/compose/androidContext.kt index c52c0fa3..17a78b23 100644 --- a/framework/compose/kodein-di-framework-compose/src/androidMain/kotlin/org/kodein/di/compose/androidContext.kt +++ b/framework/compose/kodein-di-framework-compose/src/androidMain/kotlin/org/kodein/di/compose/androidContext.kt @@ -2,7 +2,6 @@ package org.kodein.di.compose import android.content.Context import androidx.compose.runtime.Composable -import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.remember import androidx.compose.ui.platform.LocalContext import org.kodein.di.DI diff --git a/framework/compose/kodein-di-framework-compose/src/androidMain/kotlin/org/kodein/di/compose/retrievingAndroid.kt b/framework/compose/kodein-di-framework-compose/src/androidMain/kotlin/org/kodein/di/compose/retrievingAndroid.kt index a29c6786..85f275dd 100644 --- a/framework/compose/kodein-di-framework-compose/src/androidMain/kotlin/org/kodein/di/compose/retrievingAndroid.kt +++ b/framework/compose/kodein-di-framework-compose/src/androidMain/kotlin/org/kodein/di/compose/retrievingAndroid.kt @@ -6,7 +6,8 @@ import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelLazy import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.viewmodel.compose.LocalViewModelStoreOwner -import org.kodein.di.* +import org.kodein.di.direct +import org.kodein.di.instance /** * Gets an instance of a [VM] as an android [ViewModel] for the given [tag]. diff --git a/framework/compose/kodein-di-framework-compose/src/commonMain/kotlin/org.kodein.di.compose/retrieving.kt b/framework/compose/kodein-di-framework-compose/src/commonMain/kotlin/org.kodein.di.compose/retrieving.kt index 95f2e7dc..b0df9b9d 100644 --- a/framework/compose/kodein-di-framework-compose/src/commonMain/kotlin/org.kodein.di.compose/retrieving.kt +++ b/framework/compose/kodein-di-framework-compose/src/commonMain/kotlin/org.kodein.di.compose/retrieving.kt @@ -3,9 +3,13 @@ package org.kodein.di.compose import androidx.compose.runtime.Composable import androidx.compose.runtime.DisallowComposableCalls import androidx.compose.runtime.remember -import org.kodein.di.* +import org.kodein.di.DI +import org.kodein.di.LazyDelegate +import org.kodein.di.factory +import org.kodein.di.instance +import org.kodein.di.named +import org.kodein.di.provider import kotlin.reflect.KProperty -import kotlin.reflect.typeOf /** * A property delegate provider for DI retrieval in a Composable tree. diff --git a/framework/compose/kodein-di-framework-compose/src/commonMain/kotlin/org.kodein.di.compose/withDI.kt b/framework/compose/kodein-di-framework-compose/src/commonMain/kotlin/org.kodein.di.compose/withDI.kt index 6a5d5159..37427498 100644 --- a/framework/compose/kodein-di-framework-compose/src/commonMain/kotlin/org.kodein.di.compose/withDI.kt +++ b/framework/compose/kodein-di-framework-compose/src/commonMain/kotlin/org.kodein.di.compose/withDI.kt @@ -2,7 +2,10 @@ package org.kodein.di.compose import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider -import org.kodein.di.* +import org.kodein.di.DI +import org.kodein.di.DIContext +import org.kodein.di.On +import org.kodein.di.diContext /** * Attaches a [DI] container to the underlying [Composable] tree diff --git a/gradle.properties b/gradle.properties index 5a7688eb..9013ff01 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,6 +11,7 @@ kotlin.mpp.stability.nowarn=true # To enable compatibility with non-hierarchical projects # https://kotlinlang.org/docs/multiplatform-hierarchy.html#for-library-authors kotlin.mpp.enableCompatibilityMetadataVariant=true +kotlin.mpp.androidSourceSetLayoutVersion1.nowarn=true # Android android.useAndroidX = true \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d1cb26eb..d5dd212a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,16 +1,16 @@ [versions] # Core -kaverit-version = "2.3.0" +kaverit-version = "2.4.0" # Android android-appcompat-version = "28.0.0" androidx-appcompat-version = "1.5.1" androidx-fragment-version = "1.5.4" androidx-lifecycle-version = "2.5.1" # Compose -compose-version = "1.3.0-rc02" +compose-version = "1.3.1" # KSP kotlinpoet-version = "1.12.0" -ksp-version = "1.8.0-1.0.8" +ksp-version = "1.8.10-1.0.9" # Ktor ktor-version = "2.2.3" # JxInject diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3c472b99..ceccc3a8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip diff --git a/kodein-di/build.gradle.kts b/kodein-di/build.gradle.kts index 3825dba8..ad89375d 100644 --- a/kodein-di/build.gradle.kts +++ b/kodein-di/build.gradle.kts @@ -18,7 +18,7 @@ kodein { } add(kodeinTargets.js.js) - add(kodeinTargets.native.allDarwin) + add(kodeinTargets.native.all) } } diff --git a/settings.gradle.kts b/settings.gradle.kts index 7a47cbf8..ff7004ed 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -6,7 +6,7 @@ buildscript { maven(url = "https://raw.githubusercontent.com/kosi-libs/kodein-internal-gradle-plugin/mvn-repo") } dependencies { - classpath("org.kodein.internal.gradle:kodein-internal-gradle-settings:7.0.2") + classpath("org.kodein.internal.gradle:kodein-internal-gradle-settings:7.0.5") } }