Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Upgrade Kotlin / KSP / Compose Multiplatform #548

Closed
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ kotlin {
implementation(kotlin("test"))
}
}
val androidTest by getting {
val androidUnitTest by getting {
dependencies {
implementation(libs.junit)
}
Expand Down
2 changes: 1 addition & 1 deletion appyx-components/stable/spotlight/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ kotlin {
implementation(kotlin("test"))
}
}
val androidTest by getting {
val androidUnitTest by getting {
dependencies {
implementation(libs.junit)
}
Expand Down
2 changes: 1 addition & 1 deletion appyx-interactions/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ kotlin {
api(libs.androidx.core)
}
}
val androidTest by getting {
val androidUnitTest by getting {
dependencies {
implementation(libs.junit)
}
Expand Down
110 changes: 88 additions & 22 deletions appyx-navigation/lint-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,37 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 7.1.3" type="baseline" client="gradle" dependencies="false" name="AGP (7.1.3)" variant="all" version="7.1.3">
<issues format="6" by="lint 7.4.1" type="baseline" client="gradle" dependencies="false" name="AGP (7.4.1)" variant="all" version="7.4.1">

<issue
id="ComposableNaming"
message="Composable functions that return Unit should start with an uppercase letter"
errorLine1=" fun ParentNode&lt;T>.children("
errorLine2=" ~~~~~~~~">
id="NewApi"
message="Call requires API level 24 (current min is 21): `java.lang.Iterable#forEach`"
errorLine1=" .forEach { elementUiModel ->"
errorLine2=" ~~~~~~~">
<location
file="src/main/kotlin/com/bumble/appyx/core/composable/Children.kt"
line="90"
column="23"/>
file="src/main/kotlin/com/bumble/appyx/navigation/composable/AppyxComponent.kt"
line="133"
column="14"/>
</issue>

<issue
id="ComposableNaming"
message="Composable functions that return Unit should start with an uppercase letter"
errorLine1=" fun ParentNode&lt;T>.children("
errorLine2=" ~~~~~~~~">
id="NewApi"
message="Call requires API level 24 (current min is 21): `java.lang.Iterable#forEach`"
errorLine1=" activeNodes.forEach { node ->"
errorLine2=" ~~~~~~~">
<location
file="src/main/kotlin/com/bumble/appyx/core/composable/Children.kt"
line="102"
column="23"/>
file="src/main/kotlin/com/bumble/appyx/navigation/children/ChildAwareCallbackInfo.kt"
line="35"
column="25"/>
</issue>

<issue
id="ComposableNaming"
message="Composable functions that return Unit should start with an uppercase letter"
errorLine1=" private fun ParentNode&lt;T>._children("
errorLine2=" ~~~~~~~~~">
id="NewApi"
message="Call requires API level 24 (current min is 21): `java.lang.Iterable#forEach`"
errorLine1=" .forEach { entry -> entry.setState(Lifecycle.State.DESTROYED) }"
errorLine2=" ~~~~~~~">
<location
file="src/main/kotlin/com/bumble/appyx/core/composable/Children.kt"
line="118"
column="31"/>
file="src/main/kotlin/com/bumble/appyx/navigation/lifecycle/ChildNodeLifecycleManager.kt"
line="61"
column="26"/>
</issue>

<issue
id="NewApi"
message="Call requires API level 24 (current min is 21): `java.lang.Iterable#forEach`"
errorLine1=" screenState.onScreen.forEach { key ->"
errorLine2=" ~~~~~~~">
<location
file="src/main/kotlin/com/bumble/appyx/navigation/lifecycle/ChildNodeLifecycleManager.kt"
line="64"
column="42"/>
</issue>

<issue
id="NewApi"
message="Call requires API level 24 (current min is 21): `java.lang.Iterable#forEach`"
errorLine1=" screenState.offScreen.forEach { key ->"
errorLine2=" ~~~~~~~">
<location
file="src/main/kotlin/com/bumble/appyx/navigation/lifecycle/ChildNodeLifecycleManager.kt"
line="69"
column="43"/>
</issue>

<issue
id="NewApi"
message="Call requires API level 24 (current min is 21): `java.lang.Iterable#forEach`"
errorLine1=" plugins&lt;NodeReadyObserver&lt;Node>>().forEach { it.init(this) }"
errorLine2=" ~~~~~~~">
<location
file="src/main/kotlin/com/bumble/appyx/navigation/node/Node.kt"
line="112"
column="44"/>
</issue>

<issue
id="NewApi"
message="Call requires API level 24 (current min is 21): `java.lang.Iterable#forEach`"
errorLine1=" plugins&lt;NodeLifecycleAware>().forEach { it.onCreate(lifecycle) }"
errorLine2=" ~~~~~~~">
<location
file="src/main/kotlin/com/bumble/appyx/navigation/node/Node.kt"
line="113"
column="39"/>
</issue>

<issue
id="NewApi"
message="Call requires API level 24 (current min is 21): `java.lang.Iterable#forEach`"
errorLine1=" plugins&lt;Destroyable>().forEach { it.destroy() }"
errorLine2=" ~~~~~~~">
<location
file="src/main/kotlin/com/bumble/appyx/navigation/node/Node.kt"
line="150"
column="36"/>
</issue>

<issue
id="NewApi"
message="Call requires API level 24 (current min is 21): `java.lang.Iterable#forEach`"
errorLine1=" map.remove(storeId)?.values?.forEach { it.dispose() }"
errorLine2=" ~~~~~~~">
<location
file="src/main/kotlin/com/bumble/appyx/navigation/store/RetainedInstanceStoreImpl.kt"
line="25"
column="38"/>
</issue>

</issues>
13 changes: 12 additions & 1 deletion demos/appyx-interactions/android/lint-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 7.4.0" type="baseline" client="gradle" dependencies="false" name="AGP (7.4.0)" variant="all" version="7.4.0">
<issues format="6" by="lint 7.4.1" type="baseline" client="gradle" dependencies="false" name="AGP (7.4.1)" variant="all" version="7.4.1">

<issue
id="RememberReturnType"
message="`remember` calls must not return `Unit`"
errorLine1=" val anchors = remember(containerBounds) {"
errorLine2=" ~~~~~~~~">
<location
file="src/main/kotlin/com/bumble/appyx/interactions/sample/KnobControl.kt"
line="47"
column="19"/>
</issue>

</issues>
Loading