File tree Expand file tree Collapse file tree 6 files changed +31
-1637
lines changed
kotlin-inject/public/src/commonMain/kotlin/software/amazon/app/platform/scope/di
metro/public/src/commonMain/kotlin/software/amazon/app/platform/scope/di/metro Expand file tree Collapse file tree 6 files changed +31
-1637
lines changed Original file line number Diff line number Diff line change @@ -567,12 +567,6 @@ and generated wrong code. This ticket is [metro/997](https://github.com/ZacSweer
567567
568568Other IC issues are reported under [ KT-75865] ( https://youtrack.jetbrains.com/issue/KT-75865 ) .
569569
570- #### ` exclude ` / ` replaces ` not support
571-
572- ` kotlin-inject-anvil ` allows you to exclude and replace contribution that use custom annotations like
573- ` @ContributesRenderer ` . Metro is missing this feature and the generated files have to be referenced instead. The
574- ticket is [ metro/1020] ( https://github.com/ZacSweers/metro/issues/1020 ) .
575-
576570#### Missing integrations
577571
578572Almost all App Platform specific custom extensions for ` kotlin-inject-anvil ` were migrated to Metro, including
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ kotlin.mpp.stability.nowarn=true
1313kotlin.mpp.androidSourceSetLayoutVersion =2
1414kotlin.mpp.enableCInteropCommonization =true
1515kotlin.native.distribution.downloadFromMaven =true
16- kotlin.native.enableKlibsCrossCompilation =true
16+ # There are sometimes build errors and the error suggests to enable this flag.
17+ kotlin.native.cacheKind.iosSimulatorArm64 =none
1718
1819ksp.useKSP2 =true
1920
Original file line number Diff line number Diff line change 11[versions ]
2- agp = " 8.12 .0"
2+ agp = " 8.13 .0"
33android-compileSdk = " 36"
44# https://developer.android.com/jetpack/androidx/releases/compose-ui
55# https://maven.google.com/web/index.html#androidx.compose.ui:ui
@@ -35,7 +35,7 @@ detekt = "1.23.8"
3535graphviz-java = " 0.18.1"
3636jvm-compatibility = " 11"
3737jvm-gradle = " 17"
38- kotlin = " 2.2.10 "
38+ kotlin = " 2.2.20 "
3939kotlin-atomicfu = " 0.29.0"
4040kotlin-compile-testing = " 0.8.0"
4141kotlin-hierarchy = " 1.1"
@@ -44,9 +44,9 @@ kotlin-inject-anvil = "0.1.6"
4444kotlin-poet = " 2.2.0"
4545kotlinx-binaryCompatibilityValidator = " 0.18.1"
4646ktfmt-gradle = " 0.23.0"
47- ksp = " 2.2.10 -2.0.2"
47+ ksp = " 2.2.20 -2.0.2"
4848maven-publish = " 0.34.0"
49- metro = " 0.6.5 "
49+ metro = " 0.6.6 "
5050molecule = " 2.1.0"
5151navigation3 = " 1.0.0-alpha06"
5252# noinspection GradleDependency
Original file line number Diff line number Diff line change @@ -30,14 +30,7 @@ public inline fun <reified T : Any> Scope.diComponent(): T = kotlinInjectCompone
3030 */
3131public inline fun <reified T : Any > Scope.kotlinInjectComponent (): T {
3232 parents(includeSelf = true )
33- .firstNotNullOfOrNull { scope ->
34- val component = scope.getService<T >(DI_COMPONENT_KEY )
35- if (T ::class .isInstance(component)) {
36- component
37- } else {
38- null
39- }
40- }
33+ .firstNotNullOfOrNull { scope -> scope.getService<Any >(DI_COMPONENT_KEY ) as ? T }
4134 ?.let {
4235 return it
4336 }
You can’t perform that action at this time.
0 commit comments