Commit 8ee6525c authored by Jason Simmons's avatar Jason Simmons Committed by GitHub

Remove the obsolete build apk --target-arch flag (#9239)

Gradle APK builds include engine binaries for all applicable architectures
parent 67b3871e
...@@ -312,7 +312,7 @@ class AndroidDevice extends Device { ...@@ -312,7 +312,7 @@ class AndroidDevice extends Device {
if (!prebuiltApplication) { if (!prebuiltApplication) {
printTrace('Building APK'); printTrace('Building APK');
await buildApk(targetPlatform, await buildApk(
target: mainPath, target: mainPath,
buildMode: debuggingOptions.buildMode, buildMode: debuggingOptions.buildMode,
kernelPath: kernelPath, kernelPath: kernelPath,
......
...@@ -31,11 +31,6 @@ class BuildApkCommand extends BuildSubCommand { ...@@ -31,11 +31,6 @@ class BuildApkCommand extends BuildSubCommand {
usesTargetOption(); usesTargetOption();
addBuildModeFlags(); addBuildModeFlags();
usesPubOption(); usesPubOption();
argParser.addOption('target-arch',
defaultsTo: 'arm',
allowed: <String>['arm', 'x86', 'x64'],
help: 'Architecture of the target device.');
} }
@override @override
...@@ -47,31 +42,16 @@ class BuildApkCommand extends BuildSubCommand { ...@@ -47,31 +42,16 @@ class BuildApkCommand extends BuildSubCommand {
'debugging and a quick development cycle. \'release\' builds don\'t support debugging and are\n' 'debugging and a quick development cycle. \'release\' builds don\'t support debugging and are\n'
'suitable for deploying to app stores.'; 'suitable for deploying to app stores.';
TargetPlatform _getTargetPlatform(String targetArch) {
switch (targetArch) {
case 'arm':
return TargetPlatform.android_arm;
case 'x86':
return TargetPlatform.android_x86;
case 'x64':
return TargetPlatform.android_x64;
default:
throw new Exception('Unrecognized target architecture: $targetArch');
}
}
@override @override
Future<Null> runCommand() async { Future<Null> runCommand() async {
await super.runCommand(); await super.runCommand();
final TargetPlatform targetPlatform = _getTargetPlatform(argResults['target-arch']);
final BuildMode buildMode = getBuildMode(); final BuildMode buildMode = getBuildMode();
await buildApk(targetPlatform, buildMode: buildMode, target: targetFile); await buildApk(buildMode: buildMode, target: targetFile);
} }
} }
Future<Null> buildApk( Future<Null> buildApk({
TargetPlatform platform, {
String target, String target,
BuildMode buildMode: BuildMode.debug, BuildMode buildMode: BuildMode.debug,
String kernelPath, String kernelPath,
...@@ -85,9 +65,6 @@ Future<Null> buildApk( ...@@ -85,9 +65,6 @@ Future<Null> buildApk(
); );
} }
if (platform != TargetPlatform.android_arm && buildMode != BuildMode.debug) {
throwToolExit('Profile and release builds are only supported on ARM targets.');
}
// Validate that we can find an android sdk. // Validate that we can find an android sdk.
if (androidSdk == null) if (androidSdk == null)
throwToolExit('No Android SDK found. Try setting the ANDROID_HOME environment variable.'); throwToolExit('No Android SDK found. Try setting the ANDROID_HOME environment variable.');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment