Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 030f90d

Browse files
authoredMay 13, 2025··
Merge branch 'main' into fix-recomp-highlighter
2 parents 1a2582e + 21896a6 commit 030f90d

29 files changed

+1118
-169
lines changed
 

‎gradle/libs.versions.toml

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
accompanist = "0.36.0"
33
activityKtx = "1.10.1"
44
android-googleid = "1.1.1"
5-
androidGradlePlugin = "8.9.2"
5+
androidGradlePlugin = "8.10.0"
66
androidx-activity-compose = "1.10.1"
77
androidx-appcompat = "1.7.0"
8-
androidx-compose-bom = "2025.04.01"
8+
androidx-compose-bom = "2025.05.00"
99
androidx-compose-ui-test = "1.7.0-alpha08"
10-
androidx-compose-ui-test-junit4-accessibility = "1.8.0-rc02"
10+
androidx-compose-ui-test-junit4-accessibility = "1.9.0-alpha02"
1111
androidx-constraintlayout = "2.2.1"
1212
androidx-constraintlayout-compose = "1.1.1"
1313
androidx-coordinator-layout = "1.3.0"
@@ -17,25 +17,25 @@ androidx-credentials-play-services-auth = "1.5.0"
1717
androidx-emoji2-views = "1.5.0"
1818
androidx-fragment-ktx = "1.8.6"
1919
androidx-glance-appwidget = "1.1.1"
20-
androidx-lifecycle-compose = "2.8.7"
21-
androidx-lifecycle-runtime-compose = "2.8.7"
22-
androidx-navigation = "2.8.9"
20+
androidx-lifecycle-compose = "2.9.0"
21+
androidx-lifecycle-runtime-compose = "2.9.0"
22+
androidx-navigation = "2.9.0"
2323
androidx-paging = "3.3.6"
2424
androidx-startup-runtime = "1.2.0"
2525
androidx-test = "1.6.1"
2626
androidx-test-espresso = "3.6.1"
2727
androidx-test-junit = "1.2.1"
28-
androidx-window = "1.5.0-alpha01"
29-
androidx-window-core = "1.5.0-alpha01"
30-
androidx-window-java = "1.5.0-alpha01"
28+
androidx-window = "1.5.0-alpha02"
29+
androidx-window-core = "1.5.0-alpha02"
30+
androidx-window-java = "1.5.0-alpha02"
3131
# @keep
3232
androidx-xr = "1.0.0-alpha03"
3333
androidxHiltNavigationCompose = "1.2.0"
3434
appcompat = "1.7.0"
3535
coil = "2.7.0"
3636
# @keep
3737
compileSdk = "35"
38-
compose-latest = "1.8.0"
38+
compose-latest = "1.8.1"
3939
composeUiTooling = "1.4.1"
4040
coreSplashscreen = "1.0.1"
4141
coroutines = "1.10.2"
@@ -44,13 +44,13 @@ google-maps = "19.2.0"
4444
gradle-versions = "0.52.0"
4545
guava = "33.4.8-jre"
4646
hilt = "2.56.2"
47-
horologist = "0.6.23"
47+
horologist = "0.7.10-alpha"
4848
junit = "4.13.2"
4949
kotlin = "2.1.20"
5050
kotlinCoroutinesOkhttp = "1.0"
5151
kotlinxCoroutinesGuava = "1.10.2"
5252
kotlinxSerializationJson = "1.8.1"
53-
ksp = "2.1.20-2.0.0"
53+
ksp = "2.1.20-2.0.1"
5454
maps-compose = "6.6.0"
5555
material = "1.13.0-alpha13"
5656
material3-adaptive = "1.1.0"
@@ -60,20 +60,25 @@ media3 = "1.6.1"
6060
minSdk = "21"
6161
okHttp = "4.12.0"
6262
playServicesWearable = "19.0.0"
63-
protolayout = "1.2.1"
63+
protolayout = "1.3.0-beta02"
6464
recyclerview = "1.4.0"
65+
# @keep
66+
androidx-xr-arcore = "1.0.0-alpha04"
67+
androidx-xr-scenecore = "1.0.0-alpha04"
68+
androidx-xr-compose = "1.0.0-alpha04"
6569
targetSdk = "34"
66-
tiles = "1.4.1"
70+
tiles = "1.5.0-beta01"
6771
version-catalog-update = "1.0.0"
6872
wear = "1.3.0"
69-
wearComposeFoundation = "1.4.1"
70-
wearComposeMaterial = "1.4.1"
73+
wearComposeFoundation = "1.5.0-beta01"
74+
wearComposeMaterial = "1.5.0-beta01"
75+
wearComposeMaterial3 = "1.5.0-beta01"
7176
wearToolingPreview = "1.0.0"
7277
webkit = "1.13.0"
7378

