Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit c5958c428b38edbae61eebb7cc0b8032658b9eaa
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Apr 08 09:28:54 2021
Avoid new fragment version lint false positives
Now that fragment has gone stable, our lint check is not sufficient to
handle 1.3.0 unstable versions and new upcoming versions. This means
that using new fragment unstable versions (i.e.
1.4.0-SNAPSHOT/alpha/beta/rc) will all throw false positive lint errors.
This adds to the check to consider versions numbers with no suffix.
RelNote: "Using unstable versions after fragment `1.3.0` will no longer
throw a false positive lint error telling you to use `1.3.0`."
Test: modified tests to use stable versions
Bug: 184847092
Change-Id: I6a2964c38b91e8167ba11bfc3f2b1233d35cbdc6
M activity/activity-lint/src/main/java/androidx/activity/lint/ActivityResultFragmentVersionDetector.kt
M activity/activity-lint/src/test/java/androidx/activity/lint/ActivityResultFragmentVersionDetectorTest.kt
https://android-review.googlesource.com/1670206
Branch: androidx-main
commit c5958c428b38edbae61eebb7cc0b8032658b9eaa
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Apr 08 09:28:54 2021
Avoid new fragment version lint false positives
Now that fragment has gone stable, our lint check is not sufficient to
handle 1.3.0 unstable versions and new upcoming versions. This means
that using new fragment unstable versions (i.e.
1.4.0-SNAPSHOT/alpha/beta/rc) will all throw false positive lint errors.
This adds to the check to consider versions numbers with no suffix.
RelNote: "Using unstable versions after fragment `1.3.0` will no longer
throw a false positive lint error telling you to use `1.3.0`."
Test: modified tests to use stable versions
Bug: 184847092
Change-Id: I6a2964c38b91e8167ba11bfc3f2b1233d35cbdc6
M activity/activity-lint/src/main/java/androidx/activity/lint/ActivityResultFragmentVersionDetector.kt
M activity/activity-lint/src/test/java/androidx/activity/lint/ActivityResultFragmentVersionDetectorTest.kt
jb...@google.com <jb...@google.com> #3
This has been fixed internally and will be available in the Activity 1.2.3
release.
il...@google.com <il...@google.com> #4
We'll also be making this available in the Activity 1.3.0-alpha07
release.
an...@gmail.com <an...@gmail.com> #5
Can someone confirm that this is fixed already? My combination is
const val activityKtx = "1.2.3"
const val fragmentKtx = "1.3.3"
but Lint ist still giving me this error
il...@google.com <il...@google.com> #6
Re #5 - yes that combination should work. Please file a new bug with a sample project if you're still having issues.
Description
Currently activity-lint detects
1.4.0-blah
as a version which fails to fulfill the >=1.3.0
version requirement forandroidx.fragment
, but I think this behavior is unintended.