Fixed
Status Update
Comments
da...@google.com <da...@google.com>
je...@google.com <je...@google.com>
da...@google.com <da...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 1dc8469381c79612a3d8f7ec138866c732506950
Author: Jeremy Woods <jbwoods@google.com>
Date: Tue Jun 16 16:00:41 2020
Add ActivityResult lint to update Fragment dependency
When using the ActivityResult APIs, you should update the
fragment dependency to at least 1.3.0-alpha06 to ensure that
FragmentActivity is compatible.
This change adds a lint check to notify the user that their dependency
should be updated. This is only a warning, the user must fix the
dependency manually. The quick fix will be in a later CL.
Test: added ActivityResultFragmentVersionDetectorTest
Bug: 152554847
Change-Id: Ie59c1e2d428ce473f4e57939a69616b9052936c5
A activity/activity-lint/src/main/java/androidx/activity/lint/ActivityIssueRegistry.kt
A activity/activity-lint/src/main/java/androidx/activity/lint/ActivityResultFragmentVersionDetector.kt
A activity/activity-lint/src/main/resources/META-INF/services/com.android.tools.lint.client.api.IssueRegistry
A activity/activity-lint/src/test/java/androidx/activity/lint/ActivityResultFragmentVersionDetectorTest.kt
A activity/activity-lint/src/test/java/androidx/activity/lint/ApiLintVersionsTest.kt
A activity/activity-lint/src/test/java/androidx/activity/lint/stubs/Stubs.kt
https://android-review.googlesource.com/1332135
Branch: androidx-master-dev
commit 1dc8469381c79612a3d8f7ec138866c732506950
Author: Jeremy Woods <jbwoods@google.com>
Date: Tue Jun 16 16:00:41 2020
Add ActivityResult lint to update Fragment dependency
When using the ActivityResult APIs, you should update the
fragment dependency to at least 1.3.0-alpha06 to ensure that
FragmentActivity is compatible.
This change adds a lint check to notify the user that their dependency
should be updated. This is only a warning, the user must fix the
dependency manually. The quick fix will be in a later CL.
Test: added ActivityResultFragmentVersionDetectorTest
Bug: 152554847
Change-Id: Ie59c1e2d428ce473f4e57939a69616b9052936c5
A activity/activity-lint/src/main/java/androidx/activity/lint/ActivityIssueRegistry.kt
A activity/activity-lint/src/main/java/androidx/activity/lint/ActivityResultFragmentVersionDetector.kt
A activity/activity-lint/src/main/resources/META-INF/services/com.android.tools.lint.client.api.IssueRegistry
A activity/activity-lint/src/test/java/androidx/activity/lint/ActivityResultFragmentVersionDetectorTest.kt
A activity/activity-lint/src/test/java/androidx/activity/lint/ApiLintVersionsTest.kt
A activity/activity-lint/src/test/java/androidx/activity/lint/stubs/Stubs.kt
da...@airbank.net <da...@airbank.net> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 88b606aa168d0131d366a790183453d52ed97d26
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Jun 11 11:27:35 2020
Create activity-lint module
Created module for custom activity lint checks.
Test: ./gradlew bOS
Bug: 152554847
Change-Id: Ice5a9794fcc769a82f1831cc10337d9b82fbbb71
A activity/activity-lint/build.gradle
M buildSrc/src/main/kotlin/androidx/build/PublishDocsRules.kt
M settings.gradle
https://android-review.googlesource.com/1332134
Branch: androidx-master-dev
commit 88b606aa168d0131d366a790183453d52ed97d26
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Jun 11 11:27:35 2020
Create activity-lint module
Created module for custom activity lint checks.
Test: ./gradlew bOS
Bug: 152554847
Change-Id: Ice5a9794fcc769a82f1831cc10337d9b82fbbb71
A activity/activity-lint/build.gradle
M buildSrc/src/main/kotlin/androidx/build/PublishDocsRules.kt
M settings.gradle
ap...@google.com <ap...@google.com> #4
This has been fixed internally and will be available in the Activity 1.2.0-alpha07 release.
il...@google.com <il...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-master-dev
commit a17089efb14fcfb5e3938680f0d3b3103245092c
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Jul 01 17:59:41 2020
Publish the activity lint rule
We should actually publish the lint rule.
Also ignoring any project dependencies since they would be using the
most recent version of fragments anyway.
Test: ./gradlew bOS
Bug: 152554847
Change-Id: Ica57230490024b6aff32fcc3ec83d1c6f800f05f
M activity/activity-ktx/build.gradle
M activity/activity-lint/src/main/java/androidx/activity/lint/ActivityResultFragmentVersionDetector.kt
M activity/activity-lint/src/test/java/androidx/activity/lint/ActivityResultFragmentVersionDetectorTest.kt
M activity/activity/build.gradle
M activity/integration-tests/testapp/build.gradle
https://android-review.googlesource.com/1354243
Branch: androidx-master-dev
commit a17089efb14fcfb5e3938680f0d3b3103245092c
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Jul 01 17:59:41 2020
Publish the activity lint rule
We should actually publish the lint rule.
Also ignoring any project dependencies since they would be using the
most recent version of fragments anyway.
Test: ./gradlew bOS
Bug: 152554847
Change-Id: Ica57230490024b6aff32fcc3ec83d1c6f800f05f
M activity/activity-ktx/build.gradle
M activity/activity-lint/src/main/java/androidx/activity/lint/ActivityResultFragmentVersionDetector.kt
M activity/activity-lint/src/test/java/androidx/activity/lint/ActivityResultFragmentVersionDetectorTest.kt
M activity/activity/build.gradle
M activity/integration-tests/testapp/build.gradle
la...@gmail.com <la...@gmail.com> #6
Project: platform/frameworks/support
Branch: androidx-master-dev
commit be64fe99f1e6800d2df7bc1a0a5ca4ffc38a2f6a
Author: Jeremy Woods <jbwoods@google.com>
Date: Tue Jul 07 15:09:23 2020
Make ActivityResult lint look for transitive dependencies
Instead of only looking for explicit fragment dependencies, the
ActivityResultFragmentVersionDetector should also take into
consideration transitive dependencies. This ensures we can catch older
versions in apps that use libraries like appcompat and navigation.
Test: ./gradlew bOS all exisiting tests pass
Bug: 152554847
Change-Id: Id0a3b6c69a685cc46b71f1977a348189780b385a
M activity/activity-ktx/build.gradle
M activity/activity-lint/src/main/java/androidx/activity/lint/ActivityResultFragmentVersionDetector.kt
M activity/integration-tests/testapp/build.gradle
https://android-review.googlesource.com/1356393
Branch: androidx-master-dev
commit be64fe99f1e6800d2df7bc1a0a5ca4ffc38a2f6a
Author: Jeremy Woods <jbwoods@google.com>
Date: Tue Jul 07 15:09:23 2020
Make ActivityResult lint look for transitive dependencies
Instead of only looking for explicit fragment dependencies, the
ActivityResultFragmentVersionDetector should also take into
consideration transitive dependencies. This ensures we can catch older
versions in apps that use libraries like appcompat and navigation.
Test: ./gradlew bOS all exisiting tests pass
Bug: 152554847
Change-Id: Id0a3b6c69a685cc46b71f1977a348189780b385a
M activity/activity-ktx/build.gradle
M activity/activity-lint/src/main/java/androidx/activity/lint/ActivityResultFragmentVersionDetector.kt
M activity/integration-tests/testapp/build.gradle
la...@gmail.com <la...@gmail.com> #7
The new lint check can now detect the fragment library as a transitive dependency.
Description
Version used: 1.0.0-alpha09
Devices/Android versions reproduced on: Pixel 3 XL (API 28)
Using the Navigation 1.0.0-alpha09 Safe Args plugin fails during Gradle sync with the following exception:
Caused by: kotlin.TypeCastException: null cannot be cast to non-null type org.gradle.api.resources.TextResource
at androidx.navigation.safeargs.gradle.SafeArgsPlugin.setApplicationId(SafeArgsPlugin.kt:87)
at androidx.navigation.safeargs.gradle.SafeArgsPlugin.access$setApplicationId(SafeArgsPlugin.kt:39)
at androidx.navigation.safeargs.gradle.SafeArgsPlugin$apply$1$task$1.execute(SafeArgsPlugin.kt:63)
at androidx.navigation.safeargs.gradle.SafeArgsPlugin$apply$1$task$1.execute(SafeArgsPlugin.kt:39)
at org.gradle.api.internal.tasks.DefaultTaskContainer.create(DefaultTaskContainer.java:334)
at androidx.navigation.safeargs.gradle.SafeArgsPlugin$apply$1.invoke(SafeArgsPlugin.kt:59)
at androidx.navigation.safeargs.gradle.SafeArgsPlugin$apply$1.invoke(SafeArgsPlugin.kt:39)
at androidx.navigation.safeargs.gradle.SafeArgsPluginKt$sam$org_gradle_api_Action$0.execute(SafeArgsPlugin.kt)
This appears to be a regression introduced by:
See the attached minimal sample project to reproduce. Downgrading navigation_version to 1.0.0-alpha08 or removing apply plugin: "androidx.navigation.safeargs" from the library module's build.gradle file "fixes" the issue.