7479
[libraries]
75-
accompanist-adaptive = { module = "com.google.accompanist:accompanist-adaptive", version.ref = "accompanist" }
76-
accompanist-permissions = "com.google.accompanist:accompanist-permissions:0.37.2"
80+
accompanist-adaptive = "com.google.accompanist:accompanist-adaptive:0.37.3"
81+
accompanist-permissions = "com.google.accompanist:accompanist-permissions:0.37.3"
7782
accompanist-theme-adapter-appcompat = { module = "com.google.accompanist:accompanist-themeadapter-appcompat", version.ref = "accompanist" }
7883
accompanist-theme-adapter-material = { module = "com.google.accompanist:accompanist-themeadapter-material", version.ref = "accompanist" }
7984
accompanist-theme-adapter-material3 = { module = "com.google.accompanist:accompanist-themeadapter-material3", version.ref = "accompanist" }
@@ -98,9 +103,9 @@ androidx-compose-runtime-livedata = { module = "androidx.compose.runtime:runtime
98103
androidx-compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose-latest" }
99104
androidx-compose-ui-googlefonts = { module = "androidx.compose.ui:ui-text-google-fonts" }
100105
androidx-compose-ui-graphics = { module = "androidx.compose.ui:ui-graphics" }
101-
androidx-compose-ui-test = { module = "androidx.compose.ui:ui-test", version.ref = "compose-latest" }
102-
androidx-compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "compose-latest" }
103-
androidx-compose-ui-test-junit4-accessibility = { group = "androidx.compose.ui", name = "ui-test-junit4-accessibility", version.ref = "androidx-compose-ui-test-junit4-accessibility" }
106+
androidx-compose-ui-test = { module = "androidx.compose.ui:ui-test", version.ref = "compose-latest" }
107+
androidx-compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "compose-latest" }
108+
androidx-compose-ui-test-junit4-accessibility = { module = "androidx.compose.ui:ui-test-junit4-accessibility", version.ref = "androidx-compose-ui-test-junit4-accessibility" }
104109
androidx-compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest" }
105110
androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" }
106111
androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" }
@@ -131,6 +136,7 @@ androidx-paging-compose = { module = "androidx.paging:paging-compose", version.r
131136
androidx-protolayout = { module = "androidx.wear.protolayout:protolayout", version.ref = "protolayout" }
132137
androidx-protolayout-expression = { module = "androidx.wear.protolayout:protolayout-expression", version.ref = "protolayout" }
133138
androidx-protolayout-material = { module = "androidx.wear.protolayout:protolayout-material", version.ref = "protolayout" }
139+
androidx-protolayout-material3 = { module = "androidx.wear.protolayout:protolayout-material3", version.ref = "protolayout" }
134140
androidx-recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerview" }
135141
androidx-startup-runtime = { module = "androidx.startup:startup-runtime", version.ref = "androidx-startup-runtime" }
136142
androidx-test-core = { module = "androidx.test:core", version.ref = "androidx-test" }
@@ -149,13 +155,13 @@ androidx-window = { module = "androidx.window:window", version.ref = "androidx-w
149155
androidx-window-core = { module = "androidx.window:window-core", version.ref = "androidx-window-core" }
150156
androidx-window-java = { module = "androidx.window:window-java", version.ref = "androidx-window-java" }
151157
androidx-work-runtime-ktx = "androidx.work:work-runtime-ktx:2.10.1"
152-
androidx-xr-arcore = { module = "androidx.xr.arcore:arcore", version.ref = "androidx-xr" }
153-
androidx-xr-compose = { module = "androidx.xr.compose:compose", version.ref = "androidx-xr" }
154-
androidx-xr-scenecore = { module = "androidx.xr.scenecore:scenecore", version.ref = "androidx-xr" }
158+
androidx-xr-arcore = { module = "androidx.xr.arcore:arcore", version.ref = "androidx-xr-arcore" }
159+
androidx-xr-compose = { module = "androidx.xr.compose:compose", version.ref = "androidx-xr-compose" }
160+
androidx-xr-scenecore = { module = "androidx.xr.scenecore:scenecore", version.ref = "androidx-xr-scenecore" }
155161
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
156162
coil-kt-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" }
157163
compose-foundation = { module = "androidx.wear.compose:compose-foundation", version.ref = "wearComposeFoundation" }
158-
compose-material = { module = "androidx.wear.compose:compose-material", version.ref = "wearComposeMaterial" }
164+
wear-compose-material = { module = "androidx.wear.compose:compose-material", version.ref = "wearComposeMaterial" }
159165
compose-ui-tooling = { module = "androidx.wear.compose:compose-ui-tooling", version.ref = "composeUiTooling" }
160166
glide-compose = { module = "com.github.bumptech.glide:compose", version.ref = "glide" }
161167
google-android-material = { module = "com.google.android.material:material", version.ref = "material" }
@@ -175,6 +181,7 @@ kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-t
175181
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }
176182
okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okHttp" }
177183
play-services-wearable = { module = "com.google.android.gms:play-services-wearable", version.ref = "playServicesWearable" }
184+
wear-compose-material3 = { module = "androidx.wear.compose:compose-material3", version.ref = "wearComposeMaterial3" }
178185

179186
[plugins]
180187
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }

