From 5d48fb76e5c9c9bfaf5c867ef7b9ae5b33cc38f0 Mon Sep 17 00:00:00 2001 From: Fabio Insolia Date: Wed, 23 Oct 2024 09:31:02 +0100 Subject: [PATCH 1/3] feature/PIMOB-2943_Create_SNAPSHOT_version_with_compose_update_fix feature/PIMOB-2943_Create_SNAPSHOT_version_with_compose_update_fix --- buildSrc/src/main/java/Versions.kt | 4 +- .../com/checkout/buildsrc/BaseDependencies.kt | 1 + example_app_frames/lint-baseline.xml | 110 ++++++++++++++---- frames/lint-baseline.xml | 24 +++- .../paymentdetails/PaymentDetailsScreen.kt | 2 +- 5 files changed, 113 insertions(+), 28 deletions(-) diff --git a/buildSrc/src/main/java/Versions.kt b/buildSrc/src/main/java/Versions.kt index 72b804f7b..2a4b6d49c 100644 --- a/buildSrc/src/main/java/Versions.kt +++ b/buildSrc/src/main/java/Versions.kt @@ -19,10 +19,10 @@ object Versions { const val appcompat = "1.3.1" const val constraintLayout = "2.1.1" const val materialDesign = "1.4.0" - const val lifeCycle = "2.5.1" + const val lifeCycle = "2.7.0" const val compose_compiler_ext = "1.5.3" const val compose_material3 = "1.1.2" - const val compose_version = "1.5.3" + const val compose_version = "1.7.2" const val compose_activity_version = "1.8.0" const val compose_customview_poolingcontainer = "1.0.0" const val compose_viewmodel = "2.6.2" diff --git a/buildSrc/src/main/java/com/checkout/buildsrc/BaseDependencies.kt b/buildSrc/src/main/java/com/checkout/buildsrc/BaseDependencies.kt index fbd630a9c..a9480f836 100644 --- a/buildSrc/src/main/java/com/checkout/buildsrc/BaseDependencies.kt +++ b/buildSrc/src/main/java/com/checkout/buildsrc/BaseDependencies.kt @@ -35,6 +35,7 @@ fun DependencyHandler.androidDeclarativeUI() { implementation(Dependencies.compose_ui_tooling_preview) implementation(Dependencies.compose_material3) implementation(Dependencies.lifecycle_viewmodel) + implementation(Dependencies.lifeCycleLiveData) implementation(Dependencies.compose_viewmodel) implementation(Dependencies.compose_navigation) implementation(Dependencies.compose_navigation_accompanist) diff --git a/example_app_frames/lint-baseline.xml b/example_app_frames/lint-baseline.xml index 30cf809ff..d1a542d0b 100644 --- a/example_app_frames/lint-baseline.xml +++ b/example_app_frames/lint-baseline.xml @@ -1,65 +1,129 @@ - + - + + + + + + + + + + + + - + - - + - - + - - + - - + - - + - - + - - + - - + - - - + + diff --git a/frames/lint-baseline.xml b/frames/lint-baseline.xml index fe369fe7e..88424d760 100644 --- a/frames/lint-baseline.xml +++ b/frames/lint-baseline.xml @@ -1,5 +1,25 @@ - + + + + + + + + + + + + + diff --git a/frames/src/main/java/com/checkout/frames/screen/paymentdetails/PaymentDetailsScreen.kt b/frames/src/main/java/com/checkout/frames/screen/paymentdetails/PaymentDetailsScreen.kt index 1b8090298..b42745132 100644 --- a/frames/src/main/java/com/checkout/frames/screen/paymentdetails/PaymentDetailsScreen.kt +++ b/frames/src/main/java/com/checkout/frames/screen/paymentdetails/PaymentDetailsScreen.kt @@ -15,10 +15,10 @@ import androidx.compose.runtime.rememberUpdatedState import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalFocusManager -import androidx.compose.ui.platform.LocalLifecycleOwner import androidx.compose.ui.platform.LocalSoftwareKeyboardController import androidx.lifecycle.DefaultLifecycleObserver import androidx.lifecycle.LifecycleOwner +import androidx.lifecycle.compose.LocalLifecycleOwner import androidx.lifecycle.viewmodel.compose.viewModel import androidx.navigation.NavController import com.checkout.frames.di.base.Injector From 5c617db7ec3bafb60683ad2d38aa0b9352fb4852 Mon Sep 17 00:00:00 2001 From: Fabio Insolia Date: Thu, 24 Oct 2024 23:25:00 +0100 Subject: [PATCH 2/3] Adding jetbrains kotlin plugin to app build.gradle --- app/build.gradle | 1 + buildSrc/src/main/java/Versions.kt | 2 +- .../src/main/java/com/checkout/buildsrc/BaseDependencies.kt | 1 - example_app_frames/lint-baseline.xml | 6 +++--- frames/lint-baseline.xml | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 4d99286a0..27bbfc181 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,5 +1,6 @@ plugins { id("com.android.application") + id("org.jetbrains.kotlin.android") } android { diff --git a/buildSrc/src/main/java/Versions.kt b/buildSrc/src/main/java/Versions.kt index 2a4b6d49c..b4ef5fdcf 100644 --- a/buildSrc/src/main/java/Versions.kt +++ b/buildSrc/src/main/java/Versions.kt @@ -19,7 +19,7 @@ object Versions { const val appcompat = "1.3.1" const val constraintLayout = "2.1.1" const val materialDesign = "1.4.0" - const val lifeCycle = "2.7.0" + const val lifeCycle = "2.5.1" const val compose_compiler_ext = "1.5.3" const val compose_material3 = "1.1.2" const val compose_version = "1.7.2" diff --git a/buildSrc/src/main/java/com/checkout/buildsrc/BaseDependencies.kt b/buildSrc/src/main/java/com/checkout/buildsrc/BaseDependencies.kt index a9480f836..fbd630a9c 100644 --- a/buildSrc/src/main/java/com/checkout/buildsrc/BaseDependencies.kt +++ b/buildSrc/src/main/java/com/checkout/buildsrc/BaseDependencies.kt @@ -35,7 +35,6 @@ fun DependencyHandler.androidDeclarativeUI() { implementation(Dependencies.compose_ui_tooling_preview) implementation(Dependencies.compose_material3) implementation(Dependencies.lifecycle_viewmodel) - implementation(Dependencies.lifeCycleLiveData) implementation(Dependencies.compose_viewmodel) implementation(Dependencies.compose_navigation) implementation(Dependencies.compose_navigation_accompanist) diff --git a/example_app_frames/lint-baseline.xml b/example_app_frames/lint-baseline.xml index d1a542d0b..8cae809b7 100644 --- a/example_app_frames/lint-baseline.xml +++ b/example_app_frames/lint-baseline.xml @@ -5,21 +5,21 @@ id="ObsoleteLintCustomCheck" message="Library lint checks reference invalid APIs; these checks **will be skipped**! Lint found an issue registry (`androidx.compose.runtime.lint.RuntimeIssueRegistry`) which contains some references to invalid API: org.jetbrains.kotlin.analysis.api.session.KtAnalysisSessionProvider: org.jetbrains.kotlin.analysis.api.lifetime.KtLifetimeTokenFactory getTokenFactory() (Referenced from androidx/compose/runtime/lint/AutoboxingStateCreationDetector.class) Therefore, this lint check library is **not** included in analysis. This affects the following lint checks: `AutoboxingStateValueProperty` `AutoboxingStateCreation` `CoroutineCreationDuringComposition` `FlowOperatorInvokedInComposition` `ComposableLambdaParameterNaming` `ComposableLambdaParameterPosition` `ComposableNaming` `StateFlowValueCalledInComposition` `CompositionLocalNaming` `MutableCollectionMutableState` `ProduceStateDoesNotAssignValue` `RememberReturnType` `OpaqueUnitKey` `UnrememberedMutableState` To use this lint check, upgrade to a more recent version of the library."> + file="$GRADLE_USER_HOME/caches/transforms-3/1722247d2fdea24a20de7c485c0f52fa/transformed/jetified-runtime-release/jars/lint.jar"/> + file="$GRADLE_USER_HOME/caches/transforms-3/85709128200ad5189d44a69e9890fcf9/transformed/jetified-ui-release/jars/lint.jar"/> + file="$GRADLE_USER_HOME/caches/transforms-3/3eef0617fe2986da3d2fb7faa7aaad80/transformed/lifecycle-livedata-core-2.8.3/jars/lint.jar"/> + file="$GRADLE_USER_HOME/caches/transforms-3/1722247d2fdea24a20de7c485c0f52fa/transformed/jetified-runtime-release/jars/lint.jar"/> + file="$GRADLE_USER_HOME/caches/transforms-3/85709128200ad5189d44a69e9890fcf9/transformed/jetified-ui-release/jars/lint.jar"/> + file="$GRADLE_USER_HOME/caches/transforms-3/3eef0617fe2986da3d2fb7faa7aaad80/transformed/lifecycle-livedata-core-2.8.3/jars/lint.jar"/> From 056981f0e90381273decb1e1365e12924445963a Mon Sep 17 00:00:00 2001 From: Fabio Insolia Date: Fri, 25 Oct 2024 10:06:11 +0100 Subject: [PATCH 3/3] Updating compose to the latest stable 1.7.4 --- buildSrc/src/main/java/Versions.kt | 2 +- example_app_frames/lint-baseline.xml | 6 +++--- frames/lint-baseline.xml | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/buildSrc/src/main/java/Versions.kt b/buildSrc/src/main/java/Versions.kt index b4ef5fdcf..aebe59c92 100644 --- a/buildSrc/src/main/java/Versions.kt +++ b/buildSrc/src/main/java/Versions.kt @@ -22,7 +22,7 @@ object Versions { const val lifeCycle = "2.5.1" const val compose_compiler_ext = "1.5.3" const val compose_material3 = "1.1.2" - const val compose_version = "1.7.2" + const val compose_version = "1.7.4" const val compose_activity_version = "1.8.0" const val compose_customview_poolingcontainer = "1.0.0" const val compose_viewmodel = "2.6.2" diff --git a/example_app_frames/lint-baseline.xml b/example_app_frames/lint-baseline.xml index 8cae809b7..a726f3125 100644 --- a/example_app_frames/lint-baseline.xml +++ b/example_app_frames/lint-baseline.xml @@ -5,21 +5,21 @@ id="ObsoleteLintCustomCheck" message="Library lint checks reference invalid APIs; these checks **will be skipped**! Lint found an issue registry (`androidx.compose.runtime.lint.RuntimeIssueRegistry`) which contains some references to invalid API: org.jetbrains.kotlin.analysis.api.session.KtAnalysisSessionProvider: org.jetbrains.kotlin.analysis.api.lifetime.KtLifetimeTokenFactory getTokenFactory() (Referenced from androidx/compose/runtime/lint/AutoboxingStateCreationDetector.class) Therefore, this lint check library is **not** included in analysis. This affects the following lint checks: `AutoboxingStateValueProperty` `AutoboxingStateCreation` `CoroutineCreationDuringComposition` `FlowOperatorInvokedInComposition` `ComposableLambdaParameterNaming` `ComposableLambdaParameterPosition` `ComposableNaming` `StateFlowValueCalledInComposition` `CompositionLocalNaming` `MutableCollectionMutableState` `ProduceStateDoesNotAssignValue` `RememberReturnType` `OpaqueUnitKey` `UnrememberedMutableState` To use this lint check, upgrade to a more recent version of the library."> + file="$GRADLE_USER_HOME/caches/transforms-3/55dbf94641422208b28dd84285056eb8/transformed/jetified-runtime-release/jars/lint.jar"/> + file="$GRADLE_USER_HOME/caches/transforms-3/97fc3ca3cff827bed21c0a7632d39367/transformed/jetified-ui-release/jars/lint.jar"/> + file="$GRADLE_USER_HOME/caches/transforms-3/8ceccbadb8d8497487beca744d78dc71/transformed/lifecycle-livedata-core-2.8.3/jars/lint.jar"/> + file="$GRADLE_USER_HOME/caches/transforms-3/55dbf94641422208b28dd84285056eb8/transformed/jetified-runtime-release/jars/lint.jar"/> + file="$GRADLE_USER_HOME/caches/transforms-3/97fc3ca3cff827bed21c0a7632d39367/transformed/jetified-ui-release/jars/lint.jar"/> + file="$GRADLE_USER_HOME/caches/transforms-3/8ceccbadb8d8497487beca744d78dc71/transformed/lifecycle-livedata-core-2.8.3/jars/lint.jar"/>