Skip to content

Commit b0796b3

Browse files
runningcodeclaude
andauthored
build(android): Include Android resources in navigation3 unit tests (#6618)
AGP 9.5 registers a Compose Preview task for every Compose module and fails to create it when unit tests exclude Android resources. Normal builds never create that task, but anything that creates every task, such as an LSP's Gradle import or `./gradlew tasks --all`, fails on navigation3. Every other Android module already sets this. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent a601744 commit b0796b3

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎sentry-android-navigation3/build.gradle.kts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ android {
4040
}
4141

4242
testOptions {
43-
unitTests.isReturnDefaultValues = true
43+
unitTests.apply {
44+
isReturnDefaultValues = true
45+
// AGP 9.5 can't create the Compose Preview task without it, which breaks any
46+
// build that creates every task, such as an LSP's Gradle import.
47+
isIncludeAndroidResources = true
48+
}
4449
}
4550

4651
lint {

0 commit comments

Comments
 (0)