Commit graph

43 commits

Author SHA1 Message Date
Martin Kustermann b2c65e7653
Update path to app.so when using aot compilation to shared library on android (#14302)
This was overlooked in 5e18c07614
2018-01-27 14:21:58 +01:00
Alexander Aprelev 09a6df7461
Clean up output directory before copying over new files (#14085)
* Clean up output directory before copying over new files

* Use standard clean task command
2018-01-14 18:24:07 -08:00
Jason Simmons 4954bbfaf9
Read properties files as UTF-8 in Gradle scripts (#13981)
Fixes https://github.com/flutter/flutter/issues/13972
2018-01-08 13:48:08 -08:00
Siva 426d6b0672
support for --strong option (#13859)
* Plumb a --strong option through to the front end server and the engine
so that we can run flutter apps in preview-dart-2 and strong mode

* - Address analyzer lint issues
*- correctly set up strong mode option in the case of AOT builds
2018-01-04 10:39:02 -08:00
Sarah Zakarias 2ef379ad12
Remove app.flx from apk (#13647) 2017-12-18 14:33:35 +01:00
Sarah Zakarias 5e18c07614
Reapply flutter_assets (#13567)
* Revert "Revert engine (#13547)"

This reverts commit ee65db11d4.

* Keep flaky mark
2017-12-14 17:27:25 +01:00
Mikkel Nygaard Ravn 5ae507a752
Revert "Refresh template instances (#13563)" (#13565)
This reverts commit 05d6b08ffe.
2017-12-14 15:38:39 +01:00
Mikkel Nygaard Ravn 05d6b08ffe
Refresh template instances (#13563) 2017-12-14 15:19:59 +01:00
Mikkel Nygaard Ravn a2296aa8e3
Simplify project template (#13558) 2017-12-14 11:38:20 +01:00
Yegor ee65db11d4
Revert engine (#13547)
* Revert "Include a directory with Flutter assets (#12944)"

This reverts commit 3af6b9cbf5.

* Revert "Upgrade project.pbxproj to include flutter_assets (#13011)"

This reverts commit 08128cb29b.

* Revert "Upgrade complex_layout project.pbxproj to include flutter_assets (#13544)"

This reverts commit 35f1a04195.

* mark complex_layout_ios__start_up as flaky
2017-12-13 16:25:25 -08:00
Sarah Zakarias 3af6b9cbf5
Include a directory with Flutter assets (#12944) 2017-12-13 22:30:32 +01:00
Mikkel Nygaard Ravn e5aac6928b
Support Android Gradle plugin v3.0.1 (#13492) 2017-12-13 12:16:22 +01: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
Sarah Zakarias f6135107bc Copy snapshot file into assets (#12523) 2017-10-18 14:52:36 +02:00
Alexander Markov 7153dea296 Add hidden options --extra-front-end-options and --extra-gen-snapshot-options to flutter tool (#12219)
This CL introduces 2 hidden options to 'flutter build aot' and 'flutter run' for passing arbitrary arguments to front-end server and to gen_snapshot tool when building and running flutter app in --profile or --release modes.

The ability to pass arbitrary options simplifies various experiments, as it removes the need to change defaults and rebuild flutter engine for every tested configuration.
2017-10-03 12:55:53 -07:00
Mikkel Nygaard Ravn a1f03977ca Engine artifacts used for snapshots also specified as build inputs (#12014) 2017-09-12 08:35:02 +02:00
Alexander Aprelev c5750cd7ea Introduce --preview-dart-2 option to run new frontend compiler in flutter tools. (#11741)
This adds --preview-dart-2 flag that enables use of Dart 2.0 Frontend in Flutter tools.
2017-08-31 13:35:55 -07:00
Mikkel Nygaard Ravn 79747f4947 Improve Gradle error output in Flutter commands (#11703) 2017-08-24 10:44:32 +02:00
Mikkel Nygaard Ravn 75ef9d02e8 Avoid building x86 jar for profile and release modes (#11486) 2017-08-04 14:57:54 +02:00
Mikkel Nygaard Ravn 87eec719e2 Support for custom build types on Android (#11354) 2017-07-31 13:57:24 +02:00
Seth Ladd 2d79ce8419 don't send analytics when run from another runner (#10789) 2017-06-16 14:33:59 -07:00
Rafal Wachol ee34516491 Moved FLUTTER_HOME to FLUTTER_ROOT in gradle plugin (#10100) 2017-05-22 07:50:31 -07:00
Jakob Andersen 6b54137a15 Improve Android builds. (#9801)
Eagerly generate local.properties, and always update the flutter.sdk
setting in it, in case FLUTTER_ROOT has changed.

Fixes #8365.
Fixes #9716 - at least the specific issue reported. My Android Studio
still complains about Gradle versions - it ships with v3.2, but requires
v3.3...

Add a 'generate dependencies' task to the Gradle build, which checks if
the snapshot dependencies file exists, and runs an extra build before
the actual FlutterTask if it doesn't. This makes the first build slower,
but sub-sequent builds (without source changes) much faster.

Fixes #9717.
2017-05-05 14:53:51 +02:00
Collin Jackson 60e05e9a0e Remove Android support library in Flutter builds. Fixes #9120, #9102, #9121. (#9123)
This reverts commit 8f9d4a2260.
2017-03-31 09:35:25 -07:00
Jason Simmons 72effdd27c Roll the engine and update for new binary names (#9089) 2017-03-29 15:31:36 -07:00
Collin Jackson 8f9d4a2260 Re-land #9036 (#9068)
This reverts commit e2b49d64d6.
2017-03-28 17:05:04 -07:00
Collin Jackson e2b49d64d6 Revert "Revert "Revert "Include fragment support in Android build to allow use of FragmentActivity in FlutterActivity (#9036)"" (#9046)" (#9047)
Test is still failing with increased timeout.

This reverts commit 864b3c37c6.
2017-03-27 19:16:58 -07:00
Collin Jackson 864b3c37c6 Revert "Revert "Include fragment support in Android build to allow use of FragmentActivity in FlutterActivity (#9036)"" (#9046)
Increased the time limit slightly to allow the microbenchmark test time to finish.
2017-03-27 18:12:14 -07:00
Collin Jackson c346d51dcb Revert "Include fragment support in Android build to allow use of FragmentActivity in FlutterActivity (#9036)" (#9041)
This reverts commit 6bf0ceb02b.
2017-03-27 17:30:39 -07:00
Collin Jackson 6bf0ceb02b Include fragment support in Android build to allow use of FragmentActivity in FlutterActivity (#9036) 2017-03-27 16:08:36 -07:00
xster 3bc3d4a50b Remove various roboto font logic (#8350) 2017-03-23 11:28:03 -07:00
Jakob Andersen b61e169011 Automatically wire dependencies for native plugins (#8891)
Go through all packages brought in by pub, and write the name and path of every one that is a flutter plugin into .flutter-plugins.

In android/settings.gradle and ios/Podfile, read in .flutter-plugins, if that file exists. The Android / iOS code from the plugins is automatically added as dependencies of the native code of the app.
2017-03-23 14:59:12 +01:00
Michael Thomsen 15e51a9e3e Revert "Update gradle wrapper and build-tools version for flutter create." (#8940)
* Revert "use color.shadeXxx instead of color[Xxx] (#8932)"

This reverts commit 578ca0a295.

* Revert "add missing const keyword (#8931)"

This reverts commit fac2fac1d6.

* Revert "Make min/max fling velocity and min fling distance ScrollPhysics properties (#8928)"

This reverts commit dac80aac89.

* Revert "Defer to operating system for whichAll (#8921)"

This reverts commit 14933de986.

* Revert "Update gradle wrapper and build-tools version for flutter create. (#8914)"

This reverts commit deb71cc6dc.
2017-03-21 17:42:40 -07:00
asaarnak deb71cc6dc Update gradle wrapper and build-tools version for flutter create. (#8914)
* Update gradle wrapper and build-tools version.

Tested manually by "flutter create" with Idea "flutter run" and from android studio "run" android app.

* Update com.android.tools.build to 2.3.0
2017-03-21 16:47:32 +01:00
Jakob Andersen 7b2367ed5f Remove legacy .apk build. (#8793)
* Remove legacy .apk build.

Print out an error message telling the user to upgrade the project if
it's not Gradle-based. Removed all the obvious traces of the legacy
build.

Added support for Dart VM kernel snapshots in Gradle builds.

Fixed Android installs to verify that the app is actually installed, and
not just rely on the presence of the .sha1 file.
2017-03-20 11:05:55 +01:00
Jakob Andersen 1457f3dbb0 Put Gradle output in build/ (#8759)
Changed the default build output directory in the new project template
to build/, instead of android/build/ and android/app/build/.

Updated tools to ask the Gradle scripts what the build directory is,
since this is configurable in the build scripts, and we need to know
where the build output actually is.

Silenced output from 'flutter build aot' when invoked from Gradle, since
the output was confusing in this case.

Fixes #8723
Fixes #8656
Fixes #8138
2017-03-15 10:53:22 +01:00
Jakob Andersen 9c6ffc8281 Use snapshot's .d file as source inputs in Gradle build. (#8756)
* Use snapshot's .d file as source inputs in Gradle build.

If we don't yet have a .d file (first build), fall back to using the
.dart files in the current directory. This enables us to detect changes
in dependent source files (Flutter framework, packages outside the
source directory, etc.), and re-generate the snapshots as needed.

Unfortunately, Gradle requires knowing the source files before executing
the task, and can't update them after building, so Gradle considers the
second build to be out-of-date (because it has more input files than the
first build). Sub-sequent builds have the correct dependency
information, and will be skipped if the source files haven't changed.

Also added a dependency on gen_snapshot. The snapshot ABI isn't stable,
so we need to re-generate the snapshots when we roll the Dart SDK
dependency.

Fixes #8315
Fixes #8687
Fixes #8607
2017-03-14 12:49:30 +01:00
Jakob Andersen 2a05cfdf07 Remove superfluous (and wrong) target file check (#8367) 2017-02-23 16:27:30 +01:00
Jakob Andersen 6d66be17b9 Add support for target file in Gradle builds. (#8364)
If a target file is specified on the flutter tools command line, pass it
through to Gradle.

It is still possible to statically specify a target file in the flutter
section of build.gradle, but it is now possible to specify it on the
command line as well. The command line option takes precedence.

Fixes #8175.
2017-02-23 15:09:05 +01:00
Jakob Andersen 13d7770cf9 Fix local engine support for Gradle builds. (#8362)
Fixes #6761.
2017-02-23 14:56:19 +01:00
Michael Goderbauer e9af570f1f Enable Gradle Workflow on Windows (#8201)
* Enable Gradle Workflow on Windows

With this the app created by `flutter create` now compiles on Windows.

* Move OS check to gradle file
2017-02-16 14:17:09 -08:00
Jakob Andersen 77e53016f2 Don't include Roboto fonts in Gradle builds. (#8169)
The "old" APK build did not include Roboto fonts, but the new
Gradle-based build did. This is due to `flutter build flx` defaulting to
include the fonts, where the old `flutter build apk` defaulted to NOT
include them.

So let's change the Gradle build to also not include Roboto fonts.

Fixes #8149
2017-02-15 09:27:05 +00:00
Jakob Andersen b246c5e7e9 Make new project template gradle-based for Android. (#7902)
* Make new project template gradle-based for Android.

With this change, the 'new project' template uses the same gradle-based build for Android as the hello_services example. This has some implications on build performance, since we're now building a complete Android app instead of just combining a pre-compiled .dex with the Flutter assets.

The very first build is a little over 2x slower, since it needs to download gradle and build the build scripts before getting to the actual code. Subsequent builds with changes to the code are comparable to the old builds. Null builds are faster. Enabling the gradle daemon speeds up subsequent builds by around 5s.

* Move Flutter Gradle plugin to Flutter root.
2017-02-10 09:37:38 +01:00