Skip to content
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d3a1842
Update dependencies
MagicalMeghan Apr 27, 2026
ac040bd
Update libs.versions.toml
MagicalMeghan Apr 27, 2026
23b9f55
update issues with android block
MagicalMeghan Apr 28, 2026
8ccb60d
Update boolean and any deprecation
MagicalMeghan Apr 29, 2026
5e9d3e2
Merge branch 'main' into mm/snippet-update-2026-04-27
MagicalMeghan Apr 29, 2026
81d6e3d
re-add health connect
MagicalMeghan Apr 29, 2026
40047b1
Merge branch 'mm/snippet-update-2026-04-27' of https://github.com/and…
MagicalMeghan Apr 29, 2026
7ee96ae
Update build.gradle.kts
MagicalMeghan Apr 29, 2026
2dabcd6
Update compile SDK and kotlin block placement
MagicalMeghan Apr 29, 2026
481e178
Add safe calls to bluetooth
MagicalMeghan Apr 29, 2026
74580e8
Downgrade accompanist
MagicalMeghan Apr 29, 2026
4a42fd6
Update libs.versions.toml
MagicalMeghan Apr 29, 2026
cf3d951
Update DatePickers.kt
MagicalMeghan Apr 30, 2026
bf8a8d0
Merge branch 'main' into mm/snippet-update-2026-04-27
MagicalMeghan May 1, 2026
b37565f
Address Kat review
MagicalMeghan May 4, 2026
8e62d0e
Merge branch 'mm/snippet-update-2026-04-27' of https://github.com/and…
MagicalMeghan May 4, 2026
7358a09
Merge branch 'main' into mm/snippet-update-2026-04-27
kkuan2011 May 4, 2026
9774b63
Merge branch 'main' into mm/snippet-update-2026-04-27
MagicalMeghan May 5, 2026
6f38f0f
Merge branch 'main' into mm/snippet-update-2026-04-27
MagicalMeghan May 6, 2026
960a063
Merge branch 'main' into mm/snippet-update-2026-04-27
MagicalMeghan May 6, 2026
1fee432
Update libs.versions.toml
MagicalMeghan May 6, 2026
3895a97
Merge branch 'main' into mm/snippet-update-2026-04-27
MagicalMeghan May 8, 2026
2b016ff
Merge branch 'main' into mm/snippet-update-2026-04-27
raystatic May 9, 2026
076c5ab
Updated Dependencies for compose 1.11.1
raystatic May 9, 2026
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
8 changes: 5 additions & 3 deletions bluetoothle/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
plugins {
alias(libs.plugins.android.application)
}

kotlin {
jvmToolchain(17)
}

