Fixed
Status Update
Comments
pb...@google.com <pb...@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
.
to...@gmail.com <to...@gmail.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
za...@google.com <za...@google.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
ap...@google.com <ap...@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: glance-appwidget Version used: 1.0 alpha1
It would be nice to be able to manually resolve ColorProvider to avoid code duplication. It's currently not possible as the DayNight provider is internal.
This is useful to modify the colors to add alpha (like disabled status) or manually apply tint since the API does not yet support it.