- CMP 1.8.0-alpha02
- Serialization 1.8.0
- CMP 1.7.2
- Kotlin 2.1.0
- KSP 1.0.29
- CMP 1.7.1
- Removes junit dependencies
- Migrates to ZacSweers/kotlin-compile-testing
- Fixes type resolve for Functions when
ksp.useKSP2=true
- Adds generics to List, Map, MutableList and MutableMap
- CMP 1.7.0
- Kotlin 2.0.21
- KSP 1.0.25
- CMP 1.7.0-rc01
- Adds exception print to ModuleDecodeException
- Fixes
getFrameworkMetadataFromDisk()
throwing not found for cocoapods projects
- CMP 1.7.0-beta01
- KSP 1.0.25
- Kotlin 2.0.20
- KSP 1.0.24
- Adds
experimentalNamespaceFeature
flag to enable/disable experimental feature to import types from external modules. Read more in CHANGELOG.md#2020-beta1-1611-beta-4
- Fixes EmptyFrameworkBaseNameException bug (incorrectly using
contains
instead ofstartsWith
)
- Fixes EmptyFrameworkBaseNameException bug
- Adds experimental feature to import types from external modules.
Caution
Theres an actual limitation on Kotlin Multiplatform where each binary framework is compiled as a "closed world“, meaning it's not possible to pass custom type between two frameworks even it’s the same in Kotlin.
Let’s say I have two modules, shared
and shared-models
, each providing their own binary frameworks: “Shared” and “SharedModels” respectively. The shared-models
contains a data class Hello
, and the shared
module implements(project(":shared-models"))
and has a public method that takes Hello
as a parameter.
When these modules are exported to Swift, we see the following:
SharedModels: public class Hello : KotlinBase
Shared: public class Shared_modelsHello : KotlinBase
Shared: open func update(state: Shared_modelsHello)
Instead of:
SharedModels: public class Hello : KotlinBase
Shared: open func update(state: Hello)
It means that the "Shared" framework will include all this external dependencies (from the "SharedModel" in this case) and will generate new types to reference those external types. That's why we endup having Shared_modelsHello
instead of just Hello
.
A workaround to "solve" this limitation is to use the export()
function (inside binaries.framework
configuration) to add a dependency to be exported in the framework.
iosTarget.binaries.framework {
baseName = "Shared"
export(projects.sharedModels)
}
When using this approach this experimental feature should be disabled.
Modules that provide external dependencies must include the plugin in their build.gradle
:
plugins {
id("io.github.guilhe.kmp.plugin-composeuiviewcontroller")
}
ComposeUiViewController {
autoExport = false
}
- Adds all KMP targets available to
kmp-composeuiviewcontroller-annotations
- Compatible with Plugin 1.1.0
- Prepares Processor for Plugin 1.1.0 where it will be capable of checking for compilerArgs
- Kotlin 2.0.20-Beta1
- KSP 1.0.22
- Improves
exportToXcode.sh
- Renames iosApp sample to Gradient
- Compose Multiplatform 1.6.11
Reverts @ComposeUIViewController
default parameter to SharedComposables
@ComposeUIViewController
uses ComposeApp
as default parameter to match Kotlin Multiplatform Wizard
Removes the necessity for default values of @ComposeUIViewControllerState
Allows @ComposeUIViewController
without @ComposeUIViewControllerState
for simples wrapper cases.
- Gradle wrapper 8.6
From now on KMP-ComposeUIViewController
version will map Kotlin
and Compose Multiplatform
versions
- Kotlin 2.0.0
- KSP 1.0.21
- Kotlin 2.0.0-RC3
- Compose 1.6.10
- Kotlin 2.0.0-RC2
- Kotlin 2.0.0-RC1
- KSP 1.0.20
- Kotlin 1.9.23
- KSP 1.0.19
- Adds
indentParameters
andremoveAdjacentEmptyLines
for better code indentation in.swift
files.
- Fixes Processor bug in
getFrameworkNameFromAnnotations()
function that was accepting empty values
- Fixes Processor bug where functions that should be discarded from the analysis were not
- Sample updated with a use-case with a function parameter with a Kotlin primitive type
Adds kotlinTypeToSwift
function to reflect https://kotlinlang.org/docs/apple-framework.html#generated-framework-headers
- Kotlin 1.9.22
- KSP 1.0.17
- Kotlin 1.9.21
- KSP 1.0.15
- Kotlin 1.9.20
- KSP 1.0.13
- Adds capability to generate
.swift
files withUIViewControllerRepresentables
. - Adds script to include those generated files into
xcodeproj
to be accessible in iOS project;
Hello world!