Commit Graph

309 Commits

Author SHA1 Message Date
Jonah Williams
ddab72e79f
[flutter_tools] add --android-gradle-daemon option, use in devicelab (#68409)
Remove devicelab specific code for shutting down gradle daemon, add --android-gradle-daemon option to build/run/drive`. Avoids need for un-tested devicelab specific handler. There are also some feature requests for this, so 2 birds one stone.

Example:

flutter build apk --no-android-gradle-daemon will pass --no-daemon on to gradle
2020-10-19 09:12:21 -07:00
Alexandre Ardhuin
73301a35a2
Sync lints (#68136) 2020-10-15 15:37:04 -07:00
Jonah Williams
27936e9f22
Revert "[flutter_tools] ensure android log reader works in flutter drive (#68131)" (#68222)
This reverts commit d962c8f2a2.
2020-10-15 10:50:56 -07:00
Jonah Williams
2321b72dfb
[flutter_tools] move gradle download failure handling into tool (#68140)
This crash affects anyone using flutter, so move it into the tool where it can be tested and documented. Ensure it works on windows devicelab too.
2020-10-15 09:20:52 -07:00
Jonah Williams
d962c8f2a2
[flutter_tools] ensure android log reader works in flutter drive (#68131) 2020-10-14 14:04:33 -07:00
Jonah Williams
9e70180f63
[flutter_tools] do not measure progress timeout (#67959)
Remove "This is taking a long time" progress timeout and TimeoutConfiguration.
2020-10-13 13:05:47 -07:00
Jonah Williams
1c976933f3
[flutter_tools] support Android Studio 4.1 on Windows (#67992)
Android Studio 4.1 moved the location of the .home file on Windows which is used to located the install directory. This functionality is important because it is how we locate and discover the Android SDK functionality, as well as the appropriate JRE.

fixes #67986
2020-10-13 11:33:26 -07:00
Jonah Williams
fd11d149f7
[flutter_tools] teach flutter drive to uninstall if install fails (#67936)
Work towards #39925

Currently flutter run will uninstall and reinstall if the initial install fails and the APK was previously installed. Allow drive to share this same logic by moving it into installApp and out of startApp.

This should reduce the occurrence of the error in the devicelab.
2020-10-12 12:49:36 -07:00
Jonah Williams
6180a4c179
[flutter_tools] fix documentation, globals, and todos in the android codebase (#66980)
Cleans up some undocumented classes and re-organizes the AndroidDevices class to avoid the need for the static testing only member. Adds a script for tracking globals.
2020-10-05 15:47:57 -07:00
Jenn Magder
e8fbb43aac
Replace MockFile with memory file system files (#66941) 2020-09-29 17:50:33 -07:00
Jonah Williams
9bc533c9e5
[flutter_tools] do not error flutter doctor on missing AS/intellij plugins (#66782)
In cases where the Intellij/AS plugins are not located, display links to where they can be downloaded but do not surface an error. This should generally reduce confusion about whether the plugins are required for every installed IDE. For example, frequently users may only install AS so that they can install the Android SDK - or they may have multiple copies of Intellij installed.

For example: #66762
2020-09-29 16:51:28 -07:00
knaeckeKami
8e9e13449b
Teach the flutter tool how to find android output files if the flavor contains uppercase letters (#66687)
This changes the name of the generated output files on android in case a flavor with uppercase letters is used.
Previously, the lowercased flavor name would be used for the apk/aab file. Now, the flavor name is used as-is.
2020-09-25 15:54:55 -07:00
Daniel Edrisian
3a5e45404d
Updated androidMissingSdkInstructions error message (#65964) 2020-09-17 15:57:06 -07:00
Michael R Fairhurst
7f3c9b6bda
Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
Jonah Williams
08e3ed9e2d
[flutter_tools] prevent creation of android devices if adb is not located (#65184)
More work to prevent current #2 crash issue on stable. If adb is not located do not list/create android devices.
2020-09-03 11:01:43 -07:00
Jonah Williams
d3515f5fb6
[flutter_tools] add analytics to code size, add more testing (#64578)
* [flutter_tools] add analytics to code size, add more testing

* add gradle case

* Update build_macos_test.dart

* move analytics to code size tooling

* Update analyze_size.dart

* fix analysis
2020-08-27 09:45:10 -07:00
Jonah Williams
401d401c59
[flutter_tools] reland: avoid creating Android Devices if AndroidSDK cannot be found (#64665)
Avoid creating AndroidDevice discovery if the SDK cannot be located. Previously the tool would use which/where adb, however this required us to handle the AndroidSdk class being potentially null - which required an additional layer of indirection around all access. Sometimes these were forgotten leading to NPEs.

In general, not much can be done with an Android Device if the actual SDK is not installed.

Reland with fixed code + tests for null SDK + adb in AndroidDeviceDiscovery
2020-08-27 09:44:31 -07:00
Jenn Magder
f5187535d5
Revert "[flutter_tools] avoid creating Android Devices if AndroidSDK cannot be found (#64524)" (#64602)
This reverts commit 47596c6203.
2020-08-25 17:55:58 -07:00
Jonah Williams
47596c6203
[flutter_tools] avoid creating Android Devices if AndroidSDK cannot be found (#64524)
Avoid creating AndroidDevice discovery if the SDK cannot be located. Previously the tool would use which/where adb, however this required us to handle the AndroidSdk class being potentially null - which required an additional layer of indirection around all access. Sometimes these were forgotten leading to NPEs.

In general, not much can be done with an Android Device if the actual SDK is not installed.
2020-08-25 11:08:27 -07:00
xster
a2e5e074ab
Move Android doctor SDK check to 29 and Cirrus images to 30 (#63517) 2020-08-20 11:06:32 -07:00
Jonah Williams
4954a46ff0
[flutter_tools] shrink API surface of Android SDK (#63867)
Attempt to simplify the Android SDK interface ahead of refactoring it. The locateAndroidSdk static method is called at startup to locate the android SDK, returning null if it cannot be found. These helper methods attempted to first look up the AndroidSDK if it was already null - which could only cover the case where someone installed the Android SDK while flutter was running (possibly through an IDE)
2020-08-19 14:44:56 -07:00
Jonah Williams
9225d8d5b7
[flutter_tools] move to fake_async, skip failing tests (#63536) 2020-08-11 19:36:05 -07:00
Jonah Williams
c86d090e6f
[flutter_tools] add --null-assertions flag for debugging with null safety (#63416) 2020-08-11 11:36:03 -07:00
Yuqian Li
22bf19cece
Add purge-persistent-cache option to run and drive (#62221)
Fixes https://github.com/flutter/flutter/issues/39526

Needs https://github.com/flutter/engine/pull/20013 to land and roll first.
2020-07-29 12:24:39 -07:00
Jonah Williams
59e0a2ec28
[flutter_tools] update device discovery constructors (#61640)
google3 callsites are updated, remove global lookup from constructor parameters.
2020-07-28 10:20:01 -07:00
Jonah Williams
859fce9010
[flutter_tools] add feature for iOS, android, and fuchsia (#61481)
Add feature flags for android, ios, and fuchsia (on by default). After updating the g3 rollers, the fuchsia feature will be turned off by default. Creates a simpler base type of feature flags for g3 to extend.

Updates android, ios, fuchsia workflows to use feature flags check.
Removes concept of stable artifacts and checks on flutter version.

Fixes #58999
#52859
#12768
2020-07-16 09:51:59 -07:00
Jonah Williams
b010f78e3a
[flutter_tools] fix typo in test code (#61548) 2020-07-15 09:21:24 -07:00
Jonah Williams
55e3770f3e
[flutter_tools] remove globals from base/android (#60480)
Remove unnecessary use of globals from base tests, and an android test. This changes the test to avoid bouncing through the global getters, which can lead to incorrectly cached zone values. Switches the memory filesystem implementation to the test implementation
2020-06-29 15:06:58 -07:00
Jenn Magder
6a2bc2617e
Replace ANDROID_HOME user messages with ANDROID_SDK_ROOT (#59867) 2020-06-22 18:43:04 -07:00
Jonah Williams
09f1764d14
[flutter_tools] android test cleanups (#59996)
Fixes several tests that were failing under tester. Minor style cleanups otherwise
2020-06-22 17:04:39 -07:00
Michael Goderbauer
e48b7e99cd
More word substiturions (#59497) 2020-06-19 13:43:02 -07:00
duzenko
c79de78237
LG debugging/logcat fixed (#58670) 2020-06-15 09:35:07 -07:00
Ian Hickson
6202476691
Remove license statements in template files. (#57268) 2020-06-15 09:30:05 -07:00
Jenn Magder
886313393f
Support work profiles and multiple Android users for run, install, attach, drive (#58815) 2020-06-08 11:28:02 -07:00
Jonah Williams
4f88ed1d3c
[flutter_tools] only restrict devices based on arch + buildMode, not emulator status (#58887)
instead of restricting profile/release mode based on whether the tool thinks the device is an emulator, restrict based on the device target architecture and the requested build mode. Notably, this enables release mode on x86_64 Android emulators, but not x86 emulators since we do not support that as an AOT target.

This does not add release mode support for simulators, since this requires us to build and upload artifacts for simulator/x86_64
2020-06-08 11:20:15 -07:00
Jonah Williams
ba847d54f0
[flutter_tools] validate android arch and build number (#57830) 2020-05-27 10:10:51 -07:00
Jonah Williams
f640ad6914
[flutter_tools] ensure emulator command does not crash with missing avdmanager (#57703) 2020-05-27 10:10:30 -07:00
Jonah Williams
359daf4f73
[flutter_tools] reland: remove globals from android device/testing (#57614) 2020-05-20 13:21:22 -07:00
Jonah Williams
5e33ecee46
Revert "[flutter_tools] remove globals/context for android testing (#57445)" (#57611)
This reverts commit 602d8baf34.
2020-05-19 13:06:14 -07:00
Jonah Williams
602d8baf34
[flutter_tools] remove globals/context for android testing (#57445) 2020-05-19 12:37:07 -07:00
Jonah Williams
bd47262183
[flutter_tools] fix period in URL for androidX incompat (#57182) 2020-05-14 12:32:03 -07:00
Jonah Williams
a801496701
[flutter_tools] allow adb to fail to unforward without crashing (#57173) 2020-05-14 12:27:01 -07:00
Jonah Williams
7f400af35a
[flutter_tools] expand Regexp log match to include more AndroidRuntime failures (#56943) 2020-05-12 07:35:02 -07:00
Luke Cheng
793e6a48a1
typo fix on the FLUTTER_STORAGE_BASE_URL usage (#56685) 2020-05-09 21:14:01 -07:00
Jenn Magder
0a4f6cdef0
Add split-debug and obfuscation to build aar (#56342) 2020-05-07 18:14:02 -07:00
xster
f6b47a5f35
let the embedding maven engine dependency reference the storage proxy (#56164) 2020-05-07 11:36:02 -07:00
Zachary Anderson
6f0ed5e142
[flutter_tools] Restore base/platform.dart (#56410) 2020-05-06 08:15:39 -07:00
Jenn Magder
415401102c
Gradle artifacts and tasks tests without context (#56335) 2020-05-04 18:38:14 -07:00
Jenn Magder
06fcf5146b
Inject logger and fs into printHowToConsumeAar, test without context (#56331) 2020-05-04 18:38:00 -07:00
Jenn Magder
c587d73ec6
Use androidSdk globals variable everywhere (#56330) 2020-05-04 17:48:10 -07:00
Jonah Williams
bd6ccb606a
[flutter_tools] android device stopApp handles null apk (#55990)
The resident runner does not check if the ApplicationPackage is null when trying to stop the app. Update AndroidDevice.stopApp to handle this case by returning false.

The package will be null when flutter attach is used.
2020-04-29 16:31:42 -07:00
Jonah Williams
9cb9bfbd7c
[flutter_tools] use new output location for the apk (#54328) 2020-04-13 15:55:02 -07:00
Emmanuel Garcia
54dba4cd59
Don't import plugins that don't support android in settings.gradle (#54407) 2020-04-12 08:55:03 -07:00
Christopher Fujino
03c566768b
[flutter_tools] Remove fromPlatform from tests (#54152) 2020-04-10 16:51:28 -07:00
Jonah Williams
98e43bc6ae
[flutter_tools] ensure the tool can find SDK manager on windows (#54133) 2020-04-06 13:41:14 -07:00
Alexandre Ardhuin
f5a9902577
enable avoid_equals_and_hash_code_on_mutable_classes (#52507) 2020-04-06 13:36:01 -07:00
Jenn Magder
ad07c4041a
Delete unused NDK location checks (#53694) 2020-03-31 14:53:49 -07:00
Mubarak Imam
df90bb5fd6
fix issue with multiple java runtimes on macOS (#52474) 2020-03-31 11:36:01 -07:00
Dmitry Borodin
5a3e7e4366
Updated obsolete URL (#52158) 2020-03-26 14:34:00 -07:00
xster
1376746237
Reland #53153 to attach to existing modules and apps for Android (#53289) 2020-03-25 16:45:49 -07:00
Jenn Magder
b684041bb8
Revert "Let flutter attach find the service port by looking through old logs again (#53153)" (#53282)
This reverts commit 0c5ffdc9ef.
2020-03-25 10:53:45 -07:00
xster
0c5ffdc9ef
Let flutter attach find the service port by looking through old logs again (#53153) 2020-03-24 23:26:01 -07:00
Jonah Williams
62c9c89d6b
[flutter_tools] split start app android tests into new file (#52906) 2020-03-19 16:53:19 -07:00
Jonah Williams
46f0a5f7b5
[flutter_tools] Reland android device cleanup. (#52686) 2020-03-17 17:58:39 -07:00
gaaclarke
6990b8b2d3
Added the "trace-whitelist" flag to run. (#52556) 2020-03-17 16:42:20 -07:00
Jonah Williams
bbc5b9d967
Revert "[flutter_tools]: reland android device cleanup (#52542)" (#52579)
This reverts commit 9186dfc34d.
2020-03-13 16:38:59 -07:00
Jonah Williams
9186dfc34d
[flutter_tools]: reland android device cleanup (#52542) 2020-03-13 09:42:02 -07:00
Jonah Williams
1e8c4572ec
Revert "[flutter_tools] remove globals in AndroidDevices (#52505)" (#52515)
This reverts commit 1bf9d6f4f7.
2020-03-12 18:14:32 -07:00
Jonah Williams
1bf9d6f4f7
[flutter_tools] remove globals in AndroidDevices (#52505) 2020-03-12 15:51:26 -07:00
Dan Field
02769001d3
Android SDK test fixes (#52144) 2020-03-12 10:53:23 -07:00
Jonah Williams
5d289721fc
[flutter_tools] handle null value from sdk version (#52351)
When the AndroidDevice checks for the current API version, it isn't handling a null response. While we can refuse to run on API levels that are unsupported, we should probably assume that a null response = lowest possible API level and allow these to run.
2020-03-10 14:23:18 -07:00
Zachary Anderson
605debfcff
[flutter_tools] Make AndroidConsole check for next line (#52353) 2020-03-10 14:21:01 -07:00
Jonah Williams
377879825e
[flutter_tools] prevent StateError when log reader is disposed (#52173)
Previously the AdbLogReader did async setup in the StreamController.onListen callback, specifically it would query the api version and start the adb process. If the log subscription was cancelled before this setup completed, then the log output could (haven't confirmed) get added to a closed controller, causing the above state error.
2020-03-10 11:34:40 -07:00
Zachary Anderson
6c408a0567
Reland: [flutter_tool] Where possible, catch only subtypes of Exception (#52021)
* Reland: [flutter_tool] Where possible, catch only subtypes of Exception

* Add armv7f to getIOSArchForName
2020-03-06 10:22:12 -08:00
Jenn Magder
b8472f25ab
Update Maven URL to https (#52042) 2020-03-05 16:00:34 -08:00
Jonah Williams
ad16823e4c
[flutter_tools] support new SDK structure for sdkmanager (#51980) 2020-03-05 13:59:20 -08:00
Alexandre Ardhuin
c2ae654ddf
enable avoid_single_cascade_in_expression_statements (#51944) 2020-03-05 08:03:26 +01:00
Jenn Magder
cbbb7ec5a7
Revert "Reland: [flutter_tool] Where possible, catch only subtypes of Exception (#51774)" (#51960)
This reverts commit 57c6721cd5.
2020-03-04 12:40:15 -08:00
Flutter GitHub Bot
57c6721cd5
Reland: [flutter_tool] Where possible, catch only subtypes of Exception (#51774) 2020-03-04 11:41:02 -08:00
zsunkun
fdbd1b14ff
fix pom file not found when run app with local engine (#51468) 2020-03-02 19:09:01 -08:00
Zachary Anderson
b32ee2f15c
Revert "Reland: [flutter_tool] Where possible, catch only subtypes of Exception (#51567)" (#51616)
This reverts commit 9de7787f25.
2020-02-27 22:57:13 -08:00
Zachary Anderson
9de7787f25
Reland: [flutter_tool] Where possible, catch only subtypes of Exception (#51567) 2020-02-27 22:46:23 -08:00
Zachary Anderson
483f49962c
Revert "[flutter_tool] Where possible, catch only subtypes of Exception (#51440)" (#51539)
This reverts commit f1cd47ef5c.
2020-02-26 23:42:19 -08:00
Zachary Anderson
f1cd47ef5c
[flutter_tool] Where possible, catch only subtypes of Exception (#51440) 2020-02-26 21:45:02 -08:00
Alexandre Ardhuin
7d7ac7c32b
start multiline strings with newline (#50825) 2020-02-20 10:16:28 +01:00
Alexandre Ardhuin
f15c887c63
change quote to avoid escapes (#50368) 2020-02-11 20:58:27 +01:00
Alexandre Ardhuin
b953c3e5a8
use raw strings to avoid escaping (#50322) 2020-02-07 16:35:55 +01:00
Zachary Anderson
6bfff984de
[flutter_tools] Handle AndroidStudio validator crash (#50282) 2020-02-06 16:03:02 -08:00
Christopher Fujino
e6e14b0dd2
Have android validator suggest ANDROID_SDK_ROOT instead of deprecated ANDROID_HOME (#49846) 2020-02-06 14:03:03 -08:00
Emmanuel Garcia
eb4b6dc91b
Retry Gradle command when failing to download a resource (#50223) 2020-02-05 17:48:04 -08:00
Dan Field
4b8efad99b
Font subset in the tool (#49737) 2020-02-04 20:34:24 -08:00
Zachary Anderson
ef62d53222
[flutter_tools] Fix crash on null Android apiVersion (#50029) 2020-02-03 14:48:02 -08:00
Zachary Anderson
390ed1cd81
[flutter_tools] Move homeDirPath to FileSystemUtils (#49909) 2020-02-03 14:33:03 -08:00
Terry Lucas
1b4d321b34
Fix Flutter tool to use correct adb parameter and collect Realtime value. (#49701)
* Fix parameter to adb to be _package.id instead of package._launchActivity.
2020-01-29 10:01:17 -08:00
Dan Field
8b2993337a
revert #48985 (#49572) 2020-01-27 14:36:02 -08:00
Jason Simmons
3f97315720 [flutter_tools] Do not use the logcat -T flag on Android versions before Lollipop (#49327) 2020-01-23 20:18:01 -08:00
Emmanuel Garcia
2b8c75d55c
Copy the local engine repo in the output directory (#49276) 2020-01-22 10:57:14 -08:00
Emmanuel Garcia
320c19e4b9 Fix build aar instructions (#49265) 2020-01-21 20:03:02 -08:00
Anthony
b67d5ec6e9 [a11y] Make sure RenderFractionalTranslation updates its semantics after the translation field is set (#48985) 2020-01-17 15:13:01 -08:00
Zachary Anderson
e8222aaf9a [flutter_tool] Don't crash on Android emulator startup failure (#48995) 2020-01-17 09:28:01 -08:00
Jonah Williams
fb5632dc16
[flutter_tools] Only remove ProcessUtils from injection (#48975) 2020-01-16 13:32:15 -08:00
Alexandre Ardhuin
003541499b use isA<Xxx>() matcher (#48482) 2020-01-16 12:43:03 -08:00
Jonah Williams
ad9476dc9e
[flutter_tools] Remove context from Artifacts class (#48776) 2020-01-14 16:47:34 -08:00
Jonah Williams
f7b8d62cbc
[flutter_tool] Refactor Logger and Terminal to (mostly) no longer depend directly on context (#47269) 2020-01-08 12:35:12 -08:00
Alexandre Ardhuin
4f9b6cf017
enable lint prefer_final_in_for_each (#47724) 2020-01-07 16:32:04 +01:00
Jonah Williams
ee7a37f1d3
[flutter_tools] Ensure that global variables are easily identifiable (#47398) 2020-01-06 11:04:20 -08:00
Lau Ching Jun
7850e2525f
Is executable doesn't mean a+x (#47359) 2019-12-18 12:21:46 -08:00
Emmanuel Garcia
9884f9980f Change meaning of a plugin not supporting the android platform (#47015) 2019-12-17 19:48:01 -08:00
Emmanuel Garcia
a467932d5b
Skip plugins that don't have an android impl when building AARs (#46835) 2019-12-12 12:38:09 -08:00
Sean Freiburg
418b814555 Add buildNumber param to "flutter build aar" command (#46291) 2019-12-12 10:28:01 -08:00
Emmanuel Garcia
354f80b84a
Check and give execute permission to Gradle if needed (#46748) 2019-12-11 16:36:03 -08:00
Zachary Anderson
99684ce159 [flutter_tool] Make Device.dispose() abstract (#46006) 2019-12-05 08:48:00 -08:00
Emmanuel Garcia
8c25328014
Handle case where lastLogcatTimestamp is null (#45937) 2019-12-02 15:02:11 -08:00
Emmanuel Garcia
475ee89879
Make Android log reader read any recent logs (#45743) 2019-11-27 17:52:36 -08:00
Ian Hickson
449f4a6673
License update (#45373)
* Update project.pbxproj files to say Flutter rather than Chromium

Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.

* Update the copyright notice checker to require a standard notice on all files

* Update copyrights on Dart files. (This was a mechanical commit.)

* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.

Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).

* Clean up the copyrights in non-Dart files. (Manual edits.)

Also, make sure templates don't have copyrights.

* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -08:00
Jonah Williams
831163f0d0
Register memory info command on vmservice for Android devices (#45568) 2019-11-26 14:49:56 -08:00
Jonah Williams
1888fa3526
Allow flutter run to run release/profile x64 (#45511) 2019-11-25 12:04:17 -08:00
Alexandre Ardhuin
980f14e0c5
implicit-casts:false on flutter_tools (#45153)
* implicit-casts:false on flutter_tools

* use castStringKeyedMap

* address review comments

* address review comments

* fix issues after rebase
2019-11-24 06:54:43 +01:00
Jonah Williams
c724504142
Update Android CPU device detection (#45139) 2019-11-19 19:04:17 -08:00
Emmanuel Garcia
0019599411
Build AAR for all build variants by default (#44797) 2019-11-13 13:27:10 -08:00
Emmanuel Garcia
f766871eb9
Forward ProcessException to error handlers (#44783) 2019-11-13 10:02:46 -08:00
Emmanuel Garcia
b0ad6072ef
Don't print how to consume AARs when building plugins as AARs (#44301) 2019-11-07 10:18:55 -08:00
Emmanuel Garcia
bb8cf609ec
Build local maven repo when using local engine (#44243) 2019-11-06 12:52:37 -08:00
Emmanuel Garcia
76957c9da8
build aar prints how to consume the artifacts (#44127) 2019-11-04 16:28:27 -08:00
Emmanuel Garcia
dea35da040
Log additional Android build failures (#43941) 2019-11-01 10:06:23 -07:00
Emmanuel Garcia
175b37247d
Refactor gradle.dart (#43479) 2019-10-31 13:19:15 -07:00
Efthymis Sarmpanis
c5b3b3ac26 Flutter doctor should require java 1.8+ (#41989) 2019-10-30 10:40:27 -07:00
Jonah Williams
4c677e4148
Extra defensive programming for pub modification time assert (#43315) 2019-10-22 22:05:00 -07:00
Jonah Williams
46ea99122b
Revert "Extra defensive programming for pub modification time assert (#42491)" (#43235)
This reverts commit 3597bae6a0.
2019-10-21 20:54:02 -07:00
Ian Hickson
3597bae6a0 Extra defensive programming for pub modification time assert (#42491) 2019-10-21 20:15:20 -07:00
Emmanuel Garcia
e82ddc4c7a
Ensure android.enableR8 is appended to a new line (#43187) 2019-10-21 16:52:30 -07:00
Jonah Williams
31a4ff80c7
add samsungexynos7570 to list of known physical devices (#43042) 2019-10-21 16:45:48 -07:00
Jonah Williams
39e4d9d152
Expand scope of rethrown gradle errors (#42966) 2019-10-18 14:56:39 -07:00
liyuqian
31cb44825c
Add --cache-sksl flag to drive and run (#42353)
So we can test SkSL precompile using the command line tools.
See https://github.com/flutter/engine/pull/12412.
2019-10-15 14:28:55 -07:00
Ian Hickson
08643c41d7
Always fake ProcessManager when you fake Filesystem in tests (#42369)
...because otherwise, processes that think they're manipulating your
filesystem will be doing crazy things the test is ignoring, leading to
(at best) failures and (at worst) flakes or disk corruption.
2019-10-11 11:23:12 -07:00
Jonah Williams
03a45dc383
Add support for Android x86_64 ABI to Flutter (#42401) 2019-10-10 16:34:16 -07:00
Ian Hickson
cdc2d9901d
More consistent temp directory naming (#42063)
Applying our style guide:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#have-good-hygiene-when-using-temporary-directories
2019-10-07 16:43:04 -07:00
Alexandre Ardhuin
f0553ba58e
Missing trailing commas (#41473)
* add missing trailing commas

* add more missing trailing commas

* add more and more missing trailing commas
2019-09-30 18:48:23 +02:00
Alexandre Ardhuin
f11c34109c
fix bad indentations(mainly around collection literals) (#41355) 2019-09-27 10:46:45 +02:00
Emmanuel Garcia
16d408a7a0
Reland #40810: Re-enable AAR plugins when an AndroidX failure occurred (#41160) 2019-09-24 16:16:22 -07:00
Alexandre Ardhuin
b873162194
fix some bad indentations (#41172) 2019-09-24 21:03:37 +02:00
Alexandre Ardhuin
89427d672d
add missing trailing commas in flutter_tools (#40968) 2019-09-24 08:06:09 +02:00
Emmanuel Garcia
2c8813c86c
Revert "Re-enable AAR plugins when an AndroidX failure occurred (#40810)" (#41042)
This reverts commit 96482eeb5c.
2019-09-23 09:28:38 -07:00
Emmanuel Garcia
96482eeb5c
Re-enable AAR plugins when an AndroidX failure occurred (#40810) 2019-09-20 08:28:52 -07:00
Emmanuel Garcia
4d404da6df
Update Kotlin and Gradle version (#40181) 2019-09-13 19:37:07 -07:00
Emmanuel Garcia
2c857b9370
Enable R8 (#40453) 2019-09-13 19:06:40 -07:00
Christopher Fujino
c5e2bf5cfe
catch errors during gradle update (#37526) 2019-09-11 09:21:42 -07:00
Emmanuel Garcia
4a1c62c28b
Add missing files in the Gradle wrapper directory (#39145) 2019-08-28 14:52:08 -07:00
xster
4640690d0f
let flutter build aar use a local engine (#39312) 2019-08-27 23:46:33 -07:00
Emmanuel Garcia
5353d5e877
Fid app bundle in Gradle 3.5 (#39126) 2019-08-27 17:08:02 -07:00
Todd Volkert
c22ce95e15
Change from using defaults to plutil for Plist parsing (#38662)
We were using the `defaults` command-line utility to parse
Plist files, but it was never supported by Apple, and it
appears that in an upcoming OS release, it will be less likely
to work:

> WARNING: The defaults command will be changed in an upcoming
> major release to only operate on preferences domains. General
> plist manipulation utilities will be folded into a different
> command-line program.

Fixes https://github.com/flutter/flutter/issues/37701
2019-08-16 17:10:07 -07:00
Emmanuel Garcia
40c5cc9708
Find the app bundle when the flavor contains underscores (#37457) 2019-08-02 16:02:46 -07:00
Zachary Anderson
a9aea962ab
[flutter_tool] Catch ProcessException from 'adb devices' (#37196) 2019-07-30 12:17:10 -07:00
Zachary Anderson
a5d23d2a25
[flutter_tool] More gracefully handle Android sdkmanager failure (#37194) 2019-07-30 08:19:58 -07:00
Emmanuel Garcia
242a4225a1
Flutter build aar (#36732)
`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-23 09:27:42 -07:00
Emmanuel Garcia
c9b466f9e2
Revert "Add flutter build aar (#35217)" (#36731)
This reverts commit 11460b8378.
2019-07-22 22:07:59 -07:00
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
Emmanuel Garcia
5a34e7981e
Catch exceptions thrown by runChecked* when possible (#36109) 2019-07-18 10:45:37 -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