‎misc/src/main/java/com/example/snippets/ActivityEmbeddingJavaSnippets.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.example.snippets;
22

3+
import android.annotation.SuppressLint;
34
import android.app.Activity;
45
import android.content.ComponentName;
56
import android.content.Context;
@@ -348,6 +349,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
348349

349350
static class ActivityPinningSnippetsActivity extends Activity {
350351

352+
@SuppressLint("RequiresWindowSdk")
351353
@Override
352354
protected void onCreate(@Nullable Bundle savedInstanceState) {
353355
super.onCreate(savedInstanceState);

‎misc/src/main/java/com/example/snippets/ActivityEmbeddingKotlinSnippets.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package com.example.snippets
1818

19+
import android.annotation.SuppressLint
1920
import android.app.Activity
2021
import android.content.ComponentName
2122
import android.content.Context
@@ -53,6 +54,7 @@ class ActivityEmbeddingKotlinSnippets {
5354

5455
class SplitAttributesCalculatorSnippetsActivity : AppCompatActivity() {
5556

57+
@SuppressLint("RequiresWindowSdk")
5658
override fun onCreate(savedInstanceState: Bundle?) {
5759
super.onCreate(savedInstanceState)
5860

@@ -224,6 +226,7 @@ class ActivityEmbeddingKotlinSnippets {
224226

225227
class SplitAttributesBuilderSnippetsActivity : AppCompatActivity() {
226228

229+
@SuppressLint("RequiresWindowSdk")
227230
@RequiresApi(VERSION_CODES.M)
228231
override fun onCreate(savedInstanceState: Bundle?) {
229232
super.onCreate(savedInstanceState)
@@ -327,6 +330,7 @@ class ActivityEmbeddingKotlinSnippets {
327330
}
328331

329332
class ActivityPinningSnippetsActivity : AppCompatActivity() {
333+
@SuppressLint("RequiresWindowSdk")
330334
override fun onCreate(savedInstanceState: Bundle?) {
331335
super.onCreate(savedInstanceState)
332336
setContentView(R.layout.activity_main)

‎wear/build.gradle.kts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ dependencies {
5959
implementation(libs.androidx.wear)
6060
implementation(libs.androidx.protolayout)
6161
implementation(libs.androidx.protolayout.material)
62+
implementation(libs.androidx.protolayout.material3)
6263
implementation(libs.androidx.protolayout.expression)
6364
debugImplementation(libs.androidx.tiles.renderer)
6465
testImplementation(libs.androidx.tiles.testing)
@@ -69,7 +70,8 @@ dependencies {
6970
implementation(platform(libs.androidx.compose.bom))
7071
implementation(libs.androidx.compose.ui)
7172
implementation(libs.androidx.compose.ui.tooling.preview)
72-
implementation(libs.compose.material)
73+
implementation(libs.wear.compose.material)
74+
implementation(libs.wear.compose.material3)
7375
implementation(libs.compose.foundation)
7476
implementation(libs.androidx.activity.compose)
7577
implementation(libs.androidx.core.splashscreen)

‎wear/src/main/AndroidManifest.xml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
android:value="true" />
2525

2626
<activity
27-
android:name=".snippets.MainActivity"
27+
android:name=".snippets.m3.MainActivity"
2828
android:exported="true"
2929
android:taskAffinity=""
3030
android:theme="@android:style/Theme.DeviceDefault">
@@ -52,6 +52,23 @@
5252
</service>
5353
<!-- [END android_wear_tile_manifest] -->
5454

55+
<!-- [START android_wear_m3_tile_manifest] -->
56+
<service
57+
android:name=".snippets.m3.tile.MyTileService"
58+
android:label="@string/tile_label"
59+
android:description="@string/tile_description"
60+
android:icon="@mipmap/ic_launcher"
61+
android:exported="true"
62+
android:permission="com.google.android.wearable.permission.BIND_TILE_PROVIDER">
63+
<intent-filter>
64+
<action android:name="androidx.wear.tiles.action.BIND_TILE_PROVIDER" />
65+
</intent-filter>
66+
67+
<meta-data android:name="androidx.wear.tiles.PREVIEW"
68+
android:resource="@drawable/tile_preview" />
69+
</service>
70+
<!-- [END android_wear_m3_tile_manifest] -->
71+
5572
</application>
5673

5774
</manifest>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Copyright 2021 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.example.wear.snippets.m3
18+
19+
import android.os.Bundle
20+
import androidx.activity.ComponentActivity
21+
import androidx.activity.compose.setContent
22+
import androidx.compose.runtime.Composable
23+
import com.example.wear.snippets.m3.list.ComposeList
24+
25+
class MainActivity : ComponentActivity() {
26+
override fun onCreate(savedInstanceState: Bundle?) {
27+
super.onCreate(savedInstanceState)
28+
29+
setContent {
30+
WearApp()
31+
}
32+
}
33+
}
34+
35+
@Composable
36+
fun WearApp() {
37+
// insert here the snippet you want to test
38+
ComposeList()
39+
}

0 commit comments

Comments
 (0)
Please sign in to comment.