diff --git a/CanonicalLayouts/feed-compose/app/build.gradle b/CanonicalLayouts/feed-compose/app/build.gradle index 2d10cc24..abf3455c 100644 --- a/CanonicalLayouts/feed-compose/app/build.gradle +++ b/CanonicalLayouts/feed-compose/app/build.gradle @@ -17,15 +17,16 @@ plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' + id("org.jetbrains.kotlin.plugin.compose") version "2.0.0" } android { - compileSdk 33 + compileSdk 35 defaultConfig { applicationId "com.example.feed_compose" minSdk 21 - targetSdk 33 + targetSdk 35 versionCode 1 versionName "1.0" @@ -51,34 +52,38 @@ android { buildFeatures { compose true } - composeOptions { - kotlinCompilerExtensionVersion '1.3.2' - } packagingOptions { resources { excludes += '/META-INF/{AL2.0,LGPL2.1}' } } + namespace 'com.example.feedcompose' +} + +composeCompiler { + enableStrongSkippingMode = true + + reportsDestination = layout.buildDirectory.dir("compose_compiler") } dependencies { - def composeBom = platform('androidx.compose:compose-bom:2022.10.00') + def composeBom = platform('androidx.compose:compose-bom:2024.08.00') implementation(composeBom) androidTestImplementation(composeBom) - implementation 'androidx.core:core-ktx:1.9.0' + implementation 'androidx.core:core-ktx:1.13.1' implementation "androidx.compose.ui:ui" implementation 'androidx.compose.material3:material3' implementation 'androidx.compose.material3:material3-window-size-class' implementation "androidx.compose.ui:ui-tooling-preview" - implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1' - implementation 'androidx.activity:activity-compose:1.6.1' - implementation 'androidx.navigation:navigation-compose:2.5.3' + implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.4' + implementation 'androidx.activity:activity-compose:1.9.1' + implementation 'androidx.navigation:navigation-compose:2.7.7' implementation 'io.coil-kt:coil-compose:2.2.1' testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.3' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' androidTestImplementation "androidx.compose.ui:ui-test-junit4" debugImplementation "androidx.compose.ui:ui-tooling" debugImplementation "androidx.compose.ui:ui-test-manifest" diff --git a/CanonicalLayouts/feed-compose/app/src/main/AndroidManifest.xml b/CanonicalLayouts/feed-compose/app/src/main/AndroidManifest.xml index 245d335e..9f0ea582 100644 --- a/CanonicalLayouts/feed-compose/app/src/main/AndroidManifest.xml +++ b/CanonicalLayouts/feed-compose/app/src/main/AndroidManifest.xml @@ -16,8 +16,7 @@ --> + xmlns:tools="http://schemas.android.com/tools"> diff --git a/CanonicalLayouts/feed-compose/build.gradle b/CanonicalLayouts/feed-compose/build.gradle index 13f05740..d1e2cc81 100644 --- a/CanonicalLayouts/feed-compose/build.gradle +++ b/CanonicalLayouts/feed-compose/build.gradle @@ -15,9 +15,9 @@ */ plugins { - id 'com.android.application' version '7.3.1' apply false - id 'com.android.library' version '7.3.1' apply false - id 'org.jetbrains.kotlin.android' version '1.7.20' apply false + id 'com.android.application' version '8.6.0' apply false + id 'com.android.library' version '8.6.0' apply false + id 'org.jetbrains.kotlin.android' version '2.0.0' apply false id 'com.diffplug.spotless' version '6.9.0' } diff --git a/CanonicalLayouts/feed-compose/gradle.properties b/CanonicalLayouts/feed-compose/gradle.properties index cd0519bb..022338b7 100644 --- a/CanonicalLayouts/feed-compose/gradle.properties +++ b/CanonicalLayouts/feed-compose/gradle.properties @@ -20,4 +20,6 @@ kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true \ No newline at end of file +android.nonTransitiveRClass=true +android.defaults.buildfeatures.buildconfig=true +android.nonFinalResIds=false \ No newline at end of file diff --git a/CanonicalLayouts/feed-compose/gradle/wrapper/gradle-wrapper.properties b/CanonicalLayouts/feed-compose/gradle/wrapper/gradle-wrapper.properties index bb98ed39..2014ee05 100644 --- a/CanonicalLayouts/feed-compose/gradle/wrapper/gradle-wrapper.properties +++ b/CanonicalLayouts/feed-compose/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Wed Aug 10 10:35:30 JST 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/CanonicalLayouts/feed-view/app/build.gradle b/CanonicalLayouts/feed-view/app/build.gradle index 36fb87fa..ed060a60 100644 --- a/CanonicalLayouts/feed-view/app/build.gradle +++ b/CanonicalLayouts/feed-view/app/build.gradle @@ -20,12 +20,12 @@ plugins { } android { - compileSdk 32 + compileSdk 35 defaultConfig { applicationId "com.example.viewbasedfeedlayoutsample" minSdk 21 - targetSdk 32 + targetSdk 35 versionCode 1 versionName "1.0" @@ -48,19 +48,20 @@ android { buildFeatures { viewBinding true } + namespace 'com.example.viewbasedfeedlayoutsample' } dependencies { - implementation 'androidx.core:core-ktx:1.8.0' - implementation 'androidx.appcompat:appcompat:1.4.2' - implementation 'com.google.android.material:material:1.7.0-alpha03' + implementation 'androidx.core:core-ktx:1.13.1' + implementation 'androidx.appcompat:appcompat:1.7.0' + implementation 'com.google.android.material:material:1.12.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - implementation 'androidx.navigation:navigation-fragment-ktx:2.5.1' - implementation 'androidx.navigation:navigation-ui-ktx:2.5.1' + implementation 'androidx.navigation:navigation-fragment-ktx:2.7.7' + implementation 'androidx.navigation:navigation-ui-ktx:2.7.7' implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.recyclerview:recyclerview:1.2.1' + implementation 'androidx.recyclerview:recyclerview:1.3.2' implementation 'io.coil-kt:coil:2.1.0' testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.3' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' } \ No newline at end of file diff --git a/CanonicalLayouts/feed-view/app/src/main/AndroidManifest.xml b/CanonicalLayouts/feed-view/app/src/main/AndroidManifest.xml index e277e76a..2d31bfaa 100644 --- a/CanonicalLayouts/feed-view/app/src/main/AndroidManifest.xml +++ b/CanonicalLayouts/feed-view/app/src/main/AndroidManifest.xml @@ -16,8 +16,7 @@ --> + xmlns:tools="http://schemas.android.com/tools"> diff --git a/CanonicalLayouts/feed-view/build.gradle b/CanonicalLayouts/feed-view/build.gradle index 451b2b59..a146b1b6 100644 --- a/CanonicalLayouts/feed-view/build.gradle +++ b/CanonicalLayouts/feed-view/build.gradle @@ -18,14 +18,14 @@ buildscript { google() } dependencies { - classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.5.1" + classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.7.7" } } plugins { - id 'com.android.application' version '7.2.2' apply false - id 'com.android.library' version '7.2.2' apply false - id 'org.jetbrains.kotlin.android' version '1.7.10' apply false + id 'com.android.application' version '8.6.0' apply false + id 'com.android.library' version '8.6.0' apply false + id 'org.jetbrains.kotlin.android' version '2.0.0' apply false id 'com.diffplug.spotless' version '6.9.0' } diff --git a/CanonicalLayouts/feed-view/gradle.properties b/CanonicalLayouts/feed-view/gradle.properties index cd0519bb..2a7ec695 100644 --- a/CanonicalLayouts/feed-view/gradle.properties +++ b/CanonicalLayouts/feed-view/gradle.properties @@ -20,4 +20,5 @@ kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true \ No newline at end of file +android.nonTransitiveRClass=true +android.nonFinalResIds=false \ No newline at end of file diff --git a/CanonicalLayouts/feed-view/gradle/wrapper/gradle-wrapper.properties b/CanonicalLayouts/feed-view/gradle/wrapper/gradle-wrapper.properties index a3c562f9..b63eae95 100644 --- a/CanonicalLayouts/feed-view/gradle/wrapper/gradle-wrapper.properties +++ b/CanonicalLayouts/feed-view/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Wed Aug 03 13:58:14 JST 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/CanonicalLayouts/list-detail-activity-embedding/app/build.gradle b/CanonicalLayouts/list-detail-activity-embedding/app/build.gradle index d90d7df8..206adfdd 100644 --- a/CanonicalLayouts/list-detail-activity-embedding/app/build.gradle +++ b/CanonicalLayouts/list-detail-activity-embedding/app/build.gradle @@ -19,12 +19,12 @@ plugins { } android { - compileSdk 34 + compileSdk 35 defaultConfig { applicationId "com.example.activityembedding" minSdk 31 - targetSdk 34 + targetSdk 35 versionCode 1 versionName "1.0" @@ -73,5 +73,5 @@ dependencies { androidTestImplementation 'androidx.test.espresso:espresso-device:1.0.1' androidTestImplementation("androidx.test.ext:junit-ktx:1.2.1") androidTestImplementation("androidx.test.ext:truth:1.6.0") - androidTestImplementation("androidx.test:runner:1.6.1") + androidTestImplementation("androidx.test:runner:1.6.2") } diff --git a/CanonicalLayouts/list-detail-activity-embedding/app/src/main/res/layout/list_item.xml b/CanonicalLayouts/list-detail-activity-embedding/app/src/main/res/layout/list_item.xml index d30ec45e..4a98c336 100644 --- a/CanonicalLayouts/list-detail-activity-embedding/app/src/main/res/layout/list_item.xml +++ b/CanonicalLayouts/list-detail-activity-embedding/app/src/main/res/layout/list_item.xml @@ -1,5 +1,4 @@ - - + app:cardCornerRadius="12dp" + app:cardPreventCornerOverlap="true"> + android:textColor="@color/design_default_color_primary" + tools:text="TextView"> diff --git a/CanonicalLayouts/list-detail-activity-embedding/build.gradle b/CanonicalLayouts/list-detail-activity-embedding/build.gradle index de839cac..6dd3c517 100644 --- a/CanonicalLayouts/list-detail-activity-embedding/build.gradle +++ b/CanonicalLayouts/list-detail-activity-embedding/build.gradle @@ -15,11 +15,7 @@ */ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '8.5.0' apply false - id 'com.android.library' version '8.5.0' apply false - id 'org.jetbrains.kotlin.android' version '1.7.10' apply false -} - -task clean(type: Delete) { - delete rootProject.buildDir + id 'com.android.application' version '8.6.0' apply false + id 'com.android.library' version '8.6.0' apply false + id 'org.jetbrains.kotlin.android' version '2.0.0' apply false } diff --git a/CanonicalLayouts/list-detail-activity-embedding/gradle.properties b/CanonicalLayouts/list-detail-activity-embedding/gradle.properties index 95b3559e..d6dbd9ad 100644 --- a/CanonicalLayouts/list-detail-activity-embedding/gradle.properties +++ b/CanonicalLayouts/list-detail-activity-embedding/gradle.properties @@ -27,5 +27,4 @@ kotlin.code.style=official # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library android.nonTransitiveRClass=true -android.defaults.buildfeatures.buildconfig=true android.nonFinalResIds=false \ No newline at end of file diff --git a/CanonicalLayouts/list-detail-compose/app/build.gradle b/CanonicalLayouts/list-detail-compose/app/build.gradle index b30b0cb0..8d1f5bb7 100644 --- a/CanonicalLayouts/list-detail-compose/app/build.gradle +++ b/CanonicalLayouts/list-detail-compose/app/build.gradle @@ -16,6 +16,7 @@ plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' + id("org.jetbrains.kotlin.plugin.compose") version "2.0.0" } android { @@ -51,9 +52,6 @@ android { buildFeatures { compose true } - composeOptions { - kotlinCompilerExtensionVersion '1.5.8' - } packagingOptions { resources { excludes += '/META-INF/{AL2.0,LGPL2.1}' @@ -61,6 +59,12 @@ android { } } +composeCompiler { + enableStrongSkippingMode = true + + reportsDestination = layout.buildDirectory.dir("compose_compiler") +} + dependencies { def composeBom = platform('androidx.compose:compose-bom:2024.09.00') implementation(composeBom) diff --git a/CanonicalLayouts/list-detail-compose/build.gradle b/CanonicalLayouts/list-detail-compose/build.gradle index 1cfdadc2..c54adb6c 100644 --- a/CanonicalLayouts/list-detail-compose/build.gradle +++ b/CanonicalLayouts/list-detail-compose/build.gradle @@ -16,5 +16,5 @@ plugins { id 'com.android.application' version '8.6.0' apply false id 'com.android.library' version '8.6.0' apply false - id 'org.jetbrains.kotlin.android' version '1.9.22' apply false + id 'org.jetbrains.kotlin.android' version '2.0.0' apply false } diff --git a/CanonicalLayouts/list-detail-sliding-pane/app/build.gradle b/CanonicalLayouts/list-detail-sliding-pane/app/build.gradle index f08a83da..28be6b3c 100644 --- a/CanonicalLayouts/list-detail-sliding-pane/app/build.gradle +++ b/CanonicalLayouts/list-detail-sliding-pane/app/build.gradle @@ -20,12 +20,12 @@ plugins { android { namespace 'com.example.listdetail.slidingpane' - compileSdk 33 + compileSdk 35 defaultConfig { applicationId "com.example.listdetail.slidingpane" minSdk 21 - targetSdk 33 + targetSdk 35 versionCode 1 versionName "1.0" @@ -53,15 +53,15 @@ android { dependencies { - implementation 'androidx.core:core-ktx:1.9.0' - implementation 'androidx.appcompat:appcompat:1.5.1' - implementation 'com.google.android.material:material:1.7.0' - implementation "androidx.activity:activity:1.7.0-alpha02" + implementation 'androidx.core:core-ktx:1.13.1' + implementation 'androidx.appcompat:appcompat:1.7.0' + implementation 'com.google.android.material:material:1.12.0' + implementation "androidx.activity:activity-ktx:1.9.1" implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation "androidx.slidingpanelayout:slidingpanelayout:1.2.0" - implementation "androidx.navigation:navigation-fragment-ktx:2.5.3" - implementation "androidx.navigation:navigation-ui-ktx:2.5.3" + implementation "androidx.navigation:navigation-fragment-ktx:2.7.7" + implementation "androidx.navigation:navigation-ui-ktx:2.7.7" testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.4' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' } \ No newline at end of file diff --git a/CanonicalLayouts/list-detail-sliding-pane/build.gradle b/CanonicalLayouts/list-detail-sliding-pane/build.gradle index bf080db3..e7b77424 100644 --- a/CanonicalLayouts/list-detail-sliding-pane/build.gradle +++ b/CanonicalLayouts/list-detail-sliding-pane/build.gradle @@ -15,7 +15,7 @@ */ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '7.2.1' apply false - id 'com.android.library' version '7.2.1' apply false - id 'org.jetbrains.kotlin.android' version '1.6.21' apply false + id 'com.android.application' version '8.6.0' apply false + id 'com.android.library' version '8.6.0' apply false + id 'org.jetbrains.kotlin.android' version '2.0.0' apply false } \ No newline at end of file diff --git a/CanonicalLayouts/list-detail-sliding-pane/gradle.properties b/CanonicalLayouts/list-detail-sliding-pane/gradle.properties index 3c5031eb..f19c7b9b 100644 --- a/CanonicalLayouts/list-detail-sliding-pane/gradle.properties +++ b/CanonicalLayouts/list-detail-sliding-pane/gradle.properties @@ -20,4 +20,5 @@ kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true \ No newline at end of file +android.nonTransitiveRClass=true +android.nonFinalResIds=false \ No newline at end of file diff --git a/CanonicalLayouts/list-detail-sliding-pane/gradle/wrapper/gradle-wrapper.properties b/CanonicalLayouts/list-detail-sliding-pane/gradle/wrapper/gradle-wrapper.properties index bd388969..45dc8686 100644 --- a/CanonicalLayouts/list-detail-sliding-pane/gradle/wrapper/gradle-wrapper.properties +++ b/CanonicalLayouts/list-detail-sliding-pane/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Wed May 25 15:14:50 BST 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/CanonicalLayouts/supporting-pane-compose/app/build.gradle b/CanonicalLayouts/supporting-pane-compose/app/build.gradle index 4cefe12f..743b34ec 100644 --- a/CanonicalLayouts/supporting-pane-compose/app/build.gradle +++ b/CanonicalLayouts/supporting-pane-compose/app/build.gradle @@ -17,6 +17,8 @@ plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' + id("org.jetbrains.kotlin.plugin.compose") version "2.0.0" + } android { @@ -52,9 +54,6 @@ android { buildFeatures { compose true } - composeOptions { - kotlinCompilerExtensionVersion '1.3.2' - } packagingOptions { resources { excludes += '/META-INF/{AL2.0,LGPL2.1}' @@ -62,10 +61,16 @@ android { } } +composeCompiler { + enableStrongSkippingMode = true + + reportsDestination = layout.buildDirectory.dir("compose_compiler") +} + dependencies { def composeBom = platform('androidx.compose:compose-bom:2024.09.00') implementation(composeBom) - + implementation 'androidx.core:core-ktx:1.13.1' implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.5' implementation 'androidx.activity:activity-compose:1.9.2' diff --git a/CanonicalLayouts/supporting-pane-compose/build.gradle b/CanonicalLayouts/supporting-pane-compose/build.gradle index e18a509a..c54adb6c 100644 --- a/CanonicalLayouts/supporting-pane-compose/build.gradle +++ b/CanonicalLayouts/supporting-pane-compose/build.gradle @@ -16,5 +16,5 @@ plugins { id 'com.android.application' version '8.6.0' apply false id 'com.android.library' version '8.6.0' apply false - id 'org.jetbrains.kotlin.android' version '1.7.20' apply false + id 'org.jetbrains.kotlin.android' version '2.0.0' apply false } diff --git a/CanonicalLayouts/supporting-pane-compose/gradle.properties b/CanonicalLayouts/supporting-pane-compose/gradle.properties index a2e90d87..f19c7b9b 100644 --- a/CanonicalLayouts/supporting-pane-compose/gradle.properties +++ b/CanonicalLayouts/supporting-pane-compose/gradle.properties @@ -21,5 +21,4 @@ kotlin.code.style=official # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library android.nonTransitiveRClass=true -android.defaults.buildfeatures.buildconfig=true android.nonFinalResIds=false \ No newline at end of file diff --git a/CanonicalLayouts/supporting-pane-fragments/app/build.gradle b/CanonicalLayouts/supporting-pane-fragments/app/build.gradle index bde1dd31..28bfd51b 100644 --- a/CanonicalLayouts/supporting-pane-fragments/app/build.gradle +++ b/CanonicalLayouts/supporting-pane-fragments/app/build.gradle @@ -5,12 +5,12 @@ plugins { android { namespace 'com.google.supporting.pane.fragments' - compileSdk 33 + compileSdk 35 defaultConfig { applicationId "com.google.supporting.pane.fragments" minSdk 21 - targetSdk 33 + targetSdk 35 versionCode 1 versionName "1.0" @@ -38,13 +38,13 @@ android { dependencies { - implementation 'androidx.core:core-ktx:1.8.0' - implementation 'androidx.appcompat:appcompat:1.5.0' - implementation 'com.google.android.material:material:1.6.1' + implementation 'androidx.core:core-ktx:1.13.1' + implementation 'androidx.appcompat:appcompat:1.7.0' + implementation 'com.google.android.material:material:1.12.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.3' - implementation 'androidx.fragment:fragment-ktx:1.5.2' + implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3' + implementation 'androidx.fragment:fragment-ktx:1.8.2' testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.3' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' } \ No newline at end of file diff --git a/CanonicalLayouts/supporting-pane-fragments/build.gradle b/CanonicalLayouts/supporting-pane-fragments/build.gradle index 464bd5ee..e7b77424 100644 --- a/CanonicalLayouts/supporting-pane-fragments/build.gradle +++ b/CanonicalLayouts/supporting-pane-fragments/build.gradle @@ -15,7 +15,7 @@ */ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '7.2.2' apply false - id 'com.android.library' version '7.2.2' apply false - id 'org.jetbrains.kotlin.android' version '1.7.10' apply false + id 'com.android.application' version '8.6.0' apply false + id 'com.android.library' version '8.6.0' apply false + id 'org.jetbrains.kotlin.android' version '2.0.0' apply false } \ No newline at end of file diff --git a/CanonicalLayouts/supporting-pane-fragments/gradle.properties b/CanonicalLayouts/supporting-pane-fragments/gradle.properties index 3c5031eb..f19c7b9b 100644 --- a/CanonicalLayouts/supporting-pane-fragments/gradle.properties +++ b/CanonicalLayouts/supporting-pane-fragments/gradle.properties @@ -20,4 +20,5 @@ kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true \ No newline at end of file +android.nonTransitiveRClass=true +android.nonFinalResIds=false \ No newline at end of file diff --git a/CanonicalLayouts/supporting-pane-fragments/gradle/wrapper/gradle-wrapper.properties b/CanonicalLayouts/supporting-pane-fragments/gradle/wrapper/gradle-wrapper.properties index 2fdb4357..1e687926 100644 --- a/CanonicalLayouts/supporting-pane-fragments/gradle/wrapper/gradle-wrapper.properties +++ b/CanonicalLayouts/supporting-pane-fragments/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Wed Aug 17 15:01:41 CEST 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/CanonicalLayouts/supporting-pane-views/app/build.gradle b/CanonicalLayouts/supporting-pane-views/app/build.gradle index fa29a56f..8ad26701 100644 --- a/CanonicalLayouts/supporting-pane-views/app/build.gradle +++ b/CanonicalLayouts/supporting-pane-views/app/build.gradle @@ -21,12 +21,12 @@ plugins { android { namespace 'com.google.supporting.pane.views' - compileSdk 33 + compileSdk 35 defaultConfig { applicationId "com.google.supporting.pane.views" minSdk 21 - targetSdk 33 + targetSdk 35 versionCode 1 versionName "1.0" @@ -54,13 +54,13 @@ android { dependencies { - implementation 'androidx.core:core-ktx:1.9.0' - implementation 'androidx.appcompat:appcompat:1.5.1' - implementation 'com.google.android.material:material:1.6.1' + implementation 'androidx.core:core-ktx:1.13.1' + implementation 'androidx.appcompat:appcompat:1.7.0' + implementation 'com.google.android.material:material:1.12.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.3' - implementation 'androidx.fragment:fragment-ktx:1.5.2' + implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3' + implementation 'androidx.fragment:fragment-ktx:1.8.2' testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.3' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' } \ No newline at end of file diff --git a/CanonicalLayouts/supporting-pane-views/app/src/main/java/com/google/supporting/pane/views/ContentViewModel.kt b/CanonicalLayouts/supporting-pane-views/app/src/main/java/com/google/supporting/pane/views/ContentViewModel.kt index 0f684cb9..9723f49e 100644 --- a/CanonicalLayouts/supporting-pane-views/app/src/main/java/com/google/supporting/pane/views/ContentViewModel.kt +++ b/CanonicalLayouts/supporting-pane-views/app/src/main/java/com/google/supporting/pane/views/ContentViewModel.kt @@ -21,11 +21,10 @@ import kotlinx.coroutines.flow.MutableStateFlow class ContentViewModel : ViewModel() { - val state = MutableStateFlow(data.keys.first()) - val supportingState = MutableStateFlow(data[state.value].orEmpty()) + val state = MutableStateFlow(State()) fun selectFromSupportingPane(key: String) { - state.value = key - supportingState.value = data[key].orEmpty() + val newState = State(key = key, items = data[key].orEmpty()) + state.value = newState } } \ No newline at end of file diff --git a/CanonicalLayouts/supporting-pane-views/app/src/main/java/com/google/supporting/pane/views/Data.kt b/CanonicalLayouts/supporting-pane-views/app/src/main/java/com/google/supporting/pane/views/Data.kt index 330ffa7d..f46fc15c 100644 --- a/CanonicalLayouts/supporting-pane-views/app/src/main/java/com/google/supporting/pane/views/Data.kt +++ b/CanonicalLayouts/supporting-pane-views/app/src/main/java/com/google/supporting/pane/views/Data.kt @@ -23,4 +23,6 @@ val data = mapOf( "backend" to listOf("kotlin", "java"), "java" to listOf("backend", "android", "desktop"), "flutter" to listOf("android", "desktop") -) \ No newline at end of file +) + +data class State(val key: String = data.keys.first(), val items: List = data.values.first()) diff --git a/CanonicalLayouts/supporting-pane-views/app/src/main/java/com/google/supporting/pane/views/MainActivity.kt b/CanonicalLayouts/supporting-pane-views/app/src/main/java/com/google/supporting/pane/views/MainActivity.kt index 9f9ec688..411aa5e0 100644 --- a/CanonicalLayouts/supporting-pane-views/app/src/main/java/com/google/supporting/pane/views/MainActivity.kt +++ b/CanonicalLayouts/supporting-pane-views/app/src/main/java/com/google/supporting/pane/views/MainActivity.kt @@ -16,8 +16,8 @@ package com.google.supporting.pane.views -import androidx.appcompat.app.AppCompatActivity import android.os.Bundle +import androidx.appcompat.app.AppCompatActivity import androidx.lifecycle.Lifecycle import androidx.lifecycle.lifecycleScope import androidx.lifecycle.repeatOnLifecycle @@ -28,7 +28,7 @@ import kotlinx.coroutines.launch class MainActivity : AppCompatActivity() { private val viewModel = ContentViewModel() - private var binding : ActivityMainBinding? = null + private var binding: ActivityMainBinding? = null override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -41,13 +41,10 @@ class MainActivity : AppCompatActivity() { lifecycleScope.launch { repeatOnLifecycle(Lifecycle.State.STARTED) { - viewModel.state.collect { label -> - binding?.mainView?.setText(label) - } - } - repeatOnLifecycle(Lifecycle.State.STARTED) { - viewModel.supportingState.collect { items -> - binding?.supportingView?.updateItems(items) + viewModel.state.collect { state -> + println("Add main content") + binding?.mainView?.setText(state.key) + binding?.supportingView?.updateItems(state.items) } } } diff --git a/CanonicalLayouts/supporting-pane-views/app/src/main/res/layout/item_support.xml b/CanonicalLayouts/supporting-pane-views/app/src/main/res/layout/item_support.xml index a5ef20f5..3c3d515a 100644 --- a/CanonicalLayouts/supporting-pane-views/app/src/main/res/layout/item_support.xml +++ b/CanonicalLayouts/supporting-pane-views/app/src/main/res/layout/item_support.xml @@ -29,6 +29,7 @@ android:layout_marginTop="8dp" android:layout_marginEnd="8dp" android:layout_marginBottom="8dp" + android:textColor="@color/design_default_color_primary" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/CanonicalLayouts/supporting-pane-views/build.gradle b/CanonicalLayouts/supporting-pane-views/build.gradle index acbb3c0b..44313117 100644 --- a/CanonicalLayouts/supporting-pane-views/build.gradle +++ b/CanonicalLayouts/supporting-pane-views/build.gradle @@ -15,10 +15,10 @@ */ plugins { - id 'com.android.application' version '7.3.0' apply false - id 'com.android.library' version '7.3.0' apply false - id 'org.jetbrains.kotlin.android' version '1.7.10' apply false - id 'com.diffplug.spotless' version '5.7.0' apply true + id 'com.android.application' version '8.6.0' apply false + id 'com.android.library' version '8.6.0' apply false + id 'org.jetbrains.kotlin.android' version '2.0.0' apply false + id 'com.diffplug.spotless' version '6.9.0' apply true } subprojects { diff --git a/CanonicalLayouts/supporting-pane-views/gradle.properties b/CanonicalLayouts/supporting-pane-views/gradle.properties index 3c5031eb..f19c7b9b 100644 --- a/CanonicalLayouts/supporting-pane-views/gradle.properties +++ b/CanonicalLayouts/supporting-pane-views/gradle.properties @@ -20,4 +20,5 @@ kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true \ No newline at end of file +android.nonTransitiveRClass=true +android.nonFinalResIds=false \ No newline at end of file diff --git a/CanonicalLayouts/supporting-pane-views/gradle/wrapper/gradle-wrapper.properties b/CanonicalLayouts/supporting-pane-views/gradle/wrapper/gradle-wrapper.properties index 2fdb4357..1e687926 100644 --- a/CanonicalLayouts/supporting-pane-views/gradle/wrapper/gradle-wrapper.properties +++ b/CanonicalLayouts/supporting-pane-views/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Wed Aug 17 15:01:41 CEST 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME