Commit graph

1627 commits

Author SHA1 Message Date
Emmanuel Garcia 11460b8378
Add flutter build aar (#35217)
`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
    }
}
2019-07-22 20:46:01 -07:00
Jonah Williams e5ea996a1f
disable flaky windows test (#36722) 2019-07-22 18:14:43 -07:00
Jonah Williams 3fedb8cb5a
Reland: use flutter features for web and desktop (#36699) 2019-07-22 15:34:03 -07:00
Jonah Williams 8eae2dfb92
Revert "Use FlutterFeatures to configure web and desktop devices (#36465)" (#36654)
This reverts commit bd52a78c71.
2019-07-21 21:47:43 -07:00
Jonah Williams bd52a78c71
Use FlutterFeatures to configure web and desktop devices (#36465) 2019-07-21 18:21:15 -07:00
Zachary Anderson 76cbbeb627
[flutter_tool] Send the local time to analytics with screens and events (#36545) 2019-07-19 14:54:18 -07:00
Jonah Williams 6830edd0be
Clean up flutter driver device detection. (#36434) 2019-07-19 14:48:17 -07:00
Christopher Fujino 9bd2e4000b
Throw exception if instantiating IOSDevice on non-mac os platform (#36288) 2019-07-19 12:20:45 -07:00
Dan Field c953cd19d2
Enable bitcode compilation for AOT (#36471) 2019-07-18 22:42:47 -07:00
Zachary Anderson 82a4ba40bb
[flutter_tool] Send analytics command before the command runs (#36490) 2019-07-18 18:05:44 -07:00
Todd Volkert adb2aeebe3
Ensure that cache dirs and files have appropriate permissions (#28090)
This is a partial re-application of #24669, which was
reverted due to Fuchsia breakages.

https://github.com/flutter/flutter/issues/24413
2019-07-18 15:29:06 -07:00
Emmanuel Garcia 5a34e7981e
Catch exceptions thrown by runChecked* when possible (#36109) 2019-07-18 10:45:37 -07:00
Jonah Williams 757b5365fa
Add missing test case for Usage (#36379) 2019-07-18 10:41:13 -07:00
Jonah Williams 1957c66300
add testing to screenshot and printDetails method (#36418) 2019-07-18 10:40:40 -07:00
Christopher Fujino 42a9c031e5
Fix invocations of ideviceinstaller not passing DYLD_LIBRARY_PATH (#36327)
* add failing tests

* fix tests

* be more specific with try-catch

* add further mocking to get tests to pass again

* fix analyzer failure
2019-07-17 13:44:49 -07:00
xster 03220cacd1
Make sure add-to-app build bundle from outer xcodebuild/gradlew sends analytics (#36122) 2019-07-17 11:17:04 -07:00
Jonah Williams 36c37ccab5
Implement feature flag system for flutter tools (#36138) 2019-07-16 17:33:28 -07:00
Todd Volkert aa9a115181
Move reporting files to reporting/ (#36017)
Slight cleanup of file locations in flutter_tools
to make it easier to see which files are responsible
for data reporting.
2019-07-16 13:21:06 -07:00
Christopher Fujino 540c747656
Revert "Keep LLDB connection to iOS device alive while running from CLI. (#36194)" (#36293)
This reverts commit 5501a1c1e7.
2019-07-16 12:34:49 -07:00
sjindel-google 5501a1c1e7
Keep LLDB connection to iOS device alive while running from CLI. (#36194)
## Description

Instead of detaching from the spawned App process on the device immediately, keep the LLDB client connection open (in autopilot mode) until the App quits or the server connection is lost.

This replicates the behavior of Xcode, which also keeps a debugger attached to the App after launching it.

## Tests

This change will be covered by all running benchmarks (which are launched via "flutter run"/"flutter drive"), and probably be covered by all tests as well.

I also tested the workflow locally -- including cases where the App or Flutter CLI is terminated first.

## Breaking Change

I don't believe this should introduce any breaking changes. The LLDB client automatically exits when the app dies or the device is disconnected, so there shouldn't even be any user-visible changes to the behavior of the tool (besides the output of "-v").
2019-07-16 19:15:15 +02:00
Zachary Anderson fa65ddf51d
[flutter_tool] Allow analytics without a terminal attached (#36208) 2019-07-16 09:48:49 -07:00
chunhtai 1166015931
Enable widget load assets in its own package in test (#35991) 2019-07-16 09:47:42 -07:00
Jonah Williams b257c33b69
Use DeviceManager instead of device to determine if device supports project (#36213) 2019-07-15 16:10:39 -07:00
Jonah Williams 6b17840cbf
Don't try to flutterExit if isolate is still paused (#36199) 2019-07-15 15:44:58 -07:00
Christopher Fujino 102ab1e6d9
Reland bundle ios deps (#36093)
This updates the flutter tool cache to download binary files for ideviceinstaller, ios-deploy, libimobiledevice, and dynamically linked dependencies from Flutter's GCP bucket.
2019-07-15 09:22:29 -07:00
Jonah Williams e3ee5c6bbb
Add better handling of JSON-RPC exception (#36082) 2019-07-13 16:02:09 -07:00
Ian Hickson d919e694b8
Move tools tests into a general.shard directory in preparation to changing how we shard tools tests (#36108) 2019-07-13 11:51:44 -07:00