Repository navigation
[flutter_tools] Use resolved application ID for app link settings - #189488
auto-submit[bot] merged 3 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the DeepLinkJsonFromManifestTask to use the resolved applicationId instead of the namespace property, and adds an integration test to verify this behavior. Feedback points out that casting variant directly to ApplicationVariant in FlutterPluginUtils.kt is unsafe and could lead to a ClassCastException for non-application variants, suggesting a safe type check instead.
d06ba18 to
9d20483
Compare
gmackall
left a comment
There was a problem hiding this comment.
LGTM, seems like switching to namespace was a simply incorrect and a regression. Thanks for this fix!
|
autosubmit label was removed for flutter/flutter/189488, because This PR has not met approval requirements for merging. The PR author is not a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.
|
Fixes #179705
The AppLinkSettings Gradle task was writing
variant.namespaceinto the generated JSON. When an app setsapplicationIdfrom an environment variable or Gradle property, the namespace can differ from the resolved application ID.This updates the task to use AGP's resolved
ApplicationVariant.applicationIdand adds an integration test covering an environment-backedapplicationId.Tests:
dart run test -j1 test/integration.shard/android_gradle_outputs_app_link_settings_test.dartFLUTTER_TEST_DISABLE_FS_GUARD=true dart run test -j1 test/commands.shard/hermetic/android_analyze_test.dart