diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 662b196d..5fb82c3c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,22 +17,22 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v7 - name: Validate Gradle Wrapper - uses: gradle/actions/wrapper-validation@v4 + uses: gradle/actions/wrapper-validation@v6 - name: Copy CI gradle.properties run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: distribution: 'zulu' java-version: 17 - name: Setup Gradle - uses: gradle/gradle-build-action@v2 + uses: gradle/gradle-build-action@v3 - name: Check spotless run: ./gradlew spotlessCheck --init-script gradle/spotless-init.gradle.kts --no-configuration-cache @@ -48,7 +48,7 @@ jobs: # run: ./gradlew testDebug - name: Upload build outputs (APKs) - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: build-outputs path: app/build/outputs @@ -56,7 +56,7 @@ jobs: - name: Upload build reports if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: build-reports path: app/build/reports @@ -90,13 +90,13 @@ jobs: ls /dev/kvm - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Copy CI gradle.properties run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties - name: Set up JDK 17 - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: distribution: 'zulu' java-version: 17 @@ -116,7 +116,7 @@ jobs: - name: Upload test reports if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: test-reports-${{ matrix.api-level }} path: '*/build/reports/androidTests' diff --git a/.github/workflows/issues-stale.yml b/.github/workflows/issues-stale.yml index b0415272..d707d5dd 100644 --- a/.github/workflows/issues-stale.yml +++ b/.github/workflows/issues-stale.yml @@ -8,7 +8,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v3 + - uses: actions/stale@v10 with: stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.' days-before-stale: 30 diff --git a/app/build.gradle.kts b/app/build.gradle.kts index f63d0521..323affa0 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -18,7 +18,7 @@ plugins { alias(libs.plugins.android.application) alias(libs.plugins.kotlin.android) alias(libs.plugins.kotlin.compose) - kotlin("plugin.serialization") version "2.1.10" + kotlin("plugin.serialization") version "2.4.0" } android { @@ -48,9 +48,6 @@ android { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } buildFeatures { compose = true } diff --git a/build.gradle.kts b/build.gradle.kts index 19c3c23c..3395ce53 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -19,4 +19,10 @@ plugins { alias(libs.plugins.kotlin.compose) apply false alias(libs.plugins.android.library) apply false alias(libs.plugins.protobuf) apply false +} + +allprojects { + tasks.withType().configureEach { + compilerOptions.jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11) + } } \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 38d754ac..f64cd0f4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -14,59 +14,51 @@ # limitations under the License. # [versions] -agp = "9.1.1" -fragmentCompose = "1.8.6" -kotlin = "2.2.10" -coreKtx = "1.17.0" +agp = "9.2.1" +fragmentCompose = "1.8.9" +kotlin = "2.4.0" +coreKtx = "1.19.0" junit = "4.13.2" -junitVersion = "1.2.1" -espressoCore = "3.6.1" -kotlinxSerializationJson = "1.8.0" -lifecycleRuntimeKtx = "2.8.7" -activityCompose = "1.10.0" -composeBom = "2025.02.00" -appcompat = "1.7.0" -material = "1.12.0" -coil = "2.4.0" -navigationCompose = "2.8.7" -coroutines = "1.7.3" -photopickerCompose = "1.0.0-alpha01" -play-services-location = "21.1.0" +junitVersion = "1.3.0" +espressoCore = "3.7.0" +kotlinxSerializationJson = "1.11.0" +lifecycleRuntimeKtx = "2.11.0" +activityCompose = "1.13.0" +composeBom = "2026.06.01" +appcompat = "1.7.1" +material = "1.14.0" +coil = "2.7.0" +navigationCompose = "2.9.8" +coroutines = "1.11.0" +photopickerCompose = "1.0.0-SNAPSHOT" +play-services-location = "21.4.0" -accompanist = "0.32.0" -androidx-datastore = "1.0.0" -androidx-navigation = "2.7.7" -androidx-window = "1.5.0" -casa = "0.5.1" -gradleDownloadTask = "4.1.2" -ksp = "1.9.22-1.0.17" -composeCompiler = "1.5.9" -hilt = "2.48.1" -kotlin-serialization = "1.8.0" -ktlint = "0.48.1" +accompanist = "0.37.3" +androidx-datastore = "1.2.1" +androidx-navigation = "2.9.8" +androidx-window = "1.5.1" +hilt = "2.60.1" junit4 = "4.13.2" -androidxEspresso = "3.5.1" -androidxTestCore = "1.5.0" -androidxTestExtJunit = "1.1.5" -androidxTestExtTruth = "1.5.0" -androidxTestRules = "1.5.0" -androidxTestRunner = "1.5.2" -androidxUiAutomator = "2.2.0" -camerax = "1.5.0-beta01" -material3Android = "1.3.2" -media3 = "1.5.0" -constraintlayout = "2.1.4" -glide-compose = "1.0.0-beta01" -glance = "1.3.0-alpha01" -tensorflowLite = "2.9.0" +androidxEspresso = "3.7.0" +androidxTestCore = "1.7.0" +androidxTestExtJunit = "1.3.0" +androidxTestExtTruth = "1.7.0" +androidxTestRules = "1.7.0" +androidxTestRunner = "1.7.0" +camerax = "1.6.1" +material3Android = "1.4.0" +media3 = "1.10.1" +glide-compose = "1.0.0-beta09" +glance = "1.3.0-SNAPSHOT" +tensorflowLite = "2.16.1" tensorflowLiteGpuDelegatePlugin = "0.4.4" -tensorflowLiteSupport = "0.4.2" +tensorflowLiteSupport = "0.4.4" barcodeScanningCommon = "17.0.0" playServicesMlkitBarcodeScanning = "18.3.1" -protobuf = "0.9.4" -firebaseCrashlyticsBuildtools = "3.0.5" -uwb = "1.0.0-alpha10" -telecom = "1.1.0-alpha04" +protobuf = "0.10.0" +firebaseCrashlyticsBuildtools = "3.0.7" +uwb = "1.0.0" +telecom = "1.1.0-SNAPSHOT" [libraries] @@ -79,11 +71,8 @@ junit = { group = "junit", name = "junit", version.ref = "junit" } androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" } androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" } androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" } -androidx-lifecycle-livedata-ktx = { group = "androidx.lifecycle", name = "lifecycle-livedata-ktx", version.ref = "lifecycleRuntimeKtx" } -androidx-lifecycle-runtime-compose = { group = "androidx.lifecycle", name = "lifecycle-runtime-compose", version.ref = "lifecycleRuntimeKtx" } androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" } androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" } -androidx-ui-runtime = { group = "androidx.compose.runtime", name = "runtime" } androidx-ui = { group = "androidx.compose.ui", name = "ui" } androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" } androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" } @@ -103,48 +92,21 @@ play-services-location = { module = "com.google.android.gms:play-services-locati androidx-core-telecom = { module = "androidx.core:core-telecom", version.ref = "telecom" } # Core dependencies -android-gradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "agp" } -androidx-activity = "androidx.activity:activity-ktx:1.13.0-alpha01" +androidx-activity = "androidx.activity:activity-ktx:1.13.0" -androidx-core = "androidx.core:core-ktx:1.18.0-alpha01" -androidx-exifinterface = "androidx.exifinterface:exifinterface:1.3.7" +androidx-core = "androidx.core:core-ktx:1.19.0" +androidx-exifinterface = "androidx.exifinterface:exifinterface:1.4.2" # Fragment 1.7.0 alpha and Transition 1.5.0 alpha are required for predictive back to work with Fragments and transitions -androidx-fragment = "androidx.fragment:fragment-ktx:1.7.0-alpha10" -androidx-transition = "androidx.transition:transition-ktx:1.5.0-alpha06" +androidx-fragment = "androidx.fragment:fragment-ktx:1.8.9" +androidx-transition = "androidx.transition:transition-ktx:1.7.0" androidx-navigation-fragment = { module = "androidx.navigation:navigation-fragment", version.ref = "androidx-navigation" } -androidx-navigation-testing = { module = "androidx.navigation:navigation-testing", version.ref = "androidx-navigation" } androidx-navigation-ui = { module = "androidx.navigation:navigation-ui", version.ref = "androidx-navigation" } -androidx-lifecycle-viewmodel-compose = "androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0" -androidx-viewpager2 = "androidx.viewpager2:viewpager2:1.0.0" +androidx-lifecycle-viewmodel-compose = "androidx.lifecycle:lifecycle-viewmodel-compose:2.11.0" +androidx-viewpager2 = "androidx.viewpager2:viewpager2:1.1.0" accompanist-permissions = { module = "com.google.accompanist:accompanist-permissions", version.ref = "accompanist" } -casa-base = { module = "com.google.android.catalog.framework:casa-base", version.ref = "casa" } -casa-processor = { module = "com.google.android.catalog.framework:casa-processor", version.ref = "casa" } -casa-ui = { module = "com.google.android.catalog.framework:casa-ui", version.ref = "casa" } -compose-animation-animation = { module = "androidx.compose.animation:animation" } -compose-foundation-foundation = { module = "androidx.compose.foundation:foundation" } -compose-foundation-layout = { module = "androidx.compose.foundation:layout" } -compose-material3 = { module = "androidx.compose.material3:material3" } -compose-material-material = { module = "androidx.compose.material:material" } compose-material-iconsext = { module = "androidx.compose.material:material-icons-extended" } -compose-runtime-runtime = { module = "androidx.compose.runtime:runtime" } -compose-runtime-livedata = { module = "androidx.compose.runtime:runtime-livedata" } -compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" } -compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" } -compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4" } -compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest" } -compose-ui-ui = { module = "androidx.compose.ui:ui" } -compose-ui-util = { module = "androidx.compose.ui:util" } -coil-base = { module = "io.coil-kt:coil", version.ref = "coil" } -google-ksp-api = { module = "com.google.devtools.ksp:symbol-processing-api", version.ref = "ksp" } -gradle-download-task = { module = "de.undercouch:gradle-download-task", version.ref = "gradleDownloadTask" } -hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hilt" } -hilt-compiler = { module = "com.google.dagger:hilt-android-compiler", version.ref = "hilt" } hilt-testing = { group = "com.google.dagger", name = "hilt-android-testing", version.ref = "hilt" } -kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" } -kotlin-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" } -kotlin-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } -kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } # Testing androidx-test-core = { group = "androidx.test", name = "core-ktx", version.ref = "androidxTestCore" } @@ -153,29 +115,28 @@ androidx-test-ext-junit = { group = "androidx.test.ext", name = "junit-ktx", ver androidx-test-ext-truth = { group = "androidx.test.ext", name = "truth", version.ref = "androidxTestExtTruth" } androidx-test-rules = { group = "androidx.test", name = "rules", version.ref = "androidxTestRules" } androidx-test-runner = { group = "androidx.test", name = "runner", version.ref = "androidxTestRunner" } -androidx-test-uiautomator = { group = "androidx.test.uiautomator", name = "uiautomator", version.ref = "androidxUiAutomator" } junit4 = { group = "junit", name = "junit", version.ref = "junit4" } # Sample specific dependencies -lottie = "com.airbnb.android:lottie:6.0.0" +lottie = "com.airbnb.android:lottie:6.7.1" rxjava2-android = 'io.reactivex.rxjava2:rxandroid:2.1.1' -androidx-work-runtime-ktx = "androidx.work:work-runtime-ktx:2.9.0" -androidx-core-remoteviews = "androidx.core:core-remoteviews:1.0.0" +androidx-work-runtime-ktx = "androidx.work:work-runtime-ktx:2.11.2" +androidx-core-remoteviews = "androidx.core:core-remoteviews:1.1.0" androidx-glance-appwidget = {group = "androidx.glance", name = "glance-appwidget", version.ref = "glance"} androidx-glance-preview = {group = "androidx.glance", name = "glance-preview", version.ref = "glance"} androidx-glance-appwidget-preview = {group = "androidx.glance", name = "glance-appwidget-preview", version.ref = "glance"} androidx-glance-material3 = {group = "androidx.glance", name = "glance-material3", version.ref = "glance"} -androidx-graphics-core = { group = "androidx.graphics", name = "graphics-core", version = "1.0.0-beta01" } -androidx-startup = 'androidx.startup:startup-runtime:1.1.1' +androidx-graphics-core = { group = "androidx.graphics", name = "graphics-core", version = "1.0.4" } +androidx-startup = 'androidx.startup:startup-runtime:1.2.0' androidx-window = { module = "androidx.window:window", version.ref = "androidx-window" } androidx-window-java = { module = "androidx.window:window-java", version.ref = "androidx-window" } androidx-window-rxjava2 = { module = "androidx.window:window-rxjava2", version.ref = "androidx-window" } androidx-window-core = { module = "androidx.window:window-core", version.ref = "androidx-window" } -androidx-media = "androidx.media:media:1.7.0" -androidx-constraintlayout = "androidx.constraintlayout:constraintlayout:2.1.4" +androidx-media = "androidx.media:media:1.8.0" +androidx-constraintlayout = "androidx.constraintlayout:constraintlayout:2.2.1" androidx-corepip = "androidx.core:core-pip:1.0.0-SNAPSHOT" androidx-datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "androidx-datastore" } androidx-draganddrop = "androidx.draganddrop:draganddrop:1.0.0" -androidx-dynamicanimation = "androidx.dynamicanimation:dynamicanimation-ktx:1.0.0-alpha03" +androidx-dynamicanimation = "androidx.dynamicanimation:dynamicanimation-ktx:1.1.0" androidx-material3-android = { group = "androidx.compose.material3", name = "material3-android", version.ref = "material3Android" } androidx-media3-common = { module = "androidx.media3:media3-common", version.ref = "media3" } androidx-media3-effect = { module = "androidx.media3:media3-effect", version.ref = "media3" } @@ -193,12 +154,11 @@ androidx-camerax-view = { module = "androidx.camera:camera-view", version.ref = androidx-camerax-mlkit-vision = { module = "androidx.camera:camera-mlkit-vision", version.ref = "camerax" } androidx-camerax-extensions = { module = "androidx.camera:camera-extensions", version.ref = "camerax" } -fresco = "com.facebook.fresco:fresco:3.0.0" +fresco = "com.facebook.fresco:fresco:3.7.0" fresco-nativeimagetranscoder = "com.facebook.fresco:nativeimagetranscoder:2.6.0!!" -glide = "com.github.bumptech.glide:glide:4.15.1" +glide = "com.github.bumptech.glide:glide:5.0.7" glide-compose = { group = "com.github.bumptech.glide", name = "compose", version.ref = "glide-compose" } appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } -constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } tensorflow-lite = { module = "org.tensorflow:tensorflow-lite", version.ref = "tensorflowLite" } tensorflow-lite-gpu = { module = "org.tensorflow:tensorflow-lite-gpu", version.ref = "tensorflowLite" } tensorflow-lite-gpu-delegate-plugin = { module = "org.tensorflow:tensorflow-lite-gpu-delegate-plugin", version.ref = "tensorflowLiteGpuDelegatePlugin" } @@ -215,12 +175,5 @@ kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "ko android-library = { id = "com.android.library", version.ref = "agp" } compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } -affectedmoduledetector = { id = "com.dropbox.affectedmoduledetector", version = "0.2.0" } -versionCatalogUpdate = { id = "nl.littlerobots.version-catalog-update", version = "0.7.0" } -benManesVersions = { id = "com.github.ben-manes.versions", version = "0.44.0" } -android-test = { id = "com.android.test", version.ref = "agp" } -hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" } -kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } -ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } protobuf = { id = "com.google.protobuf", version.ref = "protobuf" } diff --git a/gradle/spotless-init.gradle.kts b/gradle/spotless-init.gradle.kts index 7462afdb..3c17d5f7 100644 --- a/gradle/spotless-init.gradle.kts +++ b/gradle/spotless-init.gradle.kts @@ -17,7 +17,7 @@ val ktlintVersion = "0.48.1" initscript { - val spotlessVersion = "6.13.0" + val spotlessVersion = "8.8.0" repositories { mavenCentral() @@ -34,15 +34,12 @@ rootProject { return@rootProject } apply() - extensions.configure { - predeclareDeps() - } extensions.configure { kotlin { target("**/*.kt") targetExclude("**/build/**/*.kt") - ktlint(ktlintVersion).userData(mapOf("android" to "true")) + ktlint(ktlintVersion).editorConfigOverride(mapOf("android" to "true")) licenseHeaderFile(rootProject.file("spotless/copyright.kt")) } format("kts") { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 37f78a6a..a351597e 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/accessibility/build.gradle.kts b/samples/accessibility/build.gradle.kts index 01c8d5f4..53cb48ee 100644 --- a/samples/accessibility/build.gradle.kts +++ b/samples/accessibility/build.gradle.kts @@ -24,10 +24,10 @@ plugins { android { namespace = "com.example.platform.accessibility" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { @@ -35,10 +35,6 @@ android { targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } - buildFeatures { viewBinding = true } @@ -56,5 +52,6 @@ dependencies { implementation(libs.androidx.ui.tooling) implementation(libs.androidx.ui.tooling.preview) implementation(libs.androidx.material3) + implementation(libs.compose.material.iconsext) implementation(libs.androidx.fragment) -} \ No newline at end of file +} diff --git a/samples/camera/camera2/build.gradle.kts b/samples/camera/camera2/build.gradle.kts index 8a67fc72..38c2c723 100644 --- a/samples/camera/camera2/build.gradle.kts +++ b/samples/camera/camera2/build.gradle.kts @@ -22,10 +22,10 @@ plugins { android { namespace = "com.example.platform.camera" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { @@ -33,10 +33,6 @@ android { targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } - buildFeatures { viewBinding = true } diff --git a/samples/camera/camerax/build.gradle.kts b/samples/camera/camerax/build.gradle.kts index 64a9c2fd..c2df63b6 100644 --- a/samples/camera/camerax/build.gradle.kts +++ b/samples/camera/camerax/build.gradle.kts @@ -22,10 +22,10 @@ plugins { android { namespace = "com.example.platform.camerax" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 testOptions.targetSdk = 35 } @@ -33,10 +33,6 @@ android { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 } - - kotlinOptions { - jvmTarget = "11" - } } dependencies { diff --git a/samples/connectivity/UwbRanging/build.gradle.kts b/samples/connectivity/UwbRanging/build.gradle.kts index a643f2ae..1b7f7d20 100644 --- a/samples/connectivity/UwbRanging/build.gradle.kts +++ b/samples/connectivity/UwbRanging/build.gradle.kts @@ -25,7 +25,7 @@ plugins { android { namespace = "com.example.platform.connectivity.uwb" - compileSdk = 36 + compileSdk = 37 defaultConfig { minSdk = 31 @@ -38,10 +38,6 @@ android { targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } - sourceSets { getByName("main") { java.srcDirs("src/main/java", "src/main/proto") @@ -59,7 +55,7 @@ protobuf { // Configures the protoc compiler protoc { // Automatically download protoc from Maven Central - artifact = "com.google.protobuf:protoc:3.25.3" + artifact = "com.google.protobuf:protoc:4.35.1" } // Configures the code generation tasks @@ -89,10 +85,10 @@ dependencies { implementation(libs.androidx.navigation.compose) implementation(libs.compose.material.iconsext) implementation(libs.kotlin.coroutines.play) - implementation("com.google.android.gms:play-services-nearby:19.2.0") - implementation("com.google.protobuf:protobuf-java:3.25.3") - implementation("com.google.protobuf:protobuf-kotlin:3.25.3") - implementation("androidx.datastore:datastore:1.0.0") + implementation("com.google.android.gms:play-services-nearby:19.3.0") + implementation("com.google.protobuf:protobuf-java:4.35.1") + implementation("com.google.protobuf:protobuf-kotlin:4.35.1") + implementation("androidx.datastore:datastore:1.2.1") implementation(libs.androidx.appcompat) implementation(libs.kotlinx.serialization.json) implementation(libs.firebase.crashlytics.buildtools) diff --git a/samples/connectivity/UwbRanging/src/main/java/com/google/uwb/uwbranging/impl/UwbSessionScopeImpl.kt b/samples/connectivity/UwbRanging/src/main/java/com/google/uwb/uwbranging/impl/UwbSessionScopeImpl.kt index 2e6c42f9..abd479b6 100644 --- a/samples/connectivity/UwbRanging/src/main/java/com/google/uwb/uwbranging/impl/UwbSessionScopeImpl.kt +++ b/samples/connectivity/UwbRanging/src/main/java/com/google/uwb/uwbranging/impl/UwbSessionScopeImpl.kt @@ -101,6 +101,7 @@ internal class UwbSessionScopeImpl( trySend(EndpointEvents.PositionUpdated(endpoint, result.position)) is RangingResult.RangingResultPeerDisconnected -> trySend(EndpointEvents.UwbDisconnected(endpoint)) + else -> { /* Ignore other results */ } } } } diff --git a/samples/connectivity/audio/build.gradle.kts b/samples/connectivity/audio/build.gradle.kts index 0b2df217..052ee579 100644 --- a/samples/connectivity/audio/build.gradle.kts +++ b/samples/connectivity/audio/build.gradle.kts @@ -23,20 +23,16 @@ plugins { android { namespace = "com.example.platform.connectivity.audio" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 } - - kotlinOptions { - jvmTarget = "11" - } lint { targetSdk = 35 } @@ -52,4 +48,4 @@ dependencies { implementation(libs.androidx.material3) implementation(project(":shared")) -} \ No newline at end of file +} diff --git a/samples/connectivity/bluetooth/ble/build.gradle.kts b/samples/connectivity/bluetooth/ble/build.gradle.kts index 9941593e..a7c8f12f 100644 --- a/samples/connectivity/bluetooth/ble/build.gradle.kts +++ b/samples/connectivity/bluetooth/ble/build.gradle.kts @@ -23,10 +23,10 @@ plugins { android { namespace = "com.example.platform.connectivity.bluetooth.ble" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { @@ -34,10 +34,6 @@ android { targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } - lint { targetSdk = 35 } diff --git a/samples/connectivity/bluetooth/ble/src/main/java/com/example/platform/connectivity/bluetooth/ble/FindBLEDevicesSample.kt b/samples/connectivity/bluetooth/ble/src/main/java/com/example/platform/connectivity/bluetooth/ble/FindBLEDevicesSample.kt index 48ed9ea4..0189f9da 100644 --- a/samples/connectivity/bluetooth/ble/src/main/java/com/example/platform/connectivity/bluetooth/ble/FindBLEDevicesSample.kt +++ b/samples/connectivity/bluetooth/ble/src/main/java/com/example/platform/connectivity/bluetooth/ble/FindBLEDevicesSample.kt @@ -263,9 +263,9 @@ private fun BluetoothScanEffect( val observer = LifecycleEventObserver { _, event -> // Start scanning once the app is in foreground and stop when in background if (event == Lifecycle.Event.ON_START) { - adapter.bluetoothLeScanner.startScan(null, scanSettings, leScanCallback) + adapter.bluetoothLeScanner?.startScan(null, scanSettings, leScanCallback) } else if (event == Lifecycle.Event.ON_STOP) { - adapter.bluetoothLeScanner.stopScan(leScanCallback) + adapter.bluetoothLeScanner?.stopScan(leScanCallback) } } @@ -275,7 +275,7 @@ private fun BluetoothScanEffect( // When the effect leaves the Composition, remove the observer and stop scanning onDispose { lifecycleOwner.lifecycle.removeObserver(observer) - adapter.bluetoothLeScanner.stopScan(leScanCallback) + adapter.bluetoothLeScanner?.stopScan(leScanCallback) } } } diff --git a/samples/connectivity/bluetooth/ble/src/main/java/com/example/platform/connectivity/bluetooth/ble/server/GATTServerSampleService.kt b/samples/connectivity/bluetooth/ble/src/main/java/com/example/platform/connectivity/bluetooth/ble/server/GATTServerSampleService.kt index cb23f225..c5c951ae 100644 --- a/samples/connectivity/bluetooth/ble/src/main/java/com/example/platform/connectivity/bluetooth/ble/server/GATTServerSampleService.kt +++ b/samples/connectivity/bluetooth/ble/src/main/java/com/example/platform/connectivity/bluetooth/ble/server/GATTServerSampleService.kt @@ -81,7 +81,7 @@ class GATTServerSampleService : Service() { private val manager: BluetoothManager by lazy { applicationContext.getSystemService(BluetoothManager::class.java) } - private val advertiser: BluetoothLeAdvertiser + private val advertiser: BluetoothLeAdvertiser? get() = manager.adapter.bluetoothLeAdvertiser private val service = @@ -134,7 +134,7 @@ class GATTServerSampleService : Service() { ACTION_STOP_ADVERTISING -> { serverLogsState.value += "Stop advertising\n" - advertiser.stopAdvertising(SampleAdvertiseCallback) + advertiser?.stopAdvertising(SampleAdvertiseCallback) } else -> throw IllegalArgumentException("Unknown action") @@ -148,7 +148,7 @@ class GATTServerSampleService : Service() { super.onDestroy() isServerRunning.value = false if (hasAdvertisingPermission()) { - advertiser.stopAdvertising(SampleAdvertiseCallback) + advertiser?.stopAdvertising(SampleAdvertiseCallback) } server.close() scope.cancel() @@ -206,7 +206,7 @@ class GATTServerSampleService : Service() { .addServiceUuid(ParcelUuid(SERVICE_UUID)) .build() - advertiser.startAdvertising(settings, data, SampleAdvertiseCallback) + advertiser?.startAdvertising(settings, data, SampleAdvertiseCallback) } @SuppressLint("MissingPermission") @@ -256,6 +256,7 @@ class GATTServerSampleService : Service() { characteristic: BluetoothGattCharacteristic?, ) { super.onCharacteristicReadRequest(device, requestId, offset, characteristic) + if (device == null) return serverLogsState.value += "Characteristic Read request: $requestId (offset $offset)\n" val data = serverLogsState.value.toByteArray() val response = data.copyOfRange(offset, data.size) diff --git a/samples/connectivity/bluetooth/companion/build.gradle.kts b/samples/connectivity/bluetooth/companion/build.gradle.kts index a72b315b..4f7e23f5 100644 --- a/samples/connectivity/bluetooth/companion/build.gradle.kts +++ b/samples/connectivity/bluetooth/companion/build.gradle.kts @@ -23,20 +23,16 @@ plugins { android { namespace = "com.example.platform.connectivity.bluetooth.companion" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 } - - kotlinOptions { - jvmTarget = "11" - } lint { targetSdk = 35 } diff --git a/samples/connectivity/callnotification/build.gradle.kts b/samples/connectivity/callnotification/build.gradle.kts index a5a7a78c..7ee4d4a6 100644 --- a/samples/connectivity/callnotification/build.gradle.kts +++ b/samples/connectivity/callnotification/build.gradle.kts @@ -24,20 +24,16 @@ plugins { android { namespace = "com.example.platform.connectivity.callnotification" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 } - - kotlinOptions { - jvmTarget = "11" - } lint { targetSdk = 35 } @@ -56,4 +52,4 @@ dependencies { implementation(libs.androidx.material3) implementation(project(":shared")) -} \ No newline at end of file +} diff --git a/samples/connectivity/telecom/build.gradle.kts b/samples/connectivity/telecom/build.gradle.kts index deffa5e0..b97dd69e 100644 --- a/samples/connectivity/telecom/build.gradle.kts +++ b/samples/connectivity/telecom/build.gradle.kts @@ -25,11 +25,7 @@ plugins { android { namespace = "com.example.platform.connectivity.telecom" - compileSdk { - version = release(version = 36) { - minorApiLevel = 1 - } - } + compileSdk = 37 defaultConfig { minSdk = 23 @@ -41,10 +37,6 @@ android { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 } - - kotlinOptions { - jvmTarget = "11" - } } dependencies { diff --git a/samples/graphics/pdf/build.gradle.kts b/samples/graphics/pdf/build.gradle.kts index de106541..881927b9 100644 --- a/samples/graphics/pdf/build.gradle.kts +++ b/samples/graphics/pdf/build.gradle.kts @@ -24,20 +24,16 @@ plugins { android { namespace = "com.example.platform.graphics.pdf" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } - lint { targetSdk = 35 } @@ -50,6 +46,6 @@ dependencies { implementation(libs.androidx.lifecycle.viewmodel.compose) implementation(platform(libs.androidx.compose.bom)) implementation(libs.androidx.ui) -// implementation(libs.androidx.ui.tooling.preview) + implementation(libs.androidx.material3) -} \ No newline at end of file +} diff --git a/samples/graphics/ultrahdr/build.gradle.kts b/samples/graphics/ultrahdr/build.gradle.kts index dc80fba1..954d0f42 100644 --- a/samples/graphics/ultrahdr/build.gradle.kts +++ b/samples/graphics/ultrahdr/build.gradle.kts @@ -23,10 +23,10 @@ plugins { android { namespace = "com.example.platform.graphics.ultrahdr" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { @@ -34,10 +34,6 @@ android { targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } - buildFeatures { viewBinding = true } @@ -67,4 +63,4 @@ dependencies { // Graphics Core implementation(libs.androidx.graphics.core) -} \ No newline at end of file +} diff --git a/samples/location/build.gradle.kts b/samples/location/build.gradle.kts index 4c3bc94d..479f4869 100644 --- a/samples/location/build.gradle.kts +++ b/samples/location/build.gradle.kts @@ -22,20 +22,16 @@ plugins { android { namespace = "com.example.platform.location" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 } - - kotlinOptions { - jvmTarget = "11" - } lint { targetSdk = 35 } diff --git a/samples/media/ultrahdr/build.gradle.kts b/samples/media/ultrahdr/build.gradle.kts index a841d202..1b0a89e1 100644 --- a/samples/media/ultrahdr/build.gradle.kts +++ b/samples/media/ultrahdr/build.gradle.kts @@ -23,10 +23,10 @@ plugins { android { namespace = "com.example.platform.media.ultrahdr" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { @@ -34,10 +34,6 @@ android { targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } - buildFeatures { viewBinding = true } @@ -77,4 +73,4 @@ dependencies { // Link to UltraHDR Graphics Samples implementation(project(mapOf("path" to ":samples:graphics:ultrahdr"))) -} \ No newline at end of file +} diff --git a/samples/media/video/build.gradle.kts b/samples/media/video/build.gradle.kts index f3b3e590..5e7075df 100644 --- a/samples/media/video/build.gradle.kts +++ b/samples/media/video/build.gradle.kts @@ -18,15 +18,15 @@ plugins { alias(libs.plugins.android.library) alias(libs.plugins.kotlin.compose) alias(libs.plugins.kotlin.android) - id("de.undercouch.download") version "5.6.0" + id("de.undercouch.download") version "5.7.0" } android { namespace = "com.example.platform.media.video" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { @@ -34,10 +34,6 @@ android { targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } - buildFeatures { viewBinding = true } @@ -86,6 +82,7 @@ dependencies { // Tensorflow lite dependencies implementation(libs.tensorflow.lite) implementation(libs.tensorflow.lite.gpu) + implementation("org.tensorflow:tensorflow-lite-gpu-api:2.16.1") implementation(libs.tensorflow.lite.gpu.delegate.plugin) implementation(libs.tensorflow.lite.support) implementation(libs.tensorflow.lite.select.tf.ops) diff --git a/samples/media/video/src/main/java/com/example/platform/media/video/TransformerVideoComposition.kt b/samples/media/video/src/main/java/com/example/platform/media/video/TransformerVideoComposition.kt index 4b16ccc3..fa4cd80f 100644 --- a/samples/media/video/src/main/java/com/example/platform/media/video/TransformerVideoComposition.kt +++ b/samples/media/video/src/main/java/com/example/platform/media/video/TransformerVideoComposition.kt @@ -178,16 +178,17 @@ class TransformerVideoComposition : Fragment() { videoSequence.addAll(listOf(video1, video2)) - compositionSequences.add(EditedMediaItemSequence(videoSequence)) + compositionSequences.add( + EditedMediaItemSequence.Builder(videoSequence).build() + ) if (binding.backgroundAudioChip.isChecked) { val backgroundAudio = EditedMediaItem.Builder(MediaItem.fromUri(URI_AUDIO)).build() // create an audio sequence that will be looping over the duration of the first video // sequence. - val audioSequence = EditedMediaItemSequence( - ImmutableList.of(backgroundAudio), - /* isLooping*/true, - ) + val audioSequence = EditedMediaItemSequence.Builder(backgroundAudio) + .setIsLooping(true) + .build() compositionSequences.add(audioSequence) } diff --git a/samples/privacy/data/build.gradle.kts b/samples/privacy/data/build.gradle.kts index ae7841e8..d6988056 100644 --- a/samples/privacy/data/build.gradle.kts +++ b/samples/privacy/data/build.gradle.kts @@ -23,10 +23,10 @@ plugins { android { namespace = "com.example.platform.privacy.data" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { @@ -34,10 +34,6 @@ android { targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } - lint { targetSdk = 35 } @@ -51,4 +47,4 @@ dependencies { implementation(libs.androidx.ui) implementation(libs.androidx.ui.tooling.preview) implementation(libs.androidx.material3) -} \ No newline at end of file +} diff --git a/samples/privacy/permissions/build.gradle.kts b/samples/privacy/permissions/build.gradle.kts index a904b2ee..7080180e 100644 --- a/samples/privacy/permissions/build.gradle.kts +++ b/samples/privacy/permissions/build.gradle.kts @@ -22,10 +22,10 @@ plugins { android { namespace = "com.example.platform.privacy.permissions" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { @@ -33,10 +33,6 @@ android { targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } - lint { targetSdk = 35 } diff --git a/samples/privacy/transparency/build.gradle.kts b/samples/privacy/transparency/build.gradle.kts index ba94f828..5dc02c65 100644 --- a/samples/privacy/transparency/build.gradle.kts +++ b/samples/privacy/transparency/build.gradle.kts @@ -22,18 +22,15 @@ plugins { android { namespace = "com.example.platform.privacy.transparency" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } lint { targetSdk = 35 } @@ -54,4 +51,4 @@ dependencies { // Add samples specific dependencies implementation(libs.play.services.location) implementation(libs.kotlin.coroutines.play) -} \ No newline at end of file +} diff --git a/samples/storage/build.gradle.kts b/samples/storage/build.gradle.kts index 4bff4b92..247a718b 100644 --- a/samples/storage/build.gradle.kts +++ b/samples/storage/build.gradle.kts @@ -24,7 +24,7 @@ plugins { android { namespace = "com.example.platform.storage" - compileSdk = 36 + compileSdk = 37 defaultConfig { minSdk = 34 @@ -34,10 +34,6 @@ android { targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } - lint { targetSdk = 35 } @@ -64,4 +60,4 @@ dependencies { implementation(libs.coil) implementation(libs.coil.video) implementation(libs.coil.compose) -} \ No newline at end of file +} diff --git a/samples/user-interface/appwidgets/build.gradle.kts b/samples/user-interface/appwidgets/build.gradle.kts index b7d7b28f..59b2bb30 100644 --- a/samples/user-interface/appwidgets/build.gradle.kts +++ b/samples/user-interface/appwidgets/build.gradle.kts @@ -34,10 +34,6 @@ android { targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } - buildFeatures { viewBinding = true } @@ -56,6 +52,7 @@ dependencies { implementation(libs.androidx.ui) implementation(libs.androidx.ui.tooling.preview) implementation(libs.androidx.material3) + implementation(libs.compose.material.iconsext) implementation(libs.coil) implementation(libs.coil.compose) @@ -72,4 +69,4 @@ dependencies { debugImplementation(libs.androidx.glance.preview) debugImplementation(libs.androidx.glance.appwidget.preview) -} \ No newline at end of file +} diff --git a/samples/user-interface/appwidgets/src/main/java/com/example/platform/ui/appwidgets/glance/layout/text/layout/FullBleedImageLayout.kt b/samples/user-interface/appwidgets/src/main/java/com/example/platform/ui/appwidgets/glance/layout/text/layout/FullBleedImageLayout.kt index f759e9f1..0b6109a1 100644 --- a/samples/user-interface/appwidgets/src/main/java/com/example/platform/ui/appwidgets/glance/layout/text/layout/FullBleedImageLayout.kt +++ b/samples/user-interface/appwidgets/src/main/java/com/example/platform/ui/appwidgets/glance/layout/text/layout/FullBleedImageLayout.kt @@ -29,7 +29,7 @@ import androidx.glance.LocalContext import androidx.glance.LocalSize import androidx.glance.appwidget.cornerRadius import androidx.glance.appwidget.lazy.LazyColumn -import androidx.glance.appwidget.lazy.VerticalScrollMode +// import androidx.glance.appwidget.lazy.VerticalScrollMode import androidx.glance.appwidget.lazy.items import androidx.glance.background import androidx.glance.layout.Alignment @@ -45,7 +45,7 @@ import androidx.glance.layout.width import androidx.glance.text.FontWeight import androidx.glance.text.Text import androidx.glance.text.TextStyle -import androidx.glance.unit.ColorProvider +import androidx.glance.color.ColorProvider import com.example.platform.ui.appwidgets.R import com.example.platform.ui.appwidgets.glance.layout.collections.layout.ImageGridItemData import com.example.platform.ui.appwidgets.glance.layout.collections.layout.NoDataContent @@ -112,8 +112,7 @@ private fun SnapScrollingGallery( data = data, isSmall = isSmall, appName = appName, - size = size, - verticalScrollMode = VerticalScrollMode.SnapScrollMatchHeight(size.height) + size = size ) } @@ -122,8 +121,7 @@ private fun GalleryList( data: List, isSmall: Boolean, appName: String, - size: DpSize, - verticalScrollMode: VerticalScrollMode = VerticalScrollMode.Normal + size: DpSize ) { if (data.size == 1) { // If there's only 1 item (like in the widget preview), render with fillMaxSize to @@ -138,8 +136,7 @@ private fun GalleryList( } else { val limitedData = data.take(5) LazyColumn( - modifier = GlanceModifier.fillMaxSize(), - verticalScrollMode = verticalScrollMode + modifier = GlanceModifier.fillMaxSize() ) { items(limitedData, itemId = { item -> item.key.hashCode().toLong() }) { item -> GalleryItemCard( @@ -202,7 +199,7 @@ private fun GalleryItemCard( Text( text = itemTitle, style = TextStyle( - color = ColorProvider(Color.White), + color = ColorProvider(Color.White, Color.White), fontWeight = FontWeight.Bold, fontSize = titleFontSize ), diff --git a/samples/user-interface/appwidgets/src/main/java/com/example/platform/ui/appwidgets/glance/weather/WeatherGlanceWidget.kt b/samples/user-interface/appwidgets/src/main/java/com/example/platform/ui/appwidgets/glance/weather/WeatherGlanceWidget.kt index 902646db..82213c42 100644 --- a/samples/user-interface/appwidgets/src/main/java/com/example/platform/ui/appwidgets/glance/weather/WeatherGlanceWidget.kt +++ b/samples/user-interface/appwidgets/src/main/java/com/example/platform/ui/appwidgets/glance/weather/WeatherGlanceWidget.kt @@ -16,6 +16,7 @@ package com.example.platform.ui.appwidgets.glance.weather +import android.annotation.SuppressLint import android.content.Context import android.os.Build import androidx.annotation.RequiresApi @@ -391,6 +392,7 @@ suspend fun refreshWeather(context: Context) { WeatherRepo.updateWeatherInfo() } +@SuppressLint("NonObservableLocale") @Composable private fun WeatherData.toDayString() = day.lowercase(Locale.getDefault()).replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() diff --git a/samples/user-interface/constraintlayout/build.gradle.kts b/samples/user-interface/constraintlayout/build.gradle.kts index 93deafd6..fbf80f8a 100644 --- a/samples/user-interface/constraintlayout/build.gradle.kts +++ b/samples/user-interface/constraintlayout/build.gradle.kts @@ -16,15 +16,15 @@ plugins { alias(libs.plugins.android.library) -// alias(libs.plugins.kotlin.compose) - alias(libs.plugins.kotlin.android)} + alias(libs.plugins.kotlin.android) +} android { namespace = "com.example.platform.ui.constraintlayout" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { @@ -32,10 +32,6 @@ android { targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } - buildFeatures { viewBinding = true } diff --git a/samples/user-interface/draganddrop/build.gradle.kts b/samples/user-interface/draganddrop/build.gradle.kts index 3829dc12..ec84d85b 100644 --- a/samples/user-interface/draganddrop/build.gradle.kts +++ b/samples/user-interface/draganddrop/build.gradle.kts @@ -21,10 +21,10 @@ plugins { android { namespace = "com.example.platform.ui.draganddrop" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { @@ -32,10 +32,6 @@ android { targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } - buildFeatures { viewBinding = true } diff --git a/samples/user-interface/draganddrop/src/main/java/com/example/platform/ui/draganddrop/DragAndDropUsingCompose.kt b/samples/user-interface/draganddrop/src/main/java/com/example/platform/ui/draganddrop/DragAndDropUsingCompose.kt index 53c82a89..449bb29c 100644 --- a/samples/user-interface/draganddrop/src/main/java/com/example/platform/ui/draganddrop/DragAndDropUsingCompose.kt +++ b/samples/user-interface/draganddrop/src/main/java/com/example/platform/ui/draganddrop/DragAndDropUsingCompose.kt @@ -159,17 +159,11 @@ fun Photo(urlStr: String) { contentDescription = "demo", modifier = Modifier .size(100.dp) - .dragAndDropSource { - detectTapGestures( - onLongPress = { - startTransfer( - DragAndDropTransferData( - ClipData.newPlainText( - "image Url", url, - ), - ), - ) - }, + .dragAndDropSource { _ -> + DragAndDropTransferData( + ClipData.newPlainText( + "image Url", url, + ) ) }, ) diff --git a/samples/user-interface/haptics/build.gradle.kts b/samples/user-interface/haptics/build.gradle.kts index cd5173af..a00009db 100644 --- a/samples/user-interface/haptics/build.gradle.kts +++ b/samples/user-interface/haptics/build.gradle.kts @@ -22,20 +22,16 @@ plugins { android { namespace = "com.example.platform.ui.haptics" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 } - - kotlinOptions { - jvmTarget = "11" - } lint { targetSdk = 35 } @@ -50,5 +46,6 @@ dependencies { implementation(libs.androidx.ui.tooling) implementation(libs.androidx.ui.tooling.preview) implementation(libs.androidx.material3) + implementation(libs.compose.material.iconsext) implementation(libs.androidx.lifecycle.viewmodel.compose) } diff --git a/samples/user-interface/live-updates/build.gradle.kts b/samples/user-interface/live-updates/build.gradle.kts index 94095b83..e3685f86 100644 --- a/samples/user-interface/live-updates/build.gradle.kts +++ b/samples/user-interface/live-updates/build.gradle.kts @@ -9,7 +9,7 @@ android { compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { @@ -17,10 +17,6 @@ android { targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } - buildFeatures { viewBinding = true } @@ -40,4 +36,4 @@ dependencies { implementation(libs.accompanist.permissions) implementation(libs.androidx.constraintlayout) implementation(libs.androidx.material3.android) -} \ No newline at end of file +} diff --git a/samples/user-interface/picture-in-picture/build.gradle.kts b/samples/user-interface/picture-in-picture/build.gradle.kts index 06d8915d..6ae0c11f 100644 --- a/samples/user-interface/picture-in-picture/build.gradle.kts +++ b/samples/user-interface/picture-in-picture/build.gradle.kts @@ -17,13 +17,12 @@ plugins { alias(libs.plugins.android.library) -// alias(libs.plugins.kotlin.compose) alias(libs.plugins.kotlin.android) } android { namespace = "com.example.android.pip" - compileSdk = 36 + compileSdk = 37 defaultConfig { minSdk = 23 @@ -36,10 +35,6 @@ android { targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } - buildFeatures { viewBinding = true } diff --git a/samples/user-interface/predictiveback/build.gradle.kts b/samples/user-interface/predictiveback/build.gradle.kts index f8bf8a6f..c0301429 100644 --- a/samples/user-interface/predictiveback/build.gradle.kts +++ b/samples/user-interface/predictiveback/build.gradle.kts @@ -23,10 +23,10 @@ plugins { android { namespace = "com.example.platform.ui.predictiveback" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { @@ -34,10 +34,6 @@ android { targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } - buildFeatures { viewBinding = true } @@ -57,4 +53,4 @@ dependencies { implementation(libs.androidx.navigation.ui) implementation(libs.androidx.fragment) implementation(libs.androidx.transition) -} \ No newline at end of file +} diff --git a/samples/user-interface/quicksettings/build.gradle.kts b/samples/user-interface/quicksettings/build.gradle.kts index 6f6f2b7e..c69c1819 100644 --- a/samples/user-interface/quicksettings/build.gradle.kts +++ b/samples/user-interface/quicksettings/build.gradle.kts @@ -22,10 +22,10 @@ plugins { android { namespace = "com.example.platform.ui.quicksettings" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { @@ -33,10 +33,6 @@ android { targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } - lint { targetSdk = 36 } diff --git a/samples/user-interface/share/build.gradle.kts b/samples/user-interface/share/build.gradle.kts index 0f6392a1..79794017 100644 --- a/samples/user-interface/share/build.gradle.kts +++ b/samples/user-interface/share/build.gradle.kts @@ -22,10 +22,10 @@ plugins { android { namespace = "com.example.platform.ui.share" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { @@ -33,10 +33,6 @@ android { targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } - lint { targetSdk = 35 } diff --git a/samples/user-interface/text/build.gradle.kts b/samples/user-interface/text/build.gradle.kts index 08b70487..252d40ec 100644 --- a/samples/user-interface/text/build.gradle.kts +++ b/samples/user-interface/text/build.gradle.kts @@ -22,10 +22,10 @@ plugins { android { namespace = "com.example.platform.ui.text" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { @@ -33,10 +33,6 @@ android { targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } - buildFeatures { viewBinding = true } diff --git a/samples/user-interface/window-insets/build.gradle.kts b/samples/user-interface/window-insets/build.gradle.kts index 31ac93ea..21d2cb5b 100644 --- a/samples/user-interface/window-insets/build.gradle.kts +++ b/samples/user-interface/window-insets/build.gradle.kts @@ -22,10 +22,10 @@ plugins { android { namespace = "com.example.platform.ui.insets" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { @@ -33,10 +33,6 @@ android { targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } - buildFeatures { viewBinding = true } diff --git a/samples/user-interface/windowmanager/build.gradle.kts b/samples/user-interface/windowmanager/build.gradle.kts index b1fe5e43..07939d6b 100644 --- a/samples/user-interface/windowmanager/build.gradle.kts +++ b/samples/user-interface/windowmanager/build.gradle.kts @@ -21,7 +21,7 @@ plugins { android { namespace = "com.example.platform.ui.windowmanager" - compileSdk = 36 + compileSdk = 37 defaultConfig { minSdk = 24 @@ -33,10 +33,6 @@ android { targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } - buildFeatures { viewBinding = true } diff --git a/settings.gradle.kts b/settings.gradle.kts index af8fc634..729136e4 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -28,7 +28,7 @@ pluginManagement { } } plugins { - id("org.gradle.toolchains.foojay-resolver-convention") version "0.10.0" + id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0" } dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts index 79fb702c..531c3501 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle.kts @@ -6,10 +6,10 @@ plugins { android { namespace = "com.example.platform.shared" - compileSdk = 36 + compileSdk = 37 defaultConfig { - minSdk = 21 + minSdk = 23 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles("consumer-rules.pro") @@ -28,9 +28,6 @@ android { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" - } buildFeatures { compose = true } @@ -46,6 +43,7 @@ dependencies { implementation(libs.androidx.ui.graphics) implementation(libs.androidx.ui.tooling.preview) implementation(libs.androidx.material3) + api(libs.compose.material.iconsext) implementation(libs.accompanist.permissions) -} \ No newline at end of file +}