Repository navigation
Conversation
This is a very rough proof of concept. It functions on simple app cases given manual tweaking. It basically works by adding extra logic to `gradle.dart` before the APK of an app is compiled. - Get a flat list of all transitive Flutter plugin dependencies. - Run an `init-script` on each one to add the local `flutter-jar` as a `compileOnly` dependency to it. - Compile each dependency as an AAR. - Use the plugin AARs as dependencies for compiling the APK in the `flutter.gradle` plugin. There's two big blockers on this still that I'm currently aware of. 1. This requires apps to manually remove the `subprojects` declarations from `android/build.gradle` and the `plugins.each` loop from `android/settings.gradle`. It's both breaking and requiring manual intervention on the app side to work. 2. Transitive gradle dependencies within our Flutter plugins cause crashes at runtime, since the inner deps aren't being included in the aar. To see a failing case, use this code with a sample app requiring `firebase_auth`. At runtime it will crash because the firebase library isn't found.
…mklim-plugin_aar_wip
Contributor
Author
|
This needs tests. |
6 of 10 tasks
mklim
reviewed
Mar 25, 2019
mklim
left a comment
Contributor
There was a problem hiding this comment.
I think we should probably migrate all our sample code in one go, but I think it would also be worth leaving it unmigrated for a patch or two and letting it go through CI just to make sure we're not introducing regressions. Spot checked the errors in CI on the latest patch and it doesn't look related to this, saying "no devices found."
Contributor
|
Do we have a proposal and/or design doc for this where I can see the whole picture of what's changing? |
Contributor
Author
|
@matthew-carroll right now it's all in #29328 |
dnfield
marked this pull request as ready for review
March 26, 2019 04:02
Contributor
Author
|
I'm going to close this for now. It seems like the only relevant difference is the compileSdkVersion. This PR isn't really addressing the right problem as is. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This continues work begun in #29460:
Add extra logic to
gradle.dartbefore the APKof an app is compiled.
init-scripton each one to add the localflutter-jaras acompileOnlydependency to it.flutter.gradleplugin.and adds with the following changes/updates:
apiorcompiledependency).settings.gradleandbuild.gradlein the Flutter project (and templates) to remove deprecated logic that will no longer be compatible. Provide migration in gradle.dartProblems this doesn't solve:
Problems it does solve:
Related Issues
Fixes #29328
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?