-
Notifications
You must be signed in to change notification settings - Fork 28.7k
let the plugin's output generated in flutter/.android/plugins_build_output/${androidPlugin.name} #94645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
let the plugin's output generated in flutter/.android/plugins_build_output/${androidPlugin.name} #94645
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
@christopherfujino |
cc @stuartmorgan does this look like the right change? |
I'm not familiar with the internal build setup of Android plugins; @blasten would be a better reviewer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be fixed in the template file. The fix is:
should have a section similar to:
flutter/packages/flutter_tools/templates/app_shared/android-java.tmpl/build.gradle
Lines 20 to 22 in ad3fe21
subprojects { | |
project.buildDir = "${rootProject.buildDir}/${project.name}" | |
} |
I have changed the plugin's output directory to |
can we add the subproject logic below this line https://github.com/flutter/flutter/blob/master/packages/flutter_tools/templates/module/android/host_app_common/app.tmpl/build.gradle.tmpl#L33? The reason is that the file you are changing is also used for other case where this change may or may not make sense. |
In some case, the host gradle project may dependent the plugin's native module directly. and the templete may not work for this case. such as: |
@blasten |
Gold has detected about 6 new digest(s) on patchset 4. |
@blasten can you take a look at this PR? |
@blasten friendly ping |
9e2a8a6
to
eb7747f
Compare
thanks for tips, I rebased the branch with latest master. |
fdcc969
to
7c77d36
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs test
For the test, https://github.com/flutter/flutter/blob/master/packages/flutter_tools/test/integration.shard/android_plugin_compilesdkversion_mismatch_test.dart is an example of how Gradle intergrations are currently tested. |
@blasten I have ran the test , and got no error.
|
e6b1b6f
to
e4edc3a
Compare
Fixed # recreate the losted test file which losted when handle merge conflict.
ca50ebc
to
40954ef
Compare
I clicked the re-request review button, and github removed @GaryQian . @stuartmorgan maybe you can request review again. Thanks. |
@stuartmorgan So in Gradle, the |
Thanks for that explanation! |
It has been discussed at the beginning of this PR. Thanks for everyone who helped this PR! |
…_build_output/${androidPlugin.name} (flutter/flutter#94645)
…_build_output/${androidPlugin.name} (flutter/flutter#94645)
let the plugin's output generated in flutter/.android/plugins_build_output/${androidPlugin.name}. will close #92252
change the output directory of native plugin's from
$HOME/.pub-cache/${plugin_path}
to${flutter_module_path}/.android/plugins_build_output/${androidPlugin.name}
. Because the directory userd before was a shared directory,it will cause issue #92252 when run multiple task simultaneously.List which issues are fixed by this PR. You must list at least one issue.
#92252
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.