From dc6ca8f651fe6eb516fce63405b1c338eae2fa62 Mon Sep 17 00:00:00 2001
From: Romain BOISSELLE <romain.boisselle@proton.me>
Date: Thu, 29 Sep 2022 21:19:23 +0200
Subject: [PATCH] Kotlin 1.7.20

---
 README.md                                                 | 1 +
 build.gradle.kts                                          | 2 +-
 doc/antora.yml                                            | 8 ++++----
 doc/modules/framework/pages/compose.adoc                  | 4 ++++
 .../compose/kodein-di-framework-compose/build.gradle.kts  | 4 ++++
 .../kotlin/org/kodein/di/compose/nativeContext.kt}        | 0
 .../src/jsMain/kotlin/org/kodein/di/compose/jsContext.kt  | 6 ++++++
 settings.gradle.kts                                       | 2 +-
 8 files changed, 21 insertions(+), 6 deletions(-)
 rename framework/compose/kodein-di-framework-compose/src/{jsMain/kotlin/org/kodein/di/compose/jvmContext.kt => allNativeMain/kotlin/org/kodein/di/compose/nativeContext.kt} (100%)
 create mode 100644 framework/compose/kodein-di-framework-compose/src/jsMain/kotlin/org/kodein/di/compose/jsContext.kt

diff --git a/README.md b/README.md
index 1a7e1016..46eea494 100644
--- a/README.md
+++ b/README.md
@@ -63,6 +63,7 @@ Kotlin & JVM compatibility
 
 |   Kodein    | Kotlin |   JDK   |  Compose   |
 |:-----------:|:------:|:-------:|:----------:|
+|   7.15.0    | 1.7.20 | min 1.8 |     No     |
 |   7.14.0    | 1.7.10 | min 1.8 | Compatible |
 |   7.13.1    | 1.7.0  | min 1.8 | Compatible |
 |   7.13.0    | 1.7.0  | min 1.8 |     No     |
diff --git a/build.gradle.kts b/build.gradle.kts
index 857300d9..72201e78 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -4,5 +4,5 @@ plugins {
 
 allprojects {
     group = "org.kodein.di"
-    version = "7.15.0-kotlin-1.7.20-RC"
+    version = "7.15.0"
 }
diff --git a/doc/antora.yml b/doc/antora.yml
index 45ceb8d1..e523a2e5 100644
--- a/doc/antora.yml
+++ b/doc/antora.yml
@@ -1,7 +1,7 @@
 name: kodein-di
 title: Kodein-DI
-version: '7.15.0-kotlin-1.7.20-RC'
-display_version: '7.15.0-kotlin-1.7.20-RC'
+version: '7.15'
+display_version: '7.15.0'
 nav:
   - modules/ROOT/nav.adoc
   - modules/core/nav.adoc
@@ -10,6 +10,6 @@ nav:
   - modules/migration/nav.adoc
 asciidoc:
   attributes:
-    version: '7.15.0-kotlin-1.7.20-RC'
-    kotlin: '1.7.20-RC'
+    version: '7.15.0'
+    kotlin: '1.7.20'
     jdk: '1.8'
\ No newline at end of file
diff --git a/doc/modules/framework/pages/compose.adoc b/doc/modules/framework/pages/compose.adoc
index 2af46fea..0fcf07d5 100644
--- a/doc/modules/framework/pages/compose.adoc
+++ b/doc/modules/framework/pages/compose.adoc
@@ -13,6 +13,10 @@ Here is a table containing the version compatibility:
 |===
 |Kodein-DI |Compose compiler |Kotlin
 
+|7.15.0
+|NOT COMPATIBLE
+|1.7.20
+
 |7.15.0-kotlin-1.7.20-RC
 |NOT COMPATIBLE
 |1.7.20
diff --git a/framework/compose/kodein-di-framework-compose/build.gradle.kts b/framework/compose/kodein-di-framework-compose/build.gradle.kts
index 9e391cb7..7829d6b6 100644
--- a/framework/compose/kodein-di-framework-compose/build.gradle.kts
+++ b/framework/compose/kodein-di-framework-compose/build.gradle.kts
@@ -22,6 +22,10 @@ kodein {
         }
 
         add(kodeinTargets.js.ir.js)
+
+        // iosX32 not supported by jetbrains compose
+        add(kodeinTargets.native.iosX64)
+        add(kodeinTargets.native.iosArm64)
     }
 }
 
diff --git a/framework/compose/kodein-di-framework-compose/src/jsMain/kotlin/org/kodein/di/compose/jvmContext.kt b/framework/compose/kodein-di-framework-compose/src/allNativeMain/kotlin/org/kodein/di/compose/nativeContext.kt
similarity index 100%
rename from framework/compose/kodein-di-framework-compose/src/jsMain/kotlin/org/kodein/di/compose/jvmContext.kt
rename to framework/compose/kodein-di-framework-compose/src/allNativeMain/kotlin/org/kodein/di/compose/nativeContext.kt
diff --git a/framework/compose/kodein-di-framework-compose/src/jsMain/kotlin/org/kodein/di/compose/jsContext.kt b/framework/compose/kodein-di-framework-compose/src/jsMain/kotlin/org/kodein/di/compose/jsContext.kt
new file mode 100644
index 00000000..2ca10d51
--- /dev/null
+++ b/framework/compose/kodein-di-framework-compose/src/jsMain/kotlin/org/kodein/di/compose/jsContext.kt
@@ -0,0 +1,6 @@
+package org.kodein.di.compose
+
+import org.kodein.di.DI
+
+
+internal actual fun diFromAppContext(): DI = error("Missing DI container!")
diff --git a/settings.gradle.kts b/settings.gradle.kts
index ea89e069..e0921c60 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:6.20.2-kotlin-1.7.20-RC")
+        classpath("org.kodein.internal.gradle:kodein-internal-gradle-settings:6.21.0")
     }
 }