Skip to content

Commit 4ee84fa

Browse files
committed
Merge branch 'main' into adaptive-codelab
2 parents 5a414f4 + f6ae4a9 commit 4ee84fa

File tree

103 files changed

+39961
-127
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+39961
-127
lines changed

.github/workflows/AdvancedStateAndSideEffectsCodelab.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,21 @@ jobs:
6161

6262
test:
6363
needs: build
64-
runs-on: macos-13
64+
runs-on: ubuntu-latest
6565
timeout-minutes: 30
6666
strategy:
6767
matrix:
6868
api-level: [26, 29]
6969

7070
steps:
71+
# https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-hosted-runners
72+
- name: Enable KVM group perms
73+
run: |
74+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
75+
sudo udevadm control --reload-rules
76+
sudo udevadm trigger --name-match=kvm
77+
ls /dev/kvm
78+
7179
- name: Checkout
7280
uses: actions/checkout@v4
7381

AccessibilityCodelab/app/build.gradle

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
plugins {
1818
id 'com.android.application'
1919
id 'kotlin-android'
20+
id 'org.jetbrains.kotlin.plugin.compose'
2021
}
2122

2223
android {
@@ -79,18 +80,14 @@ android {
7980
compose true
8081
}
8182

82-
composeOptions {
83-
kotlinCompilerExtensionVersion '1.5.13'
84-
}
85-
8683
packagingOptions {
8784
excludes += "/META-INF/AL2.0"
8885
excludes += "/META-INF/LGPL2.1"
8986
}
9087
}
9188

9289
dependencies {
93-
def composeBom = platform('androidx.compose:compose-bom:2024.05.00')
90+
def composeBom = platform('androidx.compose:compose-bom:2024.06.00')
9491
implementation(composeBom)
9592
testImplementation(composeBom)
9693
androidTestImplementation(composeBom)
@@ -114,17 +111,17 @@ dependencies {
114111
implementation "com.google.accompanist:accompanist-swiperefresh:$accompanist_version"
115112
implementation "com.google.accompanist:accompanist-systemuicontroller:$accompanist_version"
116113

117-
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0"
114+
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1"
118115

119-
implementation 'androidx.appcompat:appcompat:1.6.1'
116+
implementation 'androidx.appcompat:appcompat:1.7.0'
120117
implementation 'androidx.activity:activity-ktx:1.9.0'
121118
implementation 'androidx.core:core-ktx:1.13.1'
122119
implementation "androidx.activity:activity-compose:1.9.0"
123120

124-
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0"
125-
implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:2.7.0"
126-
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.7.0"
127-
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0"
121+
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.2"
122+
implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:2.8.2"
123+
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.8.2"
124+
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.8.2"
128125

129126
implementation 'androidx.navigation:navigation-compose:2.7.7'
130127

@@ -133,7 +130,7 @@ dependencies {
133130

134131
// TODO: Bump to latest after Espresso 3.5.0 goes stable
135132
// (due to https://github.com/robolectric/robolectric/issues/6593)
136-
testImplementation 'org.robolectric:robolectric:4.12.1'
133+
testImplementation 'org.robolectric:robolectric:4.12.2'
137134
}
138135

139136
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {

AccessibilityCodelab/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ buildscript {
2121
}
2222

2323
dependencies {
24-
classpath 'com.android.tools.build:gradle:8.4.0'
25-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.23"
24+
classpath 'com.android.tools.build:gradle:8.5.0'
25+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0"
2626
}
2727
}
2828

2929
plugins {
3030
id 'com.diffplug.spotless' version '6.25.0'
31+
id 'org.jetbrains.kotlin.plugin.compose' version "2.0.0" apply false
3132
}
3233

3334
subprojects {

AccessibilityCodelab/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

AdaptiveUiCodelab/app/build.gradle

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
* Copyright 2022 Google LLC
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+
plugins {
18+
id 'com.android.application'
19+
id 'org.jetbrains.kotlin.android'
20+
id 'org.jetbrains.kotlin.plugin.compose'
21+
}
22+
23+
android {
24+
namespace 'com.example.reply'
25+
compileSdk 34
26+
27+
defaultConfig {
28+
applicationId "com.example.reply"
29+
minSdk 21
30+
targetSdk 33
31+
versionCode 1
32+
versionName "1.0"
33+
34+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
35+
vectorDrawables {
36+
useSupportLibrary true
37+
}
38+
}
39+
40+
buildTypes {
41+
release {
42+
minifyEnabled false
43+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
44+
}
45+
}
46+
compileOptions {
47+
sourceCompatibility JavaVersion.VERSION_1_8
48+
targetCompatibility JavaVersion.VERSION_1_8
49+
}
50+
kotlinOptions {
51+
jvmTarget = '1.8'
52+
}
53+
buildFeatures {
54+
compose true
55+
}
56+
packagingOptions {
57+
resources {
58+
excludes += '/META-INF/{AL2.0,LGPL2.1}'
59+
}
60+
}
61+
}
62+
63+
dependencies {
64+
65+
66+
def composeBom = platform('androidx.compose:compose-bom:2024.06.00')
67+
implementation(composeBom)
68+
androidTestImplementation(composeBom)
69+
70+
implementation 'androidx.compose.material3:material3'
71+
implementation "androidx.compose.material:material-icons-extended"
72+
implementation "androidx.compose.ui:ui-tooling-preview"
73+
androidTestImplementation "androidx.compose.ui:ui-test-junit4"
74+
debugImplementation "androidx.compose.ui:ui-tooling"
75+
debugImplementation "androidx.compose.ui:ui-test-manifest"
76+
77+
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.8.2"
78+
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.8.2"
79+
implementation 'androidx.activity:activity-compose:1.9.0'
80+
implementation 'androidx.core:core-ktx:1.13.1'
81+
implementation "androidx.window:window:1.3.0"
82+
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1"
83+
84+
testImplementation 'junit:junit:4.13.2'
85+
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
86+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
87+
}

AdaptiveUiCodelab/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

AdaptiveUiCodelab/settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ pluginManagement {
2020
gradlePluginPortal()
2121
}
2222
}
23+
2324
dependencyResolutionManagement {
2425
repositories {
2526
google()

AdvancedStateAndSideEffectsCodelab/app/build.gradle

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ plugins {
1919
id 'kotlin-android'
2020
id 'kotlin-kapt'
2121
id 'dagger.hilt.android.plugin'
22+
id 'org.jetbrains.kotlin.plugin.compose'
2223
}
2324

2425
// Reads the Google maps key that is used in the AndroidManifest
@@ -83,10 +84,6 @@ android {
8384
shaders false
8485
}
8586

86-
composeOptions {
87-
kotlinCompilerExtensionVersion '1.5.13'
88-
}
89-
9087
packagingOptions {
9188
// Multiple dependency bring these files in. Exclude them to enable
9289
// our test APK to build (has no effect on our AARs)
@@ -96,7 +93,7 @@ android {
9693
}
9794

9895
dependencies {
99-
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0"
96+
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1"
10097
implementation "com.google.android.libraries.maps:maps:3.1.0-beta"
10198
implementation "com.google.maps.android:maps-v3-ktx:3.4.0"
10299
constraints {
@@ -107,9 +104,9 @@ dependencies {
107104
}
108105

109106
implementation "androidx.activity:activity-compose:1.9.0"
110-
implementation "androidx.appcompat:appcompat:1.6.1"
107+
implementation "androidx.appcompat:appcompat:1.7.0"
111108

112-
def composeBom = platform('androidx.compose:compose-bom:2024.05.00')
109+
def composeBom = platform('androidx.compose:compose-bom:2024.06.00')
113110
implementation(composeBom)
114111
androidTestImplementation(composeBom)
115112
implementation "androidx.compose.runtime:runtime"
@@ -122,7 +119,7 @@ dependencies {
122119
debugImplementation "androidx.compose.ui:ui-tooling"
123120
debugImplementation "androidx.compose.ui:ui-test-manifest"
124121

125-
def lifecycle_version = "2.7.0"
122+
def lifecycle_version = "2.8.2"
126123
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycle_version"
127124
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
128125
implementation "com.google.dagger:hilt-android:2.51.1"
@@ -136,7 +133,7 @@ dependencies {
136133
androidTestImplementation "androidx.test:rules:1.5.0"
137134
androidTestImplementation "androidx.test.espresso:espresso-core:3.5.1"
138135
androidTestImplementation "androidx.test.ext:junit-ktx:1.1.5"
139-
androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.8.0"
136+
androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.8.1"
140137
androidTestImplementation "com.google.dagger:hilt-android:2.51.1"
141138
androidTestImplementation "com.google.dagger:hilt-android-testing:2.51.1"
142139
kaptAndroidTest "com.google.dagger:hilt-compiler:2.51.1"

AdvancedStateAndSideEffectsCodelab/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ buildscript {
2020
mavenCentral()
2121
}
2222
dependencies {
23-
classpath "com.android.tools.build:gradle:8.4.0"
24-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.23"
23+
classpath "com.android.tools.build:gradle:8.5.0"
24+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0"
2525
classpath "com.google.dagger:hilt-android-gradle-plugin:2.51.1"
26+
classpath "org.jetbrains.kotlin:compose-compiler-gradle-plugin:2.0.0"
2627
}
2728
}
2829

AdvancedStateAndSideEffectsCodelab/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)