`flutter build aar`
This new build command works just like `flutter build apk` or `flutter build appbundle`, but for plugin and module projects.
This PR also refactors how plugins are included in app or module projects. By building the plugins as AARs, the Android Gradle plugin is able to use Jetifier to translate support libraries into AndroidX libraries for all the plugin's native code. Thus, reducing the error rate when using AndroidX in apps.
This change also allows to build modules as AARs, so developers can take these artifacts and distribute them along with the native host app without the need of the Flutter tool. This is a requirement for add to app.
`flutter build aar` generates POM artifacts (XML files) which contain metadata about the native dependencies used by the plugin. This allows Gradle to resolve dependencies at the app level. The result of this new build command is a single build/outputs/repo, the local repository that contains all the generated AARs and POM files.
In a Flutter app project, this local repo is used by the Flutter Gradle plugin to resolve the plugin dependencies. In add to app case, the developer needs to configure the local repo and the dependency manually in `build.gradle`:
repositories {
maven {
url "<path-to-flutter-module>build/host/outputs/repo"
}
}
dependencies {
implementation("<package-name>:flutter_<build-mode>:1.0@aar") {
transitive = true
}
}
`flutter build aar`
This new build command works just like `flutter build apk` or `flutter build appbundle`, but for plugin and module projects.
This PR also refactors how plugins are included in app or module projects. By building the plugins as AARs, the Android Gradle plugin is able to use Jetifier to translate support libraries into AndroidX libraries for all the plugin's native code. Thus, reducing the error rate when using AndroidX in apps.
This change also allows to build modules as AARs, so developers can take these artifacts and distribute them along with the native host app without the need of the Flutter tool. This is a requirement for add to app.
`flutter build aar` generates POM artifacts (XML files) which contain metadata about the native dependencies used by the plugin. This allows Gradle to resolve dependencies at the app level. The result of this new build command is a single build/outputs/repo, the local repository that contains all the generated AARs and POM files.
In a Flutter app project, this local repo is used by the Flutter Gradle plugin to resolve the plugin dependencies. In add to app case, the developer needs to configure the local repo and the dependency manually in `build.gradle`:
repositories {
maven {
url "<path-to-flutter-module>build/host/outputs/repo"
}
}
dependencies {
implementation("<package-name>:flutter_<build-mode>:1.0@aar") {
transitive = true
}
}
Plus:
- Resume the app being run after expression has been evaluated to prevent the test run being forcefully terminated because it didn't end
- Skip non-JSON when waiting for JSON (eg. when running in verbose mode for debugging locally)
- Pass defaultTimeout in waitForJson (otherwise the assert in _timeoutWithMessages fails when it's not provided)
Closes https://github.com/flutter/flutter/issues/26518 (the original reason for skip was fixed in https://github.com/dart-lang/sdk/issues/34224).
9cf13568e2...325f5b66dc
git log 9cf13568e2aa1f9ab37445037e2ef54ecb5146f8..325f5b66dcc0d32ed344a3d8555572c2fb995dc1 --no-merges --oneline
325f5b66d Roll fuchsia/sdk/core/linux-amd64 from i5kNl7ZKu6X9AqpFLP4d5vDqQ4k9CtaQIk3x3WLVFxMC to 8TNm8LtekvIJNYrWK9JBsM3qONKGYnyHufXhidbBKWsC (flutter/engine#9967)
fe0ffc7f6 Roll fuchsia/sdk/core/linux-amd64 from LNYN3mEv2NJLUmZf6nGD5IWqOjDDiXpPeV2l4YWI0j8C to i5kNl7ZKu6X9AqpFLP4d5vDqQ4k9CtaQIk3x3WLVFxMC (flutter/engine#9966)
0ac94f75a Roll fuchsia/sdk/core/linux-amd64 from Hjo8G2HMO-S2RkQO8NOJNFH9t9QlspYq810NONDB8e0C to LNYN3mEv2NJLUmZf6nGD5IWqOjDDiXpPeV2l4YWI0j8C (flutter/engine#9964)
8fda1c99b Fix return type of assert function in gradient_test (flutter/engine#9961)
79bb7a583 Roll fuchsia/sdk/core/linux-amd64 from yCNSGMzcBMQzda_aHXqXWoW1cLSen0AL64orTFH-qHcC to Hjo8G2HMO-S2RkQO8NOJNFH9t9QlspYq810NONDB8e0C (flutter/engine#9960)
736c28b35 Update Dart engine tests to check for assertion failures only when running in debug mode (flutter/engine#9959)
b56e1ad79 Roll src/third_party/skia 4a13119a60e2..be91f062d70e (3 commits) (flutter/engine#9956)
61e2ba1db Roll src/third_party/dart 63120303a7...a089199b93 (flutter/engine#9951)
da0fcf828 Updates to the engine test runner script (flutter/engine#9934)
The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
If the roll is causing failures, please contact the current sheriff (aaclarke@google.com), and stop
the roller if necessary.
5467f6f630...9cf13568e2
git log 5467f6f63046620b0ef1edc72ae06f9fad941cee..9cf13568e2aa1f9ab37445037e2ef54ecb5146f8 --no-merges --oneline
9cf13568e Added hasRenderedFirstFrame() to old FlutterView for Espresso (#36211). (flutter/engine#9939)
8d28215c8 Fix caching of Locale.toString (flutter/engine#9920)
b1276efa7 Roll fuchsia/sdk/core/linux-amd64 from kKw24ZxMzd4Hx6mCaVBSxBJxx7wIKmxP8txe9Cp0dxIC to yCNSGMzcBMQzda_aHXqXWoW1cLSen0AL64orTFH-qHcC (flutter/engine#9955)
649e025f7 Removed PlatformViewsController if-statements from TextInputPlugin (#34286). (flutter/engine#9938)
ede88d7df Roll src/third_party/skia aa861a1907a1..4a13119a60e2 (9 commits) (flutter/engine#9950)
48b1340ad Fix the geometry test to reflect that OffsetBase comparison operators are a partial ordering (flutter/engine#9925)
971c3f24a Roll fuchsia/sdk/core/linux-amd64 from XG_fYb35A8mJpnMG_I9iBm7yHJyNZYZRgG69a88us_sC to kKw24ZxMzd4Hx6mCaVBSxBJxx7wIKmxP8txe9Cp0dxIC (flutter/engine#9947)
3d7f93a2e Removed logic from FlutterAppDelegate into FlutterPluginAppLifeCycleDelegate (flutter/engine#9893)
273f4cfe8 Split out lifecycle protocol (flutter/engine#9922)
f41be3ea6 Roll src/third_party/skia 58d1f76fc008..aa861a1907a1 (7 commits) (flutter/engine#9946)
53f620f45 [platform view] do not make clipping view and interceptor view clipToBounds (flutter/engine#9937)
a1faebb8f Roll fuchsia/sdk/core/linux-amd64 from IPgI5Uh4rIZ4zNfAV1_ynC4dGmFLexAW1L9czHUyjowC to XG_fYb35A8mJpnMG_I9iBm7yHJyNZYZRgG69a88us_sC (flutter/engine#9945)
309ad63e6 Roll src/third_party/skia 95528752e2bd..58d1f76fc008 (1 commits) (flutter/engine#9944)
d852e8a64 Roll src/third_party/skia 19547c91b983..95528752e2bd (1 commits) (flutter/engine#9943)
The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
If the roll is causing failures, please contact the current sheriff (aaclarke@google.com), and stop
the roller if necessary.