Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
I think making the Builder final
and adding the missing nullability makes a lot of sense.
We'll want to keep the getters for API compatibility purposes, so let's suppress that warning.
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 0cf2de39de68f680b2912a64ebf72c164b87aabc
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Aug 18 12:27:52 2021
Fix safe args builder lint warnings
The SafeArgs java generator currently has lint warnings for the Builder
not being final, missing nullability annotation, and getter on builder
errors.
The change makes the appropriate changes to prevent those warnings.
RelNote: "The SafeArgs java generator should no longer cause lint
warnings when generating Args classes."
Test: ./gradlew --rerun-tasks navigation:navigation-safe-args-generator:test
Bug: 185843837
Change-Id: I1a6661b10b8e380aaa9fcfd1fc710c35b047bd6d
M navigation/navigation-safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/java/JavaNavWriter.kt
M navigation/navigation-safe-args-generator/src/test/test-data/expected/java_nav_writer_test/MainFragment$InnerFragmentArgs.java
M navigation/navigation-safe-args-generator/src/test/test-data/expected/java_nav_writer_test/MainFragmentArgs.java
M navigation/navigation-safe-args-generator/src/test/test-data/expected/java_nav_writer_test/SanitizedMainFragmentArgs.java
https://android-review.googlesource.com/1800570
Branch: androidx-main
commit 0cf2de39de68f680b2912a64ebf72c164b87aabc
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Aug 18 12:27:52 2021
Fix safe args builder lint warnings
The SafeArgs java generator currently has lint warnings for the Builder
not being final, missing nullability annotation, and getter on builder
errors.
The change makes the appropriate changes to prevent those warnings.
RelNote: "The SafeArgs java generator should no longer cause lint
warnings when generating Args classes."
Test: ./gradlew --rerun-tasks navigation:navigation-safe-args-generator:test
Bug: 185843837
Change-Id: I1a6661b10b8e380aaa9fcfd1fc710c35b047bd6d
M navigation/navigation-safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/java/JavaNavWriter.kt
M navigation/navigation-safe-args-generator/src/test/test-data/expected/java_nav_writer_test/MainFragment$InnerFragmentArgs.java
M navigation/navigation-safe-args-generator/src/test/test-data/expected/java_nav_writer_test/MainFragmentArgs.java
M navigation/navigation-safe-args-generator/src/test/test-data/expected/java_nav_writer_test/SanitizedMainFragmentArgs.java
jb...@google.com <jb...@google.com> #4
This has been fixed internally and will be available in the Navigation 2.4.0-alpha08
release.
Description
Component used: Navigation, Safe Args plugin
Version used: 2.3.4
Hi!
I'm working on creating a debug view for AppSearch as a Jetpack library. I'm using Navigation component for managing switching between fragments. I'm using the Safe Args plugin for passing in arguments to a destination fragment. However, the classes the Safe Args plugin generates in the build tree are causing the Jetpack API lint check to fail:
The class generating these errors is attached. I would appreciate it if the Lint issues could be resolved so I can continue using Safe Args!