Skip to content

Update gradle example to support x86 in debug mode. - #7606

Merged
jakobr-google merged 2 commits into
flutter:masterfrom
jakobr-google:gradle
Jan 31, 2017
Merged

jakobr-google merged 2 commits into
flutter:masterfrom
jakobr-google:gradle

Conversation

@jakobr-google

Copy link
Copy Markdown
Contributor

Changed the Flutter Gradle plugin a bit to better fit in with the Android build.

x86 shared libraries are added to debug builds, so they can now run on the emulator. Profile and release builds still only support ARM.

Invoking 'gradlew build' directly will now build all variants, like a normal Android build.

Fixes #6136
Fixes #6864
Fixes #7539

Changed the Flutter Gradle plugin a bit to better fit in with the
Android build.

Fixes flutter#6136
Fixes flutter#6864
Fixes flutter#7539
@jason-simmons

Copy link
Copy Markdown
Member

LGTM


gradlew = locateProjectGradlew();
if (gradlew == null)
if (gradlew == null) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: no braces here

status.stop();

if (exitcode != 0)
if (exitcode != 0) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: no braces

);
status.stop();

if (exitcode != 0) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: no braces

}) async {
if (platform != TargetPlatform.android_arm && buildMode != BuildMode.debug) {
throwToolExit(
'Profile and release builds are only supported on ARM targets.');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: if you put a newline after the (, put a newline before the ).

compileSdkVersion 22
buildToolsVersion '22.0.1'
compileSdkVersion 25
buildToolsVersion '24.0.2'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a recent default installation of Android Studio, I see buildToolsVersion "25.0.2". Any reason to stick with 24 here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flutter build currently updates this to match the version of the SDK you're building with.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, great!

@jakobr-google
jakobr-google merged commit a0f0c42 into flutter:master Jan 31, 2017
@jakobr-google
jakobr-google deleted the gradle branch January 31, 2017 22:48
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

5 participants