Skip to content

🤖 Update Dependencies for Compose 1.8 release #504

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

Merged
merged 8 commits into from
Apr 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions buildscripts/toml-updater-config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ versionCatalogUpdate {
keep {
// keep versions without any library or plugin reference
keepUnusedVersions.set(true)
// keep all libraries that aren't used in the project
keepUnusedLibraries.set(true)
// keep all plugins that aren't used in the project
keepUnusedPlugins.set(true)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.stringResource
import androidx.window.core.layout.WindowWidthSizeClass
import androidx.window.core.layout.WindowSizeClass.Companion.WIDTH_DP_EXPANDED_LOWER_BOUND
import com.example.compose.snippets.R

// [START android_compose_adaptivelayouts_sample_navigation_suite_scaffold_destinations]
Expand Down Expand Up @@ -159,7 +159,7 @@ fun SampleNavigationSuiteScaffoldCustomType() {
// [START android_compose_adaptivelayouts_sample_navigation_suite_scaffold_layout_type]
val adaptiveInfo = currentWindowAdaptiveInfo()
val customNavSuiteType = with(adaptiveInfo) {
if (windowSizeClass.windowWidthSizeClass == WindowWidthSizeClass.EXPANDED) {
if (windowSizeClass.isWidthAtLeastBreakpoint(WIDTH_DP_EXPANDED_LOWER_BOUND)) {
NavigationSuiteType.NavigationDrawer
} else {
NavigationSuiteScaffoldDefaults.calculateFromAdaptiveInfo(adaptiveInfo)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ fun SharedTransitionScope.SnackItem(
SnackContents(
snack = snack,
modifier = Modifier.sharedElement(
state = rememberSharedContentState(key = snack.name),
sharedContentState = rememberSharedContentState(key = snack.name),
animatedVisibilityScope = this@AnimatedVisibility,
boundsTransform = boundsTransition,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private fun AnimatedVisibilitySharedElementShortenedExample() {
SnackContents(
snack = snack,
modifier = Modifier.sharedElement(
state = rememberSharedContentState(key = snack.name),
sharedContentState = rememberSharedContentState(key = snack.name),
animatedVisibilityScope = this@AnimatedVisibility
),
onClick = {
Expand Down Expand Up @@ -175,7 +175,7 @@ fun SharedTransitionScope.SnackEditDetails(
SnackContents(
snack = targetSnack,
modifier = Modifier.sharedElement(
state = rememberSharedContentState(key = targetSnack.name),
sharedContentState = rememberSharedContentState(key = targetSnack.name),
animatedVisibilityScope = this@AnimatedContent,
),
onClick = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import androidx.annotation.RequiresApi
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.draganddrop.dragAndDropSource
import androidx.compose.foundation.draganddrop.dragAndDropTarget
import androidx.compose.foundation.gestures.detectTapGestures
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
Expand All @@ -40,40 +39,24 @@ private fun DragAndDropSnippet() {

val url = ""

// [START android_compose_drag_and_drop_1]
Modifier.dragAndDropSource {
detectTapGestures(onLongPress = {
// Transfer data here.
})
}
// [END android_compose_drag_and_drop_1]

// [START android_compose_drag_and_drop_2]
Modifier.dragAndDropSource {
detectTapGestures(onLongPress = {
startTransfer(
DragAndDropTransferData(
ClipData.newPlainText(
"image Url", url
)
)
Modifier.dragAndDropSource { _ ->
DragAndDropTransferData(
ClipData.newPlainText(
"image Url", url
)
})
)
}
// [END android_compose_drag_and_drop_2]

// [START android_compose_drag_and_drop_3]
Modifier.dragAndDropSource {
detectTapGestures(onLongPress = {
startTransfer(
DragAndDropTransferData(
ClipData.newPlainText(
"image Url", url
),
flags = View.DRAG_FLAG_GLOBAL
)
)
})
Modifier.dragAndDropSource { _ ->
DragAndDropTransferData(
ClipData.newPlainText(
"image Url", url
),
flags = View.DRAG_FLAG_GLOBAL
)
}
// [END android_compose_drag_and_drop_3]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ import androidx.compose.foundation.interaction.PressInteraction
import androidx.compose.foundation.layout.Box
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material.LocalRippleConfiguration
import androidx.compose.material.LocalUseFallbackRippleImplementation
import androidx.compose.material.RippleConfiguration
import androidx.compose.material.ripple
import androidx.compose.material.ripple.LocalRippleTheme
import androidx.compose.material.ripple.RippleAlpha
import androidx.compose.material.ripple.RippleTheme
import androidx.compose.material.ripple.rememberRipple
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.LocalUseFallbackRippleImplementation
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
Expand Down Expand Up @@ -239,7 +240,7 @@ private class ScaleIndicationNode(
fun App() {
}

@OptIn(ExperimentalMaterialApi::class)
@OptIn(ExperimentalMaterial3Api::class)
@Composable
private fun LocalUseFallbackRippleImplementationExample() {
// [START android_compose_userinteractions_localusefallbackrippleimplementation]
Expand All @@ -252,7 +253,7 @@ private fun LocalUseFallbackRippleImplementationExample() {
}

// [START android_compose_userinteractions_localusefallbackrippleimplementation_app_theme]
@OptIn(ExperimentalMaterialApi::class)
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun MyAppTheme(content: @Composable () -> Unit) {
CompositionLocalProvider(LocalUseFallbackRippleImplementation provides true) {
Expand Down
80 changes: 40 additions & 40 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,82 +1,84 @@
[versions]
accompanist = "0.36.0"
androidGradlePlugin = "8.8.1"
androidx-activity-compose = "1.10.0"
activityKtx = "1.10.1"
android-googleid = "1.1.1"
androidGradlePlugin = "8.9.2"
androidx-activity-compose = "1.10.1"
androidx-appcompat = "1.7.0"
androidx-compose-bom = "2025.02.00"
androidx-compose-bom = "2025.04.01"
androidx-compose-ui-test = "1.7.0-alpha08"
androidx-constraintlayout = "2.2.1"
androidx-constraintlayout-compose = "1.1.0"
androidx-coordinator-layout = "1.2.0"
androidx-corektx = "1.16.0-beta01"
androidx-constraintlayout-compose = "1.1.1"
androidx-coordinator-layout = "1.3.0"
androidx-corektx = "1.16.0"
androidx-credentials = "1.5.0"
androidx-credentials-play-services-auth = "1.5.0"
androidx-emoji2-views = "1.5.0"
androidx-fragment-ktx = "1.8.6"
androidx-glance-appwidget = "1.1.1"
androidx-lifecycle-compose = "2.8.7"
androidx-lifecycle-runtime-compose = "2.8.7"
androidx-navigation = "2.8.7"
androidx-navigation = "2.8.9"
androidx-paging = "3.3.6"
androidx-startup-runtime = "1.2.0"
androidx-test = "1.6.1"
androidx-test-espresso = "3.6.1"
androidx-test-junit = "1.2.1"
androidx-window = "1.4.0-rc01"
androidx-window-core = "1.4.0-beta02"
androidx-window-java = "1.3.0"
androidx-window = "1.5.0-alpha01"
androidx-window-core = "1.5.0-alpha01"
androidx-window-java = "1.5.0-alpha01"
# @keep
androidx-xr = "1.0.0-alpha03"
androidxHiltNavigationCompose = "1.2.0"
appcompat = "1.7.0"
coil = "2.7.0"
android-googleid = "1.1.1"
# @keep
compileSdk = "35"
compose-latest = "1.7.8"
compose-latest = "1.8.0"
composeUiTooling = "1.4.1"
coreSplashscreen = "1.0.1"
coroutines = "1.10.1"
coroutines = "1.10.2"
glide = "1.0.0-beta01"
google-maps = "19.0.0"
google-maps = "19.2.0"
gradle-versions = "0.52.0"
guava = "33.4.0-jre"
hilt = "2.55"
horologist = "0.6.22"
guava = "33.4.8-jre"
hilt = "2.56.2"
horologist = "0.6.23"
junit = "4.13.2"
kotlin = "2.1.10"
kotlinxCoroutinesGuava = "1.9.0"
kotlin = "2.1.20"
kotlinCoroutinesOkhttp = "1.0"
kotlinxSerializationJson = "1.8.0"
ksp = "2.1.10-1.0.30"
maps-compose = "6.4.4"
material = "1.13.0-alpha10"
kotlinxCoroutinesGuava = "1.10.2"
kotlinxSerializationJson = "1.8.1"
ksp = "2.1.20-2.0.0"
maps-compose = "6.6.0"
material = "1.13.0-alpha13"
material3-adaptive = "1.1.0"
material3-adaptive-navigation-suite = "1.3.1"
media3 = "1.5.1"
material3-adaptive-navigation-suite = "1.3.2"
media3 = "1.6.1"
# @keep
minSdk = "21"
okHttp = "4.12.0"
playServicesWearable = "19.0.0"
protolayout = "1.2.1"
recyclerview = "1.4.0"
# @keep
androidx-xr = "1.0.0-alpha02"
targetSdk = "34"
tiles = "1.4.1"
version-catalog-update = "0.8.5"
version-catalog-update = "1.0.0"
wear = "1.3.0"
wearComposeFoundation = "1.4.1"
wearComposeMaterial = "1.4.1"
wearToolingPreview = "1.0.0"
activityKtx = "1.10.0"
okHttp = "4.12.0"
webkit = "1.13.0"

[libraries]
accompanist-adaptive = { module = "com.google.accompanist:accompanist-adaptive", version.ref = "accompanist" }
accompanist-permissions = "com.google.accompanist:accompanist-permissions:0.37.0"
accompanist-permissions = "com.google.accompanist:accompanist-permissions:0.37.2"
accompanist-theme-adapter-appcompat = { module = "com.google.accompanist:accompanist-themeadapter-appcompat", version.ref = "accompanist" }
accompanist-theme-adapter-material = { module = "com.google.accompanist:accompanist-themeadapter-material", version.ref = "accompanist" }
accompanist-theme-adapter-material3 = { module = "com.google.accompanist:accompanist-themeadapter-material3", version.ref = "accompanist" }
android-identity-googleid = { module = "com.google.android.libraries.identity.googleid:googleid", version.ref = "android-googleid" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity-compose" }
androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref = "activityKtx" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
androidx-compose-animation-graphics = { module = "androidx.compose.animation:animation-graphics", version.ref = "compose-latest" }
androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "androidx-compose-bom" }
Expand All @@ -102,7 +104,7 @@ androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" }
androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" }
androidx-compose-ui-util = { module = "androidx.compose.ui:ui-util" }
androidx-compose-ui-viewbinding = { module = "androidx.compose.ui:ui-viewbinding" }
androidx-constraintlayout = {module = "androidx.constraintlayout:constraintlayout", version.ref = "androidx-constraintlayout" }
androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "androidx-constraintlayout" }
androidx-constraintlayout-compose = { module = "androidx.constraintlayout:constraintlayout-compose", version.ref = "androidx-constraintlayout-compose" }
androidx-coordinator-layout = { module = "androidx.coordinatorlayout:coordinatorlayout", version.ref = "androidx-coordinator-layout" }
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidx-corektx" }
Expand All @@ -128,26 +130,26 @@ androidx-protolayout = { module = "androidx.wear.protolayout:protolayout", versi
androidx-protolayout-expression = { module = "androidx.wear.protolayout:protolayout-expression", version.ref = "protolayout" }
androidx-protolayout-material = { module = "androidx.wear.protolayout:protolayout-material", version.ref = "protolayout" }
androidx-recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerview" }
androidx-startup-runtime = {module = "androidx.startup:startup-runtime", version.ref = "androidx-startup-runtime" }
androidx-startup-runtime = { module = "androidx.startup:startup-runtime", version.ref = "androidx-startup-runtime" }
androidx-test-core = { module = "androidx.test:core", version.ref = "androidx-test" }
androidx-test-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "androidx-test-espresso" }
androidx-test-runner = "androidx.test:runner:1.6.2"
androidx-test-ext-junit = { module = "androidx.test.ext:junit", version.ref = "androidx-test-junit" }
androidx-test-runner = "androidx.test:runner:1.6.2"
androidx-tiles = { module = "androidx.wear.tiles:tiles", version.ref = "tiles" }
androidx-tiles-renderer = { module = "androidx.wear.tiles:tiles-renderer", version.ref = "tiles" }
androidx-tiles-testing = { module = "androidx.wear.tiles:tiles-testing", version.ref = "tiles" }
androidx-tiles-tooling = { module = "androidx.wear.tiles:tiles-tooling", version.ref = "tiles" }
androidx-tiles-tooling-preview = { module = "androidx.wear.tiles:tiles-tooling-preview", version.ref = "tiles" }
androidx-wear = { module = "androidx.wear:wear", version.ref = "wear" }
androidx-wear-tooling-preview = { module = "androidx.wear:wear-tooling-preview", version.ref = "wearToolingPreview" }
androidx-webkit = { module = "androidx.webkit:webkit", version.ref = "webkit" }
androidx-window = { module = "androidx.window:window", version.ref = "androidx-window" }
androidx-window-core = { module = "androidx.window:window-core", version.ref = "androidx-window-core" }
androidx-window-java = {module = "androidx.window:window-java", version.ref = "androidx-window-java" }
androidx-work-runtime-ktx = "androidx.work:work-runtime-ktx:2.10.0"
androidx-window-java = { module = "androidx.window:window-java", version.ref = "androidx-window-java" }
androidx-work-runtime-ktx = "androidx.work:work-runtime-ktx:2.10.1"
androidx-xr-arcore = { module = "androidx.xr.arcore:arcore", version.ref = "androidx-xr" }
androidx-xr-compose = { module = "androidx.xr.compose:compose", version.ref = "androidx-xr" }
androidx-xr-scenecore = { module = "androidx.xr.scenecore:scenecore", version.ref = "androidx-xr" }
android-identity-googleid = {module = "com.google.android.libraries.identity.googleid:googleid", version.ref = "android-googleid"}
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
coil-kt-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" }
compose-foundation = { module = "androidx.wear.compose:compose-foundation", version.ref = "wearComposeFoundation" }
Expand All @@ -169,10 +171,8 @@ kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutine
kotlinx-coroutines-guava = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-guava", version.ref = "kotlinxCoroutinesGuava" }
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }
okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okHttp" }
play-services-wearable = { module = "com.google.android.gms:play-services-wearable", version.ref = "playServicesWearable" }
androidx-activity-ktx = { group = "androidx.activity", name = "activity-ktx", version.ref = "activityKtx" }
okhttp = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okHttp" }
androidx-webkit = { group = "androidx.webkit", name = "webkit", version.ref = "webkit" }

[plugins]
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down