From 2ffbaa8467d9a26127586143584908d06e489819 Mon Sep 17 00:00:00 2001 From: MagicalMeghan <46006059+MagicalMeghan@users.noreply.github.com> Date: Tue, 6 Feb 2024 16:27:22 -0500 Subject: [PATCH 01/15] update package name (#205) --- .../PictureInPictureSnippets.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename compose/snippets/src/main/java/com/example/compose/snippets/{pictureInPicture => pictureinpicture}/PictureInPictureSnippets.kt (98%) diff --git a/compose/snippets/src/main/java/com/example/compose/snippets/pictureInPicture/PictureInPictureSnippets.kt b/compose/snippets/src/main/java/com/example/compose/snippets/pictureinpicture/PictureInPictureSnippets.kt similarity index 98% rename from compose/snippets/src/main/java/com/example/compose/snippets/pictureInPicture/PictureInPictureSnippets.kt rename to compose/snippets/src/main/java/com/example/compose/snippets/pictureinpicture/PictureInPictureSnippets.kt index cfd0555f9..953c57238 100644 --- a/compose/snippets/src/main/java/com/example/compose/snippets/pictureInPicture/PictureInPictureSnippets.kt +++ b/compose/snippets/src/main/java/com/example/compose/snippets/pictureinpicture/PictureInPictureSnippets.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.compose.snippets.pictureInPicture +package com.example.compose.snippets.pictureinpicture import android.app.PictureInPictureParams import android.app.RemoteAction @@ -150,7 +150,7 @@ fun ToggleUIBasedOnPiP( val inPipMode = rememberIsInPipMode() Column(modifier = modifier) { - // This text will only show up when the app is in PiP mode + // This text will only show up when the app is not in PiP mode if (!inPipMode) { Text( text = "Picture in Picture", From 2cc47d6c0a9d1afaa5a97a1c3005f189d3ece472 Mon Sep 17 00:00:00 2001 From: Chris Arriola Date: Tue, 6 Feb 2024 13:35:27 -0800 Subject: [PATCH 02/15] Fix sync_main_to_latest workflow (#206) * Fix sync_to_main workflow to fetch branches before merging main to latest. Git fetch. Merge origin main * Remove test branch. --- .github/workflows/sync_main_latest.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync_main_latest.yml b/.github/workflows/sync_main_latest.yml index a196b5dae..b96fab3da 100644 --- a/.github/workflows/sync_main_latest.yml +++ b/.github/workflows/sync_main_latest.yml @@ -1,5 +1,6 @@ name: Sync main and latest on: + workflow_dispatch: push: branches: - main @@ -13,7 +14,7 @@ jobs: uses: actions/checkout@v3 - name: Merge main into latest - run: git checkout latest && git merge main + run: git fetch && git switch latest && git merge origin/main - name: Create pull request id: cpr From 864fd5598518a54847d6dcdcb859677bee425d9b Mon Sep 17 00:00:00 2001 From: Rebecca Franks Date: Wed, 7 Feb 2024 11:05:12 +0000 Subject: [PATCH 03/15] add path utils to snippets. (#211) --- .../com/example/compose/snippets/graphics/ShapesSnippets.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compose/snippets/src/main/java/com/example/compose/snippets/graphics/ShapesSnippets.kt b/compose/snippets/src/main/java/com/example/compose/snippets/graphics/ShapesSnippets.kt index de0a5ee9b..25a1852e1 100644 --- a/compose/snippets/src/main/java/com/example/compose/snippets/graphics/ShapesSnippets.kt +++ b/compose/snippets/src/main/java/com/example/compose/snippets/graphics/ShapesSnippets.kt @@ -236,6 +236,7 @@ private fun MorphExampleAnimation() { // [END android_compose_graphics_polygon_morph_animation] } +// [START android_compose_morph_to_path] /** * Transforms the morph at a given progress into a [Path]. * It can optionally be scaled, using the origin (0,0) as pivot point. @@ -257,10 +258,11 @@ fun Morph.toComposePath(progress: Float, scale: Float = 1f, path: Path = Path()) path.close() return path } - +// [END android_compose_morph_to_path] /** * Function used to create a Path from a list of Cubics. */ +// [START android_compose_list_cubics_to_path] fun List.toPath(path: Path = Path(), scale: Float = 1f): Path { path.rewind() firstOrNull()?.let { first -> @@ -276,6 +278,7 @@ fun List.toPath(path: Path = Path(), scale: Float = 1f): Path { path.close() return path } +// [END android_compose_list_cubics_to_path] // [START android_compose_morph_clip_shape] class MorphPolygonShape( From 9c71245de9a0f7546162fd037257c6a3ea08c761 Mon Sep 17 00:00:00 2001 From: Chris Arriola Date: Thu, 8 Feb 2024 11:16:56 -0800 Subject: [PATCH 04/15] Fixing reference in Typography sample (#207) * Fixed references in Typography sample. body1/body2/h4 don't exist in M3 Typography. The options are {display|headline|title|body|label}{Small|Medium|Large}. * Update TextDownloadableFontsSnippets.kt Typography should use m3 import. * Apply Spotless --------- Co-authored-by: James Williams <66931+jwill@users.noreply.github.com> Co-authored-by: arriolac --- .../snippets/text/TextDownloadableFontsSnippets.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compose/snippets/src/main/java/com/example/compose/snippets/text/TextDownloadableFontsSnippets.kt b/compose/snippets/src/main/java/com/example/compose/snippets/text/TextDownloadableFontsSnippets.kt index 283e8f7f0..95b69e9cb 100644 --- a/compose/snippets/src/main/java/com/example/compose/snippets/text/TextDownloadableFontsSnippets.kt +++ b/compose/snippets/src/main/java/com/example/compose/snippets/text/TextDownloadableFontsSnippets.kt @@ -21,8 +21,8 @@ package com.example.compose.snippets.text import android.util.Log import androidx.compose.foundation.layout.Column import androidx.compose.material.Text -import androidx.compose.material.Typography import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Typography import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.LaunchedEffect @@ -118,16 +118,16 @@ fun DownloadableFontsText() { private object TextDownloadableFontsSnippet4 { // [START android_compose_text_typography_definition] val MyTypography = Typography( - body1 = TextStyle( + labelMedium = TextStyle( fontFamily = fontFamily, fontWeight = FontWeight.Normal, fontSize = 12.sp/*...*/ ), - body2 = TextStyle( + labelLarge = TextStyle( fontFamily = fontFamily, fontWeight = FontWeight.Bold, letterSpacing = 2.sp, /*...*/ ), - h4 = TextStyle( + displayMedium = TextStyle( fontFamily = fontFamily, fontWeight = FontWeight.SemiBold/*...*/ ), /*...*/ From 2800143cd4547f4c9273251a18769283105337fa Mon Sep 17 00:00:00 2001 From: Ben Trengrove Date: Fri, 9 Feb 2024 06:42:57 +0800 Subject: [PATCH 05/15] Add new Compose text snippets (#210) * Add text snippets * Add linebreak snippets * Apply Spotless * Fix incorrect tags --- .../compose/snippets/text/TextSnippets.kt | 197 +++++++++++++++++- 1 file changed, 196 insertions(+), 1 deletion(-) diff --git a/compose/snippets/src/main/java/com/example/compose/snippets/text/TextSnippets.kt b/compose/snippets/src/main/java/com/example/compose/snippets/text/TextSnippets.kt index bfb8b837e..dd5cf5a69 100644 --- a/compose/snippets/src/main/java/com/example/compose/snippets/text/TextSnippets.kt +++ b/compose/snippets/src/main/java/com/example/compose/snippets/text/TextSnippets.kt @@ -19,7 +19,16 @@ package com.example.compose.snippets.text import android.util.Log +import androidx.compose.foundation.BorderStroke +import androidx.compose.foundation.ExperimentalFoundationApi +import androidx.compose.foundation.background +import androidx.compose.foundation.basicMarquee +import androidx.compose.foundation.border +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width import androidx.compose.foundation.text.ClickableText @@ -27,6 +36,7 @@ import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.foundation.text.selection.DisableSelection import androidx.compose.foundation.text.selection.SelectionContainer import androidx.compose.material3.LocalTextStyle +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.OutlinedTextField import androidx.compose.material3.Text import androidx.compose.material3.TextField @@ -36,6 +46,7 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.geometry.Offset import androidx.compose.ui.graphics.Brush @@ -55,10 +66,13 @@ import androidx.compose.ui.text.font.FontStyle import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.input.KeyboardType import androidx.compose.ui.text.input.PasswordVisualTransformation +import androidx.compose.ui.text.style.Hyphens +import androidx.compose.ui.text.style.LineBreak import androidx.compose.ui.text.style.LineHeightStyle import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.text.withStyle +import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.em import androidx.compose.ui.unit.sp @@ -577,7 +591,188 @@ private object TextEffectiveStateManagement2 { // [END android_compose_text_state_management] } -private val firaSansFamily = FontFamily() +@Composable +private fun TextSample(samples: MapUnit>) { + MaterialTheme { + Box( + Modifier + .background(MaterialTheme.colorScheme.background) + .fillMaxWidth() + ) { + Column( + verticalArrangement = Arrangement.spacedBy(10.dp), + modifier = Modifier.padding(10.dp) + ) { + samples.forEach { (title, content) -> + Row(Modifier.fillMaxWidth()) { + content() + Text( + text = title, + textAlign = TextAlign.Center, + style = MaterialTheme.typography.titleLarge, + modifier = Modifier + .fillMaxWidth() + .align(Alignment.CenterVertically) + ) + } + } + } + } + } +} + +private const val SAMPLE_LONG_TEXT = + "Jetpack Compose is Android’s modern toolkit for building native UI. " + + "It simplifies and accelerates UI development on Android bringing your apps " + + "to life with less code, powerful tools, and intuitive Kotlin APIs. " + + "It makes building Android UI faster and easier." +@Composable +@Preview +fun LineBreakSample() { + // [START android_compose_text_line_break] + TextSample( + samples = mapOf( + "Simple" to { + Text( + text = SAMPLE_LONG_TEXT, + modifier = Modifier + .width(130.dp) + .border(BorderStroke(1.dp, Color.Gray)), + fontSize = 14.sp, + style = TextStyle.Default.copy( + lineBreak = LineBreak.Simple + ) + ) + }, + "Paragraph" to { + Text( + text = SAMPLE_LONG_TEXT, + modifier = Modifier + .width(130.dp) + .border(BorderStroke(1.dp, Color.Gray)), + fontSize = 14.sp, + style = TextStyle.Default.copy( + lineBreak = LineBreak.Paragraph + ) + ) + } + ) + ) + // [END android_compose_text_line_break] +} + +@Preview +@Composable +fun SmallScreenTextSnippet() { + // [START android_compose_text_paragraph] + TextSample( + samples = mapOf( + "Balanced" to { + val smallScreenAdaptedParagraph = + LineBreak.Paragraph.copy(strategy = LineBreak.Strategy.Balanced) + Text( + text = SAMPLE_LONG_TEXT, + modifier = Modifier + .width(200.dp) + .border(BorderStroke(1.dp, Color.Gray)), + fontSize = 14.sp, + style = TextStyle.Default.copy( + lineBreak = smallScreenAdaptedParagraph + ) + ) + }, + "Default" to { + Text( + text = SAMPLE_LONG_TEXT, + modifier = Modifier + .width(200.dp) + .border(BorderStroke(1.dp, Color.Gray)), + fontSize = 14.sp, + style = TextStyle.Default + ) + } + ) + ) + // [END android_compose_text_paragraph] +} + +private object CJKTextSnippet { + @Composable + fun CJKSample() { + // [START android_compose_text_cjk] + val customTitleLineBreak = LineBreak( + strategy = LineBreak.Strategy.HighQuality, + strictness = LineBreak.Strictness.Strict, + wordBreak = LineBreak.WordBreak.Phrase + ) + Text( + text = "あなたに寄り添う最先端のテクノロジー。", + modifier = Modifier.width(250.dp), + fontSize = 14.sp, + style = TextStyle.Default.copy( + lineBreak = customTitleLineBreak + ) + ) + // [END android_compose_text_cjk] + } +} + +@Preview +@Composable +fun HyphenateTextSnippet() { + // [START android_compose_text_hyphen] + TextSample( + samples = mapOf( + "Hyphens - None" to { + Text( + text = SAMPLE_LONG_TEXT, + modifier = Modifier + .width(130.dp) + .border(BorderStroke(1.dp, Color.Gray)), + fontSize = 14.sp, + style = TextStyle.Default.copy( + lineBreak = LineBreak.Paragraph, + hyphens = Hyphens.None + ) + ) + }, + "Hyphens - Auto" to { + Text( + text = SAMPLE_LONG_TEXT, + modifier = Modifier + .width(130.dp) + .border(BorderStroke(1.dp, Color.Gray)), + fontSize = 14.sp, + style = TextStyle.Default.copy( + lineBreak = LineBreak.Paragraph, + hyphens = Hyphens.Auto + ) + ) + } + ) + ) + // [END android_compose_text_hyphen] +} + +@Preview(showBackground = true) +// [START android_compose_text_marquee] +@OptIn(ExperimentalFoundationApi::class) +@Composable +fun BasicMarqueeSample() { + // Marquee only animates when the content doesn't fit in the max width. + Column(Modifier.width(400.dp)) { + Text( + "Learn about why it's great to use Jetpack Compose", + modifier = Modifier.basicMarquee(), + fontSize = 50.sp + ) + } +} +// [END android_compose_text_marquee] + +// Using null just sets the font family to default, which is easier than supplying +// the actual font file in the snippets repo. This fixes a build warning. +private val firaSansFamily = null val LightBlue = Color(0xFF0066FF) val Purple = Color(0xFF800080) From 1b8b1fa5179bbf7c828aa8b833c5267ede4a76f6 Mon Sep 17 00:00:00 2001 From: Alex Vanyo Date: Thu, 15 Feb 2024 15:32:32 +0100 Subject: [PATCH 06/15] Update material3-adaptive to alpha06 (#216) --- .../adaptivelayouts/SampleListDetailPaneScaffold.kt | 9 +++++++-- gradle/libs.versions.toml | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/compose/snippets/src/main/java/com/example/compose/snippets/adaptivelayouts/SampleListDetailPaneScaffold.kt b/compose/snippets/src/main/java/com/example/compose/snippets/adaptivelayouts/SampleListDetailPaneScaffold.kt index 850f53819..75527c461 100644 --- a/compose/snippets/src/main/java/com/example/compose/snippets/adaptivelayouts/SampleListDetailPaneScaffold.kt +++ b/compose/snippets/src/main/java/com/example/compose/snippets/adaptivelayouts/SampleListDetailPaneScaffold.kt @@ -16,6 +16,7 @@ package com.example.compose.snippets.adaptivelayouts +import androidx.activity.compose.BackHandler import androidx.compose.foundation.background import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Column @@ -48,7 +49,7 @@ import androidx.compose.ui.unit.sp @Composable fun SampleListDetailPaneScaffoldParts() { // [START android_compose_adaptivelayouts_sample_list_detail_pane_scaffold_part02] - val navigator = rememberListDetailPaneScaffoldNavigator() + val navigator = rememberListDetailPaneScaffoldNavigator() // [END android_compose_adaptivelayouts_sample_list_detail_pane_scaffold_part02] // [START android_compose_adaptivelayouts_sample_list_detail_pane_scaffold_part01] @@ -117,7 +118,11 @@ fun SampleListDetailPaneScaffoldFull() { } // Create the ListDetailPaneScaffoldState - val navigator = rememberListDetailPaneScaffoldNavigator() + val navigator = rememberListDetailPaneScaffoldNavigator() + + BackHandler(navigator.canNavigateBack()) { + navigator.navigateBack() + } ListDetailPaneScaffold( scaffoldState = navigator.scaffoldState, diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index cbdce495e..28cf69157 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -32,8 +32,8 @@ kotlin = "1.9.20" ksp = "1.8.0-1.0.9" maps-compose = "4.3.2" material = "1.11.0" -material3-adaptive = "1.0.0-alpha05" -material3-adaptive-navigation-suite = "1.0.0-alpha02" +material3-adaptive = "1.0.0-alpha06" +material3-adaptive-navigation-suite = "1.0.0-alpha03" media3 = "1.2.1" # @keep minSdk = "21" From 806cb442a4c6ee0f245f9ac46ef16cf273ef017a Mon Sep 17 00:00:00 2001 From: Alex Vanyo Date: Thu, 15 Feb 2024 17:12:48 +0100 Subject: [PATCH 07/15] Add BackHandler to navigator snippet part (#217) --- .../snippets/adaptivelayouts/SampleListDetailPaneScaffold.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compose/snippets/src/main/java/com/example/compose/snippets/adaptivelayouts/SampleListDetailPaneScaffold.kt b/compose/snippets/src/main/java/com/example/compose/snippets/adaptivelayouts/SampleListDetailPaneScaffold.kt index 75527c461..d06615fa1 100644 --- a/compose/snippets/src/main/java/com/example/compose/snippets/adaptivelayouts/SampleListDetailPaneScaffold.kt +++ b/compose/snippets/src/main/java/com/example/compose/snippets/adaptivelayouts/SampleListDetailPaneScaffold.kt @@ -50,6 +50,10 @@ import androidx.compose.ui.unit.sp fun SampleListDetailPaneScaffoldParts() { // [START android_compose_adaptivelayouts_sample_list_detail_pane_scaffold_part02] val navigator = rememberListDetailPaneScaffoldNavigator() + + BackHandler(navigator.canNavigateBack()) { + navigator.navigateBack() + } // [END android_compose_adaptivelayouts_sample_list_detail_pane_scaffold_part02] // [START android_compose_adaptivelayouts_sample_list_detail_pane_scaffold_part01] From 7546db0680116ffe8b5491250b9a4a3c75b452b8 Mon Sep 17 00:00:00 2001 From: compose-devrel-github-bot <118755852+compose-devrel-github-bot@users.noreply.github.com> Date: Thu, 15 Feb 2024 16:21:31 +0000 Subject: [PATCH 08/15] =?UTF-8?q?=F0=9F=A4=96=20Update=20Dependencies=20(#?= =?UTF-8?q?212)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle/libs.versions.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 28cf69157..8a407f47f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -65,7 +65,6 @@ androidx-compose-runtime = { module = "androidx.compose.runtime:runtime" } androidx-compose-runtime-livedata = { module = "androidx.compose.runtime:runtime-livedata" } androidx-compose-ui = { module = "androidx.compose.ui:ui" } androidx-compose-ui-googlefonts = { module = "androidx.compose.ui:ui-text-google-fonts" } -androidx-graphics-shapes = "androidx.graphics:graphics-shapes:1.0.0-alpha04" androidx-compose-ui-graphics = { module = "androidx.compose.ui:ui-graphics" } androidx-compose-ui-test = { module = "androidx.compose.ui:ui-test" } androidx-compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4" } @@ -82,11 +81,14 @@ androidx-emoji2-views = { module = "androidx.emoji2:emoji2-views", version.ref = androidx-fragment-ktx = { module = "androidx.fragment:fragment-ktx", version.ref = "androidx-fragment-ktx" } androidx-glance-appwidget = { module = "androidx.glance:glance-appwidget", version.ref = "androidx-glance-appwidget" } androidx-glance-material3 = { module = "androidx.glance:glance-material3", version.ref = "androidx-glance-appwidget" } +androidx-graphics-shapes = "androidx.graphics:graphics-shapes:1.0.0-alpha04" androidx-hilt-navigation-compose = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "androidxHiltNavigationCompose" } androidx-lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidx-lifecycle-compose" } androidx-lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "androidx-lifecycle-runtime-compose" } androidx-lifecycle-viewModelCompose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "androidx-lifecycle-compose" } androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle-compose" } +androidx-media3-common = { module = "androidx.media3:media3-common", version.ref = "media3" } +androidx-media3-exoplayer = { module = "androidx.media3:media3-exoplayer", version.ref = "media3" } androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "androidx-navigation" } androidx-paging-compose = { module = "androidx.paging:paging-compose", version.ref = "androidx-paging" } androidx-recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerview" } @@ -104,8 +106,6 @@ junit = { module = "junit:junit", version.ref = "junit" } kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" } kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" } kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } -androidx-media3-common = { group = "androidx.media3", name = "media3-common", version.ref = "media3" } -androidx-media3-exoplayer = { group = "androidx.media3", name = "media3-exoplayer", version.ref = "media3" } [plugins] android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" } From db5ffc06e07c4830fbc362517680935b1ebd78c6 Mon Sep 17 00:00:00 2001 From: Rebecca Franks Date: Tue, 20 Feb 2024 13:18:24 +0000 Subject: [PATCH 09/15] Create dependabot.yml (#218) --- .github/dependabot.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..0d08e261a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "github-actions" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" From dc22a42e0832ca2f3d98edf5abd6ead606f54205 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 12:06:18 -0800 Subject: [PATCH 10/15] Bump peter-evans/create-pull-request from 4 to 6 (#219) Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 4 to 6. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v4...v6) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/sync_main_latest.yml | 2 +- .github/workflows/update_deps.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync_main_latest.yml b/.github/workflows/sync_main_latest.yml index b96fab3da..a8cc0368c 100644 --- a/.github/workflows/sync_main_latest.yml +++ b/.github/workflows/sync_main_latest.yml @@ -18,7 +18,7 @@ jobs: - name: Create pull request id: cpr - uses: peter-evans/create-pull-request@v4 + uses: peter-evans/create-pull-request@v6 with: token: ${{ secrets.PAT }} commit-message: 🤖 Sync main to latest diff --git a/.github/workflows/update_deps.yml b/.github/workflows/update_deps.yml index 9f92a69b2..dddf05266 100644 --- a/.github/workflows/update_deps.yml +++ b/.github/workflows/update_deps.yml @@ -19,7 +19,7 @@ jobs: run: ./gradlew versionCatalogUpdate - name: Create pull request id: cpr - uses: peter-evans/create-pull-request@v4 + uses: peter-evans/create-pull-request@v6 with: token: ${{ secrets.PAT }} commit-message: 🤖 Update Dependencies From cea0c7d4d7e3157ab751870cce0212f3dff2700a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 12:06:44 -0800 Subject: [PATCH 11/15] Bump actions/setup-java from 2 to 4 (#220) Bumps [actions/setup-java](https://github.com/actions/setup-java) from 2 to 4. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/v2...v4) --- updated-dependencies: - dependency-name: actions/setup-java dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/apply_spotless.yml | 2 +- .github/workflows/build.yml | 2 +- .github/workflows/update_deps.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/apply_spotless.yml b/.github/workflows/apply_spotless.yml index c06624490..a11fc25d2 100644 --- a/.github/workflows/apply_spotless.yml +++ b/.github/workflows/apply_spotless.yml @@ -35,7 +35,7 @@ jobs: token: ${{ secrets.PAT || github.token }} - name: set up Java 17 - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: '17' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c5b1819d9..91f90e334 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,7 @@ jobs: with: token: ${{ secrets.PAT || github.token }} - name: set up Java 17 - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: '17' diff --git a/.github/workflows/update_deps.yml b/.github/workflows/update_deps.yml index dddf05266..d5f8ca4d2 100644 --- a/.github/workflows/update_deps.yml +++ b/.github/workflows/update_deps.yml @@ -9,7 +9,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: 17 distribution: 'zulu' From d8ef2dd19f25b74bdbbd5e78f96cdfb30be61a3c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 12:07:07 -0800 Subject: [PATCH 12/15] Bump stefanzweifel/git-auto-commit-action from 4 to 5 (#221) Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 4 to 5. - [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases) - [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4...v5) --- updated-dependencies: - dependency-name: stefanzweifel/git-auto-commit-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/apply_spotless.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/apply_spotless.yml b/.github/workflows/apply_spotless.yml index a11fc25d2..b36a3626f 100644 --- a/.github/workflows/apply_spotless.yml +++ b/.github/workflows/apply_spotless.yml @@ -44,6 +44,6 @@ jobs: run: ./gradlew :compose:spotlessApply --init-script gradle/init.gradle.kts --no-configuration-cache --stacktrace - name: Auto-commit if spotlessApply has changes - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: Apply Spotless From 2f34f3b1f916f41d7c3b84286b24a9e1d57951f6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 09:03:48 +0000 Subject: [PATCH 13/15] Bump actions/checkout from 3 to 4 (#222) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/apply_spotless.yml | 2 +- .github/workflows/build.yml | 2 +- .github/workflows/sync_main_latest.yml | 2 +- .github/workflows/update_deps.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/apply_spotless.yml b/.github/workflows/apply_spotless.yml index b36a3626f..79c68e238 100644 --- a/.github/workflows/apply_spotless.yml +++ b/.github/workflows/apply_spotless.yml @@ -30,7 +30,7 @@ jobs: steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.PAT || github.token }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 91f90e334..51f9b6cbc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: timeout-minutes: 30 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: token: ${{ secrets.PAT || github.token }} - name: set up Java 17 diff --git a/.github/workflows/sync_main_latest.yml b/.github/workflows/sync_main_latest.yml index a8cc0368c..8a57f7356 100644 --- a/.github/workflows/sync_main_latest.yml +++ b/.github/workflows/sync_main_latest.yml @@ -11,7 +11,7 @@ jobs: name: Syncing branches steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Merge main into latest run: git fetch && git switch latest && git merge origin/main diff --git a/.github/workflows/update_deps.yml b/.github/workflows/update_deps.yml index d5f8ca4d2..ffe44b0e0 100644 --- a/.github/workflows/update_deps.yml +++ b/.github/workflows/update_deps.yml @@ -7,7 +7,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: set up JDK 17 uses: actions/setup-java@v4 with: From db747abfd9ab19b127575e1caa8516024e7479ab Mon Sep 17 00:00:00 2001 From: Rebecca Franks Date: Sat, 24 Feb 2024 12:50:12 +0000 Subject: [PATCH 14/15] Upgrade dependencies (#225) * Update libs.versions.toml * Update versions * update deps * Update libs.versions.toml * Change material-adaptive artifact to point to new name * Update gradle/libs.versions.toml Co-authored-by: Alex Vanyo --------- Co-authored-by: Alex Vanyo --- compose/snippets/build.gradle.kts | 3 ++- .../SampleListDetailPaneScaffold.kt | 8 ++++---- gradle/libs.versions.toml | 18 ++++++++++-------- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/compose/snippets/build.gradle.kts b/compose/snippets/build.gradle.kts index 37d55a7b4..acfa8ddc8 100644 --- a/compose/snippets/build.gradle.kts +++ b/compose/snippets/build.gradle.kts @@ -93,7 +93,8 @@ dependencies { implementation(libs.androidx.compose.material3) implementation(libs.androidx.compose.material3.adaptive) - implementation(libs.androidx.compose.material3.adaptive.navigation.suite) + implementation(libs.androidx.compose.material3.adaptive.layout) + implementation(libs.androidx.compose.material3.adaptive.navigation) implementation(libs.androidx.compose.material) implementation(libs.androidx.compose.runtime) diff --git a/compose/snippets/src/main/java/com/example/compose/snippets/adaptivelayouts/SampleListDetailPaneScaffold.kt b/compose/snippets/src/main/java/com/example/compose/snippets/adaptivelayouts/SampleListDetailPaneScaffold.kt index d06615fa1..a674512ad 100644 --- a/compose/snippets/src/main/java/com/example/compose/snippets/adaptivelayouts/SampleListDetailPaneScaffold.kt +++ b/compose/snippets/src/main/java/com/example/compose/snippets/adaptivelayouts/SampleListDetailPaneScaffold.kt @@ -28,11 +28,11 @@ import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.material3.Card import androidx.compose.material3.ListItem import androidx.compose.material3.Text -import androidx.compose.material3.adaptive.AnimatedPane import androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi -import androidx.compose.material3.adaptive.ListDetailPaneScaffold -import androidx.compose.material3.adaptive.ListDetailPaneScaffoldRole -import androidx.compose.material3.adaptive.rememberListDetailPaneScaffoldNavigator +import androidx.compose.material3.adaptive.layout.AnimatedPane +import androidx.compose.material3.adaptive.layout.ListDetailPaneScaffold +import androidx.compose.material3.adaptive.layout.ListDetailPaneScaffoldRole +import androidx.compose.material3.adaptive.navigation.rememberListDetailPaneScaffoldNavigator import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8a407f47f..035b5f151 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,9 +1,9 @@ [versions] accompanist = "0.32.0" androidGradlePlugin = "8.2.2" -androidx-activity-compose = "1.9.0-alpha02" +androidx-activity-compose = "1.9.0-alpha03" androidx-appcompat = "1.6.1" -androidx-compose-bom = "2024.01.00" +androidx-compose-bom = "2024.02.01" androidx-constraintlayout = "2.1.4" androidx-constraintlayout-compose = "1.0.1" androidx-coordinator-layout = "1.2.0" @@ -13,11 +13,11 @@ androidx-fragment-ktx = "1.6.2" androidx-glance-appwidget = "1.0.0" androidx-lifecycle-compose = "2.7.0" androidx-lifecycle-runtime-compose = "2.7.0" -androidx-navigation = "2.7.6" +androidx-navigation = "2.7.7" androidx-paging = "3.2.1" androidx-test = "1.5.0" androidx-test-espresso = "3.5.1" -androidxHiltNavigationCompose = "1.1.0" +androidxHiltNavigationCompose = "1.2.0" coil = "2.5.0" # @keep compileSdk = "34" @@ -32,8 +32,8 @@ kotlin = "1.9.20" ksp = "1.8.0-1.0.9" maps-compose = "4.3.2" material = "1.11.0" -material3-adaptive = "1.0.0-alpha06" -material3-adaptive-navigation-suite = "1.0.0-alpha03" +material3-adaptive = "1.0.0-alpha07" +material3-adaptive-navigation-suite = "1.0.0-alpha04" media3 = "1.2.1" # @keep minSdk = "21" @@ -58,7 +58,9 @@ androidx-compose-material = { module = "androidx.compose.material:material" } androidx-compose-material-iconsExtended = { module = "androidx.compose.material:material-icons-extended" } androidx-compose-material-ripple = { module = "androidx.compose.material:material-ripple" } androidx-compose-material3 = { module = "androidx.compose.material3:material3" } -androidx-compose-material3-adaptive = { module = "androidx.compose.material3:material3-adaptive", version.ref = "material3-adaptive" } +androidx-compose-material3-adaptive = { module = "androidx.compose.material3.adaptive:adaptive", version.ref = "material3-adaptive" } +androidx-compose-material3-adaptive-layout = { module = "androidx.compose.material3.adaptive:adaptive-layout", version.ref = "material3-adaptive" } +androidx-compose-material3-adaptive-navigation = { module = "androidx.compose.material3.adaptive:adaptive-navigation", version.ref = "material3-adaptive" } androidx-compose-material3-adaptive-navigation-suite = { module = "androidx.compose.material3:material3-adaptive-navigation-suite", version.ref = "material3-adaptive-navigation-suite" } androidx-compose-materialWindow = { module = "androidx.compose.material3:material3-window-size-class" } androidx-compose-runtime = { module = "androidx.compose.runtime:runtime" } @@ -81,7 +83,7 @@ androidx-emoji2-views = { module = "androidx.emoji2:emoji2-views", version.ref = androidx-fragment-ktx = { module = "androidx.fragment:fragment-ktx", version.ref = "androidx-fragment-ktx" } androidx-glance-appwidget = { module = "androidx.glance:glance-appwidget", version.ref = "androidx-glance-appwidget" } androidx-glance-material3 = { module = "androidx.glance:glance-material3", version.ref = "androidx-glance-appwidget" } -androidx-graphics-shapes = "androidx.graphics:graphics-shapes:1.0.0-alpha04" +androidx-graphics-shapes = "androidx.graphics:graphics-shapes:1.0.0-alpha05" androidx-hilt-navigation-compose = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "androidxHiltNavigationCompose" } androidx-lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidx-lifecycle-compose" } androidx-lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "androidx-lifecycle-runtime-compose" } From 695d9bb1e6d68125a5c47d194e0039ad7b9baf9a Mon Sep 17 00:00:00 2001 From: Chris Arriola Date: Mon, 26 Feb 2024 09:33:36 -0800 Subject: [PATCH 15/15] Use -s ours and add --allow-unrelated-histories to sync workflow. (#214) --- .github/workflows/sync_main_latest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync_main_latest.yml b/.github/workflows/sync_main_latest.yml index 8a57f7356..455feef8b 100644 --- a/.github/workflows/sync_main_latest.yml +++ b/.github/workflows/sync_main_latest.yml @@ -14,7 +14,7 @@ jobs: uses: actions/checkout@v4 - name: Merge main into latest - run: git fetch && git switch latest && git merge origin/main + run: git fetch && git switch latest && git merge -s ours origin/main --allow-unrelated-histories - name: Create pull request id: cpr