Project template Gradle update: Gradle 4.1 + Android Studio plugin 3.0.1

371 views
Skip to first unread message

mr...@google.com

unread,
Dec 12, 2017, 4:43:57 AM12/12/17
to Flutter Dev
I intend to land #13492 which aligns the Gradle build scripts of Flutter project templates to those produced by Android Studio 3.0.1.
 
Before this change, newly created Flutter projects use Gradle 3.3 and version 2.3.3 of the Android Studio Gradle plugin ("old mode")
After this change, newly created Flutter projects will use Gradle 4.1 and version 3.0.1 of the Android Studio Gradle plugin ("new mode")

Flutter tooling is modified as part #13492 to support both modes.

Known consequences:
  • Consuming old mode plugins from a new mode Flutter project will result in build warnings, as some parts of the Android Studio Gradle API used by those plugins have been deprecated.
  • Consuming a new mode plugin requires a new mode Flutter project.
  • Therefore, upgrading an old mode plugin to the new mode is a breaking change, and should be accompanied by a suitable version bump (of the major version, unless the plugin is still in version 0.x.y).
More information about migrating your Gradle build scripts can be found here.

Please let me know asap if you have concerns about this change.

mr...@google.com

unread,
Dec 19, 2017, 7:47:59 AM12/19/17
to Flutter Dev
#13492 has landed on the master branch.
Gradle upgrades to project samples in the flutter/flutter repo are pending (awaiting upgrades to build bots).
Gradle upgrades to flutter/plugins have begun:

#315 (Travis script upgrade and battery plugin upgrade to validate it, merged & published)
#317 (Upgrades to Firebase-related plugins, pending)

More to come. I will publish new plugin versions as I land these PRs.

mr...@google.com

unread,
Jan 3, 2018, 7:22:25 AM1/3/18
to Flutter Dev
A Gradle 4.1-based version of each plugin in the flutter/plugins repo has now been published.
To use any of the upgraded plugins with a Flutter project created by current alpha or earlier, you should follow these instructions to upgrade your Flutter project to also use Gradle 4.1.
Reply all
Reply to author
Forward
0 new messages