Fixed
Status Update
Comments
za...@google.com <za...@google.com> #2
To provide some context , R8
It is a
In the context of navigation + kotlinx serialization
, we will have to look into whether navigation can viably prevent this shrinkage/obfuscation.
In the mean time, we will be adding a lint rule to remind users to use @Keep
.
wv...@google.com <wv...@google.com>
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 4940c45ab1632128129bfb64b4fd42320b081c92
Author: Clara Fok <clarafok@google.com>
Date: Mon Sep 16 13:04:40 2024
Add navigation-common lint for Keep annotation
We need to make sure that Enums that are used as nav arguments in type-safe routes are annotated with @Keep. The e
ntry point to locating said Enums are rotue declarations that contains Enum arguments.
Since the entry point is essentially the same lint location for linting @Serializable annotation, this lint uses the same detector but expands upon it.
Test: ./gradlew navigation:navigation-common-lint:test
Bug:358687142
Change-Id: I2b46fbc3b5be6251d89e902e315f50f20c46ce19
M navigation/navigation-common-lint/src/main/java/androidx/navigation/common/lint/NavigationCommonIssueRegistry.kt
M navigation/navigation-common-lint/src/main/java/androidx/navigation/common/lint/TypeSafeDestinationMissingAnnotationDetector.kt
A navigation/navigation-common-lint/src/test/java/androidx/navigation/common/lint/MissingKeepAnnotationDetectorTest.kt
https://android-review.googlesource.com/3270115
Branch: androidx-main
commit 4940c45ab1632128129bfb64b4fd42320b081c92
Author: Clara Fok <clarafok@google.com>
Date: Mon Sep 16 13:04:40 2024
Add navigation-common lint for Keep annotation
We need to make sure that Enums that are used as nav arguments in type-safe routes are annotated with @Keep. The e
ntry point to locating said Enums are rotue declarations that contains Enum arguments.
Since the entry point is essentially the same lint location for linting @Serializable annotation, this lint uses the same detector but expands upon it.
Test: ./gradlew navigation:navigation-common-lint:test
Bug:358687142
Change-Id: I2b46fbc3b5be6251d89e902e315f50f20c46ce19
M navigation/navigation-common-lint/src/main/java/androidx/navigation/common/lint/NavigationCommonIssueRegistry.kt
M navigation/navigation-common-lint/src/main/java/androidx/navigation/common/lint/TypeSafeDestinationMissingAnnotationDetector.kt
A navigation/navigation-common-lint/src/test/java/androidx/navigation/common/lint/MissingKeepAnnotationDetectorTest.kt
ro...@veeva.com <ro...@veeva.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 33f3eee080a07079f9ce7b34d58ee210869fe180
Author: Clara Fok <clarafok@google.com>
Date: Wed Sep 18 23:32:56 2024
Add navigation-compose lint for type safe annotations
The lint checks if routes that are used to create NavDestinations are annotated with kotlinx @Serializable, and checks that enum arg types are annotated with @Keep.
Test: ./gradlew navigation:navigation-compose-lint:test
Bug: 362725816
Bug: 358687142
Change-Id: I954023cd0cb4a5ee7d08647cf9a8139b0c8ae9d9
M navigation/navigation-compose-lint/src/main/java/androidx/navigation/compose/lint/NavigationComposeIssueRegistry.kt
A navigation/navigation-compose-lint/src/main/java/androidx/navigation/compose/lint/TypeSafeDestinationMissingAnnotationDetector.kt
A navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/MissingKeepAnnotationDetectorTest.kt
A navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/MissingSerializableAnnotationDetectorTest.kt
M navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/Stubs.kt
https://android-review.googlesource.com/3271440
Branch: androidx-main
commit 33f3eee080a07079f9ce7b34d58ee210869fe180
Author: Clara Fok <clarafok@google.com>
Date: Wed Sep 18 23:32:56 2024
Add navigation-compose lint for type safe annotations
The lint checks if routes that are used to create NavDestinations are annotated with kotlinx @Serializable, and checks that enum arg types are annotated with @Keep.
Test: ./gradlew navigation:navigation-compose-lint:test
Bug: 362725816
Bug: 358687142
Change-Id: I954023cd0cb4a5ee7d08647cf9a8139b0c8ae9d9
M navigation/navigation-compose-lint/src/main/java/androidx/navigation/compose/lint/NavigationComposeIssueRegistry.kt
A navigation/navigation-compose-lint/src/main/java/androidx/navigation/compose/lint/TypeSafeDestinationMissingAnnotationDetector.kt
A navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/MissingKeepAnnotationDetectorTest.kt
A navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/MissingSerializableAnnotationDetectorTest.kt
M navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/Stubs.kt
za...@google.com <za...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit 50b1c751929ecb0bfafa59afc1a6101b39668e9b
Author: Clara Fok <clarafok@google.com>
Date: Wed Sep 18 20:55:45 2024
Add navigation-runtime lint for type safe annotations
The lint checks if routes that are used to create NavDestinations are annotated with kotlinx @Serializable, and checks that enum arg types are annotated with @Keep.
Test: ./gradlew navigation:navigation-runtime-lint:test
Bug: 362725816
Bug: 358687142
Change-Id: Ie601a15449b1561154bd3ae5d990e006a371c7c6
M navigation/navigation-runtime-lint/src/main/java/androidx/navigation/runtime/lint/NavigationRuntimeIssueRegistry.kt
A navigation/navigation-runtime-lint/src/main/java/androidx/navigation/runtime/lint/TypeSafeDestinationMissingAnnotationDetector.kt
A navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/MissingKeepAnnotationDetectorTest.kt
A navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/MissingSerializableAnnotationDetectorTest.kt
A navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/Stubs.kt
https://android-review.googlesource.com/3271439
Branch: androidx-main
commit 50b1c751929ecb0bfafa59afc1a6101b39668e9b
Author: Clara Fok <clarafok@google.com>
Date: Wed Sep 18 20:55:45 2024
Add navigation-runtime lint for type safe annotations
The lint checks if routes that are used to create NavDestinations are annotated with kotlinx @Serializable, and checks that enum arg types are annotated with @Keep.
Test: ./gradlew navigation:navigation-runtime-lint:test
Bug: 362725816
Bug: 358687142
Change-Id: Ie601a15449b1561154bd3ae5d990e006a371c7c6
M navigation/navigation-runtime-lint/src/main/java/androidx/navigation/runtime/lint/NavigationRuntimeIssueRegistry.kt
A navigation/navigation-runtime-lint/src/main/java/androidx/navigation/runtime/lint/TypeSafeDestinationMissingAnnotationDetector.kt
A navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/MissingKeepAnnotationDetectorTest.kt
A navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/MissingSerializableAnnotationDetectorTest.kt
A navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/Stubs.kt
Description
Component used: androidx.glance:glance-appwidget
Version used: 1.0.0-rc01
Devices/Android versions reproduced on: Emulator (any API level)
I'm trying to update the glance-experimental-tools project to the latest version of Glance and Compose but, after the release of Glance 1.0.0-beta01, the https://developer.android.com/jetpack/androidx/releases/glance#1.0.0-beta01
@Composable
Content
was removed, in favor of the non Composable functionprovideCotent
:This change unfortunately breaks the glance-experimental-tools completely, since now it is not possible anymore to generare a snapshot of the Widget .