android {
compileSdk = libs.versions.compileSdk.get().toInt()
namespace = "com.sample.android.bluetoothle"
Expand All @@ -18,9 +23,6 @@ android {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlin {
jvmToolchain(17)
}
buildTypes {
getByName("debug") {
signingConfig = signingConfigs.getByName("debug")
Expand Down
11 changes: 6 additions & 5 deletions camerax/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ plugins {
alias(libs.plugins.compose.compiler)
}

kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget("17")
}
}

android {
namespace = "com.example.camerax.snippets"
compileSdk = 36
Expand Down Expand Up @@ -48,11 +54,6 @@ android {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget("17")
}
}
buildFeatures {
compose = true
}
Expand Down
9 changes: 5 additions & 4 deletions compose/snippets/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ plugins {
alias(libs.plugins.kotlin.serialization)
}

kotlin {
jvmToolchain(17)
}

android {
compileSdk = libs.versions.compileSdk.get().toInt()
namespace = "com.example.compose.snippets"
Expand All @@ -43,6 +47,7 @@ android {

getByName("release") {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro")
}
Expand All @@ -53,10 +58,6 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}

kotlin {
jvmToolchain(17)
}

buildFeatures {
compose = true
// Disable unused AGP features
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.test.SemanticsMatcher
import androidx.compose.ui.test.assert
import androidx.compose.ui.test.junit4.accessibility.enableAccessibilityChecks
import androidx.compose.ui.test.junit4.createAndroidComposeRule
import androidx.compose.ui.test.junit4.v2.createAndroidComposeRule
import androidx.compose.ui.test.onRoot
import androidx.compose.ui.test.tryPerformAccessibilityChecks
import androidx.compose.ui.unit.dp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.ImageBitmap
import androidx.compose.ui.test.captureToImage
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.junit4.v2.createComposeRule
import androidx.compose.ui.test.onRoot
import androidx.compose.ui.unit.dp
import org.junit.Rule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import androidx.compose.ui.test.DeviceConfigurationOverride
import androidx.compose.ui.test.FontScale
import androidx.compose.ui.test.FontWeightAdjustment
import androidx.compose.ui.test.ForcedSize
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.junit4.v2.createComposeRule
import androidx.compose.ui.test.then
import androidx.compose.ui.unit.DpSize
import androidx.compose.ui.unit.dp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.example.compose.snippets.interop

import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.junit4.createAndroidComposeRule
import androidx.compose.ui.test.junit4.v2.createAndroidComposeRule
import androidx.compose.ui.test.onNodeWithText
import androidx.test.platform.app.InstrumentationRegistry
import com.example.compose.snippets.MyActivity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import androidx.compose.ui.semantics.Role
import androidx.compose.ui.semantics.SemanticsProperties
import androidx.compose.ui.test.SemanticsMatcher
import androidx.compose.ui.test.assertIsOff
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.junit4.v2.createComposeRule
import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.onRoot
import androidx.compose.ui.test.performClick
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package com.example.compose.snippets.touchinput.pointerinput
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.test.click
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.junit4.v2.createComposeRule
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.performTouchInput
import androidx.compose.ui.test.swipeDown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ import com.example.compose.snippets.ui.theme.SnippetsTheme
import java.text.SimpleDateFormat
import java.util.Date
import java.util.Locale
import androidx.compose.ui.platform.LocalLocale

@Preview
@Composable
Expand Down Expand Up @@ -105,7 +106,7 @@ fun DatePickerExamples() {
// [END_EXCLUDE]
if (selectedDate != null) {
val date = Date(selectedDate!!)
val formattedDate = SimpleDateFormat("MMM dd, yyyy", Locale.getDefault()).format(date)
val formattedDate = SimpleDateFormat("MMM dd, yyyy", LocalLocale.current.platformLocale).format(date)
Text("Selected date: $formattedDate")
} else {
Text("No date selected")
Expand All @@ -121,8 +122,8 @@ fun DatePickerExamples() {
if (selectedDateRange.first != null && selectedDateRange.second != null) {
val startDate = Date(selectedDateRange.first!!)
val endDate = Date(selectedDateRange.second!!)
val formattedStartDate = SimpleDateFormat("MMM dd, yyyy", Locale.getDefault()).format(startDate)
val formattedEndDate = SimpleDateFormat("MMM dd, yyyy", Locale.getDefault()).format(endDate)
val formattedStartDate = SimpleDateFormat("MMM dd, yyyy", LocalLocale.current.platformLocale).format(startDate)
val formattedEndDate = SimpleDateFormat("MMM dd, yyyy", LocalLocale.current.platformLocale).format(endDate)
Text("Selected date range: $formattedStartDate - $formattedEndDate")
} else {
Text("No date range selected")
Expand Down
11 changes: 6 additions & 5 deletions datastore/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ plugins {
// [END android_datastore_serialization_plugin]
}

kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget("11")
}
}

android {
namespace = "com.example.datastore.snippets"
compileSdk = 36
Expand Down Expand Up @@ -39,11 +45,6 @@ android {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget("11")
}
}
buildFeatures {
compose = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package com.example.datastore.snippets

import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.junit4.v2.createComposeRule
import androidx.compose.ui.test.onNodeWithText
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.example.datastore.snippets.json.JsonDataStoreScreen
Expand Down
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ kotlin.code.style=official
# Enable R8 full mode.
android.enableR8.fullMode=true

android.newDsl=false
Comment thread
kkuan2011 marked this conversation as resolved.
# Use an AndroidX snapshot build.
# https://androidx.dev/snapshots/builds
# snapshotVersion=14793336
# snapshotVersion=14793336
46 changes: 23 additions & 23 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ androidx-appcompat = "1.7.1"
androidx-appfunctions = "1.0.0-alpha08"
androidx-cameraX = "1.6.0"
androidx-car = "1.7.0"
androidx-compose-bom = "2026.03.00"
androidx-compose-bom = "2026.04.01"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The Compose BOM version 2026.04.01 appears to be a typo. BOM versions typically follow the YYYY.MM.VV format, and 2026 is in the future. Please verify if 2024.04.01 or a similar current version was intended.

Suggested change
androidx-compose-bom = "2026.04.01"
androidx-compose-bom = "2024.10.01"

androidx-compose-ui-test = "1.7.0-alpha08"
androidx-compose-ui-test-junit4-accessibility = "1.11.0-beta01"
androidx-constraintlayout = "2.2.1"
Expand All @@ -24,7 +24,7 @@ androidx-glance-appwidget = "1.1.1"
androidx-lifecycle-compose = "2.10.0"
androidx-lifecycle-runtime-compose = "2.10.0"
androidx-lifecycle-viewmodel-navigation3 = "2.10.0-beta01"
androidx-navigation = "2.9.7"
androidx-navigation = "2.9.8"
androidx-navigation3 = "1.1.0"
androidx-paging = "3.4.2"
androidx-startup-runtime = "1.2.0"
Expand All @@ -35,7 +35,7 @@ androidx-test-junit = "1.3.0"
androidx-window = "1.5.1"
androidx-window-core = "1.5.1"
androidx-window-java = "1.5.1"
androidx-work-runtime = "2.11.1"
androidx-work-runtime = "2.11.2"
androidx-xr-arcore = "1.0.0-alpha12"
androidx-xr-arcore-play-services = "1.0.0-alpha12"
androidx-xr-compose = "1.0.0-alpha12"
Expand All @@ -57,64 +57,64 @@ datastoreCore = "1.2.1"
datastorePreferencesRxjava2 = "1.2.1"
datastorePreferencesRxjava3 = "1.2.1"
firebase-bom = "34.10.0"
glide = "1.0.0-beta08"
glide = "1.0.0-beta09"
google-ar-core = "1.53.0"
google-maps = "20.0.0"
gradle-versions = "0.53.0"
guava = "33.5.0-jre"
guava-android = "33.5.0-jre"
gradle-versions = "0.54.0"
guava = "33.6.0-jre"
guava-android = "33.6.0-jre"
health-connect = "1.1.0-alpha11"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think health-connect accidentally got deleted, which is causing the spotless check + build to fail, can you add it back? :)

hilt = "2.59.2"
horologist = "0.8.3-alpha"
junit = "4.13.2"
kotlin = "2.3.10"
kotlin = "2.3.21"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Kotlin version 2.3.21 is not a valid release. The current stable versions are in the 2.0.x or 2.1.x range. This is likely a typo for 2.0.21 or 2.1.0.

Suggested change
kotlin = "2.3.21"
kotlin = "2.0.21"

kotlinCoroutinesOkhttp = "1.0"
kotlinxCoroutinesGuava = "1.10.2"
kotlinxSerialization = "1.10.0"
ksp = "2.3.6"
kotlinxSerialization = "1.11.0"
ksp = "2.3.7"
ktlint = "1.5.0"
lifecycleService = "2.10.0"
maps-compose = "8.2.1"
material = "1.14.0-alpha10"
material = "1.14.0-beta01"
material3-adaptive = "1.2.0"
material3-adaptive-navigation-suite = "1.4.0"
material3-adaptive-navigation3 = "1.3.0-alpha09"
media3 = "1.9.2"
media3Ui = "1.9.2"
media3 = "1.10.0"
media3Ui = "1.10.0"
mockitoKotlin = "5.3.1"
# @keep
minSdk = "36"
okHttp = "5.3.2"
playServicesWearable = "19.0.0"
playbilling = "8.3.0"
protobuf = "4.34.0"
protoc = "0.9.6"
protolayout = "1.3.0"
protobuf = "4.34.1"
protoc = "0.10.0"
protolayout = "1.4.0"
reactive-streams = "1.0.4"
recyclerview = "1.4.0"
registryDigitalCredentials = "1.0.0-alpha04"
robolectric = "4.16.1"
roborazzi = "1.59.0"
spotless = "8.3.0"
spotless = "8.4.0"
targetSdk = "37"
tiles = "1.5.0"
tiles = "1.6.0"
tracing = "1.3.0"
truth = "1.4.4"
truth = "1.4.5"
tvComposeMaterial3 = "1.1.0-beta01"
validatorPush = "1.0.0-alpha09"
version-catalog-update = "1.1.0"
watchfaceComplicationsDataSourceKtx = "1.3.0"
wear = "1.4.0"
wearComposeFoundation = "1.6.0-rc01"
wearComposeMaterial = "1.6.0-rc01"
wearComposeMaterial3 = "1.6.0-rc01"
wearComposeFoundation = "1.6.1"
wearComposeMaterial = "1.6.1"
wearComposeMaterial3 = "1.6.1"
wearInput = "1.2.0"
wearOngoing = "1.1.0"
wearPhoneInteractions = "1.1.0"
wearRemoteInteractions = "1.2.0"
wearToolingPreview = "1.0.0"
webkit = "1.15.0"
wfp = "1.0.0-rc01"
wfp = "1.0.0"
androidx-core-telecom = "1.1.0-alpha04"

[libraries]
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-9.4.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
8 changes: 0 additions & 8 deletions identity/credentialmanager/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.compose.compiler)
Expand Down Expand Up @@ -34,13 +33,6 @@ android {
buildFeatures {
compose = true
}
sourceSets {
named("main") {
java {
srcDir("src/main/java")
}
}
}
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion kmp/shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kotlin {
// Target declarations - add or remove as needed below. These define
// which platforms this KMP module supports.
// See: https://kotlinlang.org/docs/multiplatform-discover-project.html#targets
androidLibrary {
android {
Comment thread
kkuan2011 marked this conversation as resolved.
namespace = "com.example.kmp.snippets.shared"
compileSdk = libs.versions.compileSdk.get().toInt()
minSdk = libs.versions.minSdk.get().toInt()
Expand Down
9 changes: 4 additions & 5 deletions kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ plugins {
alias(libs.plugins.android.application)
}

kotlin {
jvmToolchain(17)
}

android {
compileSdk = libs.versions.compileSdk.get().toInt()
namespace = "com.example.android.kotlin"
Expand All @@ -15,10 +19,6 @@ android {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

kotlin {
jvmToolchain(17)
}

buildTypes {
getByName("debug") {
signingConfig = signingConfigs.getByName("debug")
Expand All @@ -40,7 +40,6 @@ android {
// Disable unused AGP features
buildConfig = false
aidl = false
renderScript = false
resValues = false
shaders = false
}
Expand Down
9 changes: 0 additions & 9 deletions watchfacepush/validator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,6 @@ application {

}

sourceSets {
named("main") {
java {
srcDir("src/main/java")
}
}

}

dependencies {
implementation(libs.validator.push)
}
Loading
Loading