Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* adding support for android app bundle. * removing the debug statement. * fixing formatting and code review changes. * Revert "fixing formatting and code review changes." This reverts commit 2041d45. * Fixing code formatting issues. * updating review comments fixing comments and spacing. * changing and to & to rerun the CI and tests. * updating the comment to re-run the test updating the comment to re-run the test * fixing the formatting. * updating comments to re-trigger build updating comments to re-trigger build
- Loading branch information
1 parent
8426910
commit 368cd7d
Showing
7 changed files
with
283 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,5 +44,6 @@ Future<void> buildApk({ | |
project: project, | ||
buildInfo: buildInfo, | ||
target: target, | ||
isBuildingBundle: false | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Copyright 2015 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import 'dart:async'; | ||
|
||
import 'package:meta/meta.dart'; | ||
|
||
import '../base/common.dart'; | ||
import '../build_info.dart'; | ||
import '../globals.dart'; | ||
import '../project.dart'; | ||
|
||
import 'android_sdk.dart'; | ||
import 'gradle.dart'; | ||
|
||
Future<void> buildAppBundle({ | ||
@required FlutterProject project, | ||
@required String target, | ||
BuildInfo buildInfo = BuildInfo.debug | ||
}) async { | ||
if (!project.android.isUsingGradle) { | ||
throwToolExit( | ||
'The build process for Android has changed, and the current project configuration\n' | ||
'is no longer valid. Please consult\n\n' | ||
'https://github.com/flutter/flutter/wiki/Upgrading-Flutter-projects-to-build-with-gradle\n\n' | ||
'for details on how to upgrade the project.' | ||
); | ||
} | ||
|
||
// Validate that we can find an android sdk. | ||
if (androidSdk == null) | ||
throwToolExit('No Android SDK found. Try setting the ANDROID_HOME environment variable.'); | ||
|
||
final List<String> validationResult = androidSdk.validateSdkWellFormed(); | ||
if (validationResult.isNotEmpty) { | ||
for (String message in validationResult) { | ||
printError(message, wrap: false); | ||
} | ||
throwToolExit('Try re-installing or updating your Android SDK.'); | ||
} | ||
|
||
return buildGradleProject( | ||
project: project, | ||
buildInfo: buildInfo, | ||
target: target, | ||
isBuildingBundle: true | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.