Commit graph

40 commits

Author SHA1 Message Date
Mikkel Nygaard Ravn b280074815
Move async from member access to construction (#20035) 2018-08-02 14:12:25 +02:00
Alexandre Ardhuin eda03e2586
re-re-enable lint unnecessary_const (#20103) 2018-08-02 12:02:32 +02:00
Todd Volkert 00aac68e2d
Revert flutter/flutter#19592 (#19861)
It was causing problems rolling Flutter into Fuchsia
2018-07-27 08:44:39 -07:00
Alexandre Ardhuin 27018359d2
re-enable lint unnecessary_const (#19592)
* re-enable lint unnecessary_const

* remove trailling whitespaces

* remove unnecessary const (after merge)
2018-07-23 08:31:48 +02:00
Sigurd Meldgaard 2d3a5c744d
Revert "Revert "Use FlutterProject to locate files (#18913)" (#19409)" (#19456)
With a fix of a path being printed relative instead of absolute.
2018-07-20 08:00:30 +02:00
Ian Hickson f630f90d6d
Revert "enable lint unnecessary_const (#19342)" (#19423)
This reverts commit cc1cf13eec.
2018-07-16 13:30:27 -07:00
Alexandre Ardhuin cc1cf13eec
enable lint unnecessary_const (#19342) 2018-07-16 21:43:48 +02:00
Sigurd Meldgaard 6a8f904104
Revert "Use FlutterProject to locate files (#18913)" (#19409)
This reverts commit 57d78cc739.
2018-07-16 16:21:20 +02:00
Sigurd Meldgaard 57d78cc739
Use FlutterProject to locate files (#18913) 2018-07-16 09:39:37 +02:00
Ralph Bergmann 779eea681f make tests in xcodeproj_test.dart and gradle_test.dart hermetic (#18093) (#18548) 2018-07-09 10:36:17 -07:00
Sam Rawlins 9f8a70be4c Bump mockito to 3.0.0-beta (#18462)
* Bump mockito to 3.0.0-beta

* Few fixes

* fix test

* Bump image

* Fix

* New packages update

* With matcher pinned

* No more typed
2018-06-21 16:23:47 -07:00
Keerti Parthasarathy da7670c2ee
Fixes for test failures in Dart 2 mode (#18122) 2018-06-05 12:38:30 -07:00
Ian Hickson e3427550e9
Be less verbose in the logs. (#17401)
Now that we have thousands of tests, it doesn't make sense to display a separate line for each test. The result is just megabytes of logs that you have to scrub through to find error messages.
2018-06-04 15:22:19 -07:00
Sam Rawlins fba81d0f1d Use anyNamed when mocking named arguments (#17996) 2018-05-31 08:24:26 -07:00
Ralph Bergmann c65e9d19a4 add version to pubspec.yaml (#16857)
Uses the `version` property from the `pubspec.yaml` file to set the corresponding fields in the `local.properties` file respectively in the `Generated.xcconfig` file.

The `--build-name` and `--build-number` options have changed. Now they trump the `version` property from the `pubspec.yaml` file.

If the `version` property is not set and the  `--build-name` and `--build-number` options are not provided, the build command will not change the `local.properties` / `Generated.xcconfig` file.
2018-05-30 07:51:25 -07:00
liyuqian ae8586cfa1
Show help info instead of crashing if Android SDK is not found (#17610)
Fixes #16832
2018-05-15 14:42:12 -07:00
Vyacheslav Egorov 4931b46772
Make --build-shared-library more robust. (#17420)
* Search for a suitable ARM sysroot instead of hardcoding it;
* Add facility to explain why NDK was not found;
2018-05-14 16:36:54 +02:00
Danny Tuppeny 799678f0a7 Add some tests around device+ini parsing 2018-05-09 16:03:59 +01:00
Todd Volkert d9a3ced9db
Check whether we can run sdkmanager in AndroidWorkflow.licensesAccepted (#16343)
Fixes https://github.com/flutter/flutter/issues/16332
2018-04-09 08:57:11 -07:00
Alexandre Ardhuin 217b2bdaa1
add new lints of linter-0.1.44 and enable unnecessary_parenthesis (#15585) 2018-03-21 07:10:14 +01:00
Jonah Williams 4ace88bfc0
fix spacing issue and add test for supportsHardwareRendering (#15305)
* fix spacing issue and add test for supportsHardwareRendering

* remove extra async tag

* move spacing to prev line
2018-03-09 09:30:13 -08:00
jcollins-g 050ee9d180
Improve robustness of --version parsing for sdkmanager (#15029) 2018-03-01 14:25:03 -08:00
jcollins-g 614df6949c
Android license detector in doctor, take two (#14783)
* Revert "Revert "Add android license verification to doctor and some refactoring" (#14727)"

This reverts commit d260294752.

* Add tests, fix sdkManagerEnv and use it consistently, and rearrange Status object model

* AnsiSpinner needs to leave the cursor where it found it.

* fix tests

* Const constructor warning only shows up on windows...?

* Avoid crash if we can't find the home directory

* Make pathVarSeparator return a string in the mock

* Implement review comments

* Fix out-of-order problem on stop
2018-02-28 12:09:52 -08:00
Todd Volkert d260294752
Revert "Add android license verification to doctor and some refactoring" (#14727)
Reports from that commit included:

* Doctor hanging
* Doctor prompting to install JDK
* AnsiStatus.cancel() printing elapsed time and extra newline
* Printing extra spinner character at the end of each line
2018-02-15 09:13:56 -08:00
jcollins-g 59fe5d0f46
Add android license verification to doctor and some refactoring (#14535)
* Initial version, seems to work

* Unit test for android license checker

* Cleanups

* Windows analyzer wants const.

* Refinements to timeout

* review comments

* Forgot a nit
2018-02-14 15:25:12 -08:00
jcollins-g 7982694a0c
Hide the NDK warning that should never happen with a regexp (#14503) 2018-02-08 12:16:04 -08:00
Alexandre Ardhuin 841d5d7bd5
prefer_const_declarations on local variables (#14358) 2018-02-01 07:51:26 +01:00
Chris Bracken d3705f3ea9
Add android workflow test (#14260)
Adds unit tests for AndroidWorkflow.runLicenseManager().
2018-01-24 22:27:24 -08:00
Chris Bracken 74478d186c
Extract MockAndroidSdk and static utility method (#14258)
AndroidSdk and AndroidStudio depends relatively heavily on filesystem
access to locate installed tools. Testing code that relies on either of
these classes benefits from a utility method to generate a
legitimate-looking Android SDK directory layout for testing.
2018-01-24 20:40:25 -08:00
Chris Bracken 9654659c72
Add AndroidSdk.sdkManagerPath, sdkManagerVersion (#14247)
Convenience getters for the the path to the Android SDK manager and the
currently installed version of the tool.

Pre-factoring to support better checks around the --android-licenses
command, which uses a feature of the SDK manager that is unsupported in
older versions of the tool.
2018-01-24 12:38:08 -08:00
Devon Carew 0350c9ecff
route device issue diagnostics to flutter doctor (#13346)
* route device issue diagnostics to flutter doctor

* review comments

* review comments
2017-12-07 09:32:23 -08:00
Martin Kustermann 545ec9efb7
Add support for NDK discovery and add --prefer-shared-library option (#12788)
* Add support for NDK discovery and add --prefer-shared-library option

We would like to be able to use native tools (e.g. simpleperf, gdb) with
precompiled flutter apps.  The native tools work much better with *.so
files instead of the custom formats the Dart VM uses by default.

The reason for using blobs / instruction snapshots is that we do not
want to force flutter users to install the Android NDK.

This CL adds a `--prefer-shared-library` flag to e.g. `flutter build
apk` which will use the NDK compiler (if available) to turn the
precompiled app assembly file to an `*.so` file.  If the NDK compiler is
not available it will default to the default behavior.

* Rebase, add test for NDK detection, augment flutter.gradle with @Input for flag

* Use InMemoryFileSystem for test

* Remove unused import

* Address some analyzer warnings
2017-11-21 15:44:03 +01:00
Todd Volkert f0e8819886
Extract Android SDK version from named platform dirs. (#13056)
Previously, we were mapping certain named platforms
(e.g. `android-stable`) to their corresponding version.
this had two problems:

1. The version could become out of date. For instance, we had
   mapped `android-stable` to version 24, but the stable version
   is now 27.
2. The list of possible named versions wasn't comprehensive.
   Some Android SDKs just list the platform as `stable`, or
   `experimental`, etc.

This change updates the platform version detection to use
the `build.prop` file that exists in the platform directory
(only for cases where the version number is not encoded into
the directory name).
2017-11-16 17:38:53 -08:00
Devon Carew b6bd628bcd
address unused element issues and new warnings (#12890)
* address unused element issues and new warnings

* add a missing return
2017-11-08 14:06:55 -08:00
Mikkel Nygaard Ravn 9496e6dfa7 Support for app flavors in flutter tooling, #11676 retake (#11734) 2017-08-23 10:55:35 +02:00
Mikkel Nygaard Ravn 7c3a45dc6e Revert "Support for app flavors in flutter tooling (#11676)" (#11729)
This reverts commit 8d07d3f652.
2017-08-22 12:24:29 +02:00
Mikkel Nygaard Ravn 8d07d3f652 Support for app flavors in flutter tooling (#11676) 2017-08-22 10:38:23 +02:00
Jason Simmons cfa0a2dbbd Look for APKs at the path used by Android Gradle plugin 3.0 (#10798)
Fixes https://github.com/flutter/flutter/issues/10630
2017-06-19 09:37:39 -07:00
Todd Volkert aa9c782693 Add initial list of known Android hardware (#10249)
Our emulator detection was based on a simple heuristic that was
failing for the Samsung Galaxy S8. Any heuristic is flawed since
Android devices can report whatever they want to adb, but this
change attempts to tighten the detection by listing known models
(by their ro.hardware property). Again, these values could be
spoofed by emulator system images, but it's less likely to be
an issue than with our previous (and fall-back) heuristic.

Fixes #10203
Related: #10248
2017-05-22 10:47:02 -07:00
Ian Hickson 7c9c5a296c Rearrange tests to more closely match code structure (#10043) 2017-05-12 10:44:52 -07:00