Commit graph

214 commits

Author SHA1 Message Date
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