Skip to content

Commit 3f3ccae

Browse files
🤖 Update Dependencies (#353)
* 🤖 Update Dependencies * Update gradle * Update gradle * Fix lint checks * Migrate kapt to ksp * Fix private injection --------- Co-authored-by: Ben Trengrove <[email protected]> Co-authored-by: Ben Trengrove <[email protected]>
1 parent 351fcb4 commit 3f3ccae

File tree

9 files changed

+63
-64
lines changed

9 files changed

+63
-64
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
alias(libs.plugins.android.application) apply false
66
alias(libs.plugins.android.library) apply false
77
alias(libs.plugins.kotlin.android) apply false
8-
alias(libs.plugins.kapt) apply false
8+
alias(libs.plugins.ksp) apply false
99
alias(libs.plugins.hilt) apply false
1010
alias(libs.plugins.kotlin.parcelize) apply false
1111
alias(libs.plugins.compose.compiler) apply false

compose/snippets/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
plugins {
1818
alias(libs.plugins.android.application)
1919
alias(libs.plugins.kotlin.android)
20-
alias(libs.plugins.kapt)
20+
alias(libs.plugins.ksp)
2121
alias(libs.plugins.hilt)
2222
alias(libs.plugins.kotlin.parcelize)
2323
alias(libs.plugins.compose.compiler)
@@ -146,7 +146,7 @@ dependencies {
146146
implementation(libs.hilt.android)
147147
implementation(libs.glide.compose)
148148

149-
kapt(libs.hilt.compiler)
149+
ksp(libs.hilt.compiler)
150150

151151
testImplementation(libs.junit)
152152

compose/snippets/src/main/java/com/example/compose/snippets/interop/ComposeWithOtherLibraries.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ private object StreamData {
162162
}
163163
}
164164

165-
private object HiltExample3 {
165+
object HiltExample3 {
166166
// [START android_compose_libraries_hilt_3]
167167
@HiltViewModel
168168
class MyViewModel @Inject constructor(
@@ -180,7 +180,7 @@ private object HiltExample3 {
180180
interface ExampleRepository
181181
}
182182

183-
private object HiltViewModel {
183+
object HiltViewModel {
184184
@HiltViewModel
185185
class MyViewModel @Inject constructor() : ViewModel() { /* ... */ }
186186
// [START android_compose_libraries_hilt_viewmodel]
@@ -207,7 +207,7 @@ private object HiltViewModel {
207207
}
208208
}
209209

210-
private object HiltViewModelBackStack {
210+
object HiltViewModelBackStack {
211211
@HiltViewModel
212212
class MyViewModel @Inject constructor() : ViewModel() { /* ... */ }
213213

@@ -273,7 +273,7 @@ private object MapsExample {
273273
cameraPositionState = cameraPositionState
274274
) {
275275
Marker(
276-
state = MarkerState(position = singapore),
276+
state = remember { MarkerState(position = singapore) },
277277
title = "Singapore",
278278
snippet = "Marker in Singapore"
279279
)

compose/snippets/src/main/java/com/example/compose/snippets/sideeffects/SideEffectsSnippets.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,18 +180,18 @@ fun rememberFirebaseAnalytics(user: User): FirebaseAnalytics {
180180
}
181181
// [END android_compose_side_effects_sideeffect]
182182

183+
// b/368420773
184+
@Suppress("ProduceStateDoesNotAssignValue")
183185
// [START android_compose_side_effects_producestate]
184186
@Composable
185187
fun loadNetworkImage(
186188
url: String,
187189
imageRepository: ImageRepository = ImageRepository()
188190
): State<Result<Image>> {
189-
190191
// Creates a State<T> with Result.Loading as initial value
191192
// If either `url` or `imageRepository` changes, the running producer
192193
// will cancel and will be re-launched with the new inputs.
193194
return produceState<Result<Image>>(initialValue = Result.Loading, url, imageRepository) {
194-
195195
// In a coroutine, can make suspend calls
196196
val image = imageRepository.load(url)
197197

gradle/libs.versions.toml

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[versions]
2-
accompanist = "0.34.0"
3-
androidGradlePlugin = "8.4.2"
2+
accompanist = "0.36.0"
3+
androidGradlePlugin = "8.6.1"
44
androidx-activity-compose = "1.9.2"
55
androidx-appcompat = "1.7.0"
6-
androidx-compose-bom = "2024.09.00"
6+
androidx-compose-bom = "2024.09.02"
77
androidx-compose-ui-test = "1.7.0-alpha08"
88
androidx-constraintlayout = "2.1.4"
99
androidx-constraintlayout-compose = "1.0.1"
@@ -12,45 +12,44 @@ androidx-corektx = "1.13.1"
1212
androidx-emoji2-views = "1.5.0"
1313
androidx-fragment-ktx = "1.8.3"
1414
androidx-glance-appwidget = "1.1.0"
15-
androidx-lifecycle-compose = "2.8.5"
16-
androidx-lifecycle-runtime-compose = "2.8.5"
17-
androidx-navigation = "2.8.0"
15+
androidx-lifecycle-compose = "2.8.6"
16+
androidx-lifecycle-runtime-compose = "2.8.6"
17+
androidx-navigation = "2.8.1"
1818
androidx-paging = "3.3.2"
1919
androidx-test = "1.6.1"
20-
androidx-test-espresso = "3.5.1"
20+
androidx-test-espresso = "3.6.1"
2121
androidx-window = "1.3.0"
2222
androidxHiltNavigationCompose = "1.2.0"
23-
coil = "2.6.0"
23+
coil = "2.7.0"
2424
# @keep
2525
compileSdk = "34"
26+
compose-latest = "1.7.2"
27+
composeUiTooling = "1.4.0"
2628
coreSplashscreen = "1.0.1"
27-
compose-latest = "1.7.0"
2829
coroutines = "1.7.3"
29-
google-maps = "18.2.0"
30+
glide = "1.0.0-beta01"
31+
google-maps = "19.0.0"
3032
gradle-versions = "0.51.0"
31-
hilt = "2.50"
32-
horologist = "0.5.24"
33+
hilt = "2.52"
34+
horologist = "0.6.19"
3335
junit = "4.13.2"
34-
kotlin = "2.0.0"
35-
kotlinxSerializationJson = "1.6.3"
36-
37-
ksp = "1.8.0-1.0.9"
38-
maps-compose = "4.3.2"
39-
material = "1.4.0-beta01"
36+
kotlin = "2.0.20"
37+
kotlinxSerializationJson = "1.7.3"
38+
ksp = "2.0.20-1.0.25"
39+
maps-compose = "6.1.2"
40+
material = "1.13.0-alpha06"
4041
material3-adaptive = "1.0.0"
4142
material3-adaptive-navigation-suite = "1.3.0"
42-
media3 = "1.3.1"
43+
media3 = "1.4.1"
4344
# @keep
4445
minSdk = "21"
4546
playServicesWearable = "18.2.0"
4647
recyclerview = "1.3.2"
4748
# @keep
4849
targetSdk = "34"
49-
version-catalog-update = "0.8.3"
50+
version-catalog-update = "0.8.4"
5051
wearComposeFoundation = "1.4.0"
5152
wearComposeMaterial = "1.4.0"
52-
composeUiTooling = "1.4.0"
53-
glide= "1.0.0-beta01"
5453

5554
[libraries]
5655
accompanist-adaptive = { module = "com.google.accompanist:accompanist-adaptive", version.ref = "accompanist" }
@@ -60,7 +59,7 @@ accompanist-theme-adapter-material = { module = "com.google.accompanist:accompan
6059
accompanist-theme-adapter-material3 = { module = "com.google.accompanist:accompanist-themeadapter-material3", version.ref = "accompanist" }
6160
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity-compose" }
6261
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
63-
androidx-compose-animation-graphics = { module = "androidx.compose.animation:animation-graphics" , version.ref = "compose-latest" }
62+
androidx-compose-animation-graphics = { module = "androidx.compose.animation:animation-graphics", version.ref = "compose-latest" }
6463
androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "androidx-compose-bom" }
6564
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose-latest" }
6665
androidx-compose-foundation-layout = { module = "androidx.compose.foundation:foundation-layout", version.ref = "compose-latest" }
@@ -76,7 +75,6 @@ androidx-compose-runtime = { module = "androidx.compose.runtime:runtime" }
7675
androidx-compose-runtime-livedata = { module = "androidx.compose.runtime:runtime-livedata" }
7776
androidx-compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose-latest" }
7877
androidx-compose-ui-googlefonts = { module = "androidx.compose.ui:ui-text-google-fonts" }
79-
androidx-graphics-shapes = "androidx.graphics:graphics-shapes:1.0.0-rc01"
8078
androidx-compose-ui-graphics = { module = "androidx.compose.ui:ui-graphics" }
8179
androidx-compose-ui-test = { module = "androidx.compose.ui:ui-test" }
8280
androidx-compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4" }
@@ -94,22 +92,28 @@ androidx-emoji2-views = { module = "androidx.emoji2:emoji2-views", version.ref =
9492
androidx-fragment-ktx = { module = "androidx.fragment:fragment-ktx", version.ref = "androidx-fragment-ktx" }
9593
androidx-glance-appwidget = { module = "androidx.glance:glance-appwidget", version.ref = "androidx-glance-appwidget" }
9694
androidx-glance-material3 = { module = "androidx.glance:glance-material3", version.ref = "androidx-glance-appwidget" }
95+
androidx-graphics-shapes = "androidx.graphics:graphics-shapes:1.0.1"
9796
androidx-hilt-navigation-compose = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "androidxHiltNavigationCompose" }
98-
androidx-lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidx-lifecycle-compose" }
97+
androidx-lifecycle-runtime = "androidx.lifecycle:lifecycle-runtime-ktx:2.8.5"
9998
androidx-lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "androidx-lifecycle-runtime-compose" }
10099
androidx-lifecycle-viewModelCompose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "androidx-lifecycle-compose" }
101100
androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle-compose" }
101+
androidx-material-icons-core = { module = "androidx.compose.material:material-icons-core" }
102+
androidx-media3-common = { module = "androidx.media3:media3-common", version.ref = "media3" }
103+
androidx-media3-exoplayer = { module = "androidx.media3:media3-exoplayer", version.ref = "media3" }
102104
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "androidx-navigation" }
103105
androidx-paging-compose = { module = "androidx.paging:paging-compose", version.ref = "androidx-paging" }
104106
androidx-recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerview" }
105107
androidx-test-core = { module = "androidx.test:core", version.ref = "androidx-test" }
106108
androidx-test-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "androidx-test-espresso" }
107-
androidx-test-runner = "androidx.test:runner:1.5.2"
109+
androidx-test-runner = "androidx.test:runner:1.6.2"
108110
androidx-window-core = { module = "androidx.window:window-core", version.ref = "androidx-window" }
109-
androidx-work-runtime-ktx = "androidx.work:work-runtime-ktx:2.9.0"
111+
androidx-work-runtime-ktx = "androidx.work:work-runtime-ktx:2.9.1"
110112
coil-kt-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" }
111113
compose-foundation = { module = "androidx.wear.compose:compose-foundation", version.ref = "wearComposeFoundation" }
112114
compose-material = { module = "androidx.wear.compose:compose-material", version.ref = "wearComposeMaterial" }
115+
compose-ui-tooling = { module = "androidx.wear.compose:compose-ui-tooling", version.ref = "composeUiTooling" }
116+
glide-compose = { module = "com.github.bumptech.glide:compose", version.ref = "glide" }
113117
google-android-material = { module = "com.google.android.material:material", version.ref = "material" }
114118
googlemaps-compose = { module = "com.google.maps.android:maps-compose", version.ref = "maps-compose" }
115119
googlemaps-maps = { module = "com.google.android.gms:play-services-maps", version.ref = "google-maps" }
@@ -120,23 +124,18 @@ horologist-compose-material = { module = "com.google.android.horologist:horologi
120124
junit = { module = "junit:junit", version.ref = "junit" }
121125
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" }
122126
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }
123-
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }
124-
kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }
125-
androidx-media3-common = { group = "androidx.media3", name = "media3-common", version.ref = "media3" }
126-
androidx-media3-exoplayer = { group = "androidx.media3", name = "media3-exoplayer", version.ref = "media3" }
127+
kotlinx-coroutines-test = "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.9.0"
128+
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }
127129
play-services-wearable = { module = "com.google.android.gms:play-services-wearable", version.ref = "playServicesWearable" }
128-
compose-ui-tooling = { group = "androidx.wear.compose", name = "compose-ui-tooling", version.ref = "composeUiTooling" }
129-
androidx-material-icons-core = { module = "androidx.compose.material:material-icons-core" }
130-
glide-compose = { module = "com.github.bumptech.glide:compose" , version.ref = "glide"}
131130

132131
[plugins]
133132
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
134133
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
135134
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
136135
gradle-versions = { id = "com.github.ben-manes.versions", version.ref = "gradle-versions" }
137136
hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
138-
kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
139137
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
140138
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
141139
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
140+
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
142141
version-catalog-update = { id = "nl.littlerobots.version-catalog-update", version.ref = "version-catalog-update" }

gradle/wrapper/gradle-wrapper.jar

-19.5 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
#Tue May 14 19:06:12 BST 2024
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip
54
networkTimeout=10000
65
validateDistributionUrl=true
76
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ done
8383
# This is normally unused
8484
# shellcheck disable=SC2034
8585
APP_BASE_NAME=${0##*/}
86-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
86+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
8788

8889
# Use the maximum available, or set MAX_FD != -1 to use that value.
8990
MAX_FD=maximum
@@ -144,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144145
case $MAX_FD in #(
145146
max*)
146147
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147-
# shellcheck disable=SC3045
148+
# shellcheck disable=SC2039,SC3045
148149
MAX_FD=$( ulimit -H -n ) ||
149150
warn "Could not query maximum file descriptor limit"
150151
esac
151152
case $MAX_FD in #(
152153
'' | soft) :;; #(
153154
*)
154155
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155-
# shellcheck disable=SC3045
156+
# shellcheck disable=SC2039,SC3045
156157
ulimit -n "$MAX_FD" ||
157158
warn "Could not set maximum file descriptor limit to $MAX_FD"
158159
esac
@@ -201,11 +202,11 @@ fi
201202
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
202203
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
203204

204-
# Collect all arguments for the java command;
205-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
206-
# shell script including quotes and variable substitutions, so put them in
207-
# double quotes to make sure that they get re-expanded; and
208-
# * put everything else in single quotes, so that it's not re-expanded.
205+
# Collect all arguments for the java command:
206+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207+
# and any embedded shellness will be escaped.
208+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209+
# treated as '${Hostname}' itself on the command line.
209210

210211
set -- \
211212
"-Dorg.gradle.appname=$APP_BASE_NAME" \

gradlew.bat

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
4343
%JAVA_EXE% -version >NUL 2>&1
4444
if %ERRORLEVEL% equ 0 goto execute
4545

46-
echo.
47-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48-
echo.
49-
echo Please set the JAVA_HOME variable in your environment to match the
50-
echo location of your Java installation.
46+
echo. 1>&2
47+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48+
echo. 1>&2
49+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50+
echo location of your Java installation. 1>&2
5151

5252
goto fail
5353

@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5757

5858
if exist "%JAVA_EXE%" goto execute
5959

60-
echo.
61-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62-
echo.
63-
echo Please set the JAVA_HOME variable in your environment to match the
64-
echo location of your Java installation.
60+
echo. 1>&2
61+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
62+
echo. 1>&2
63+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64+
echo location of your Java installation. 1>&2
6565

6666
goto fail
6767

0 commit comments

Comments
 (0)