Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
90f38907
Unverified
Commit
90f38907
authored
May 20, 2019
by
Emmanuel Garcia
Committed by
GitHub
May 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support ARM 32 and 64 bits in app bundles
parent
c2a93bd5
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
280 additions
and
103 deletions
+280
-103
gradle_plugin_test.dart
dev/devicelab/bin/tasks/gradle_plugin_test.dart
+46
-1
flutter.gradle
packages/flutter_tools/gradle/flutter.gradle
+216
-93
build_apk.dart
packages/flutter_tools/lib/src/commands/build_apk.dart
+3
-1
build_appbundle.dart
packages/flutter_tools/lib/src/commands/build_appbundle.dart
+15
-8
No files found.
dev/devicelab/bin/tasks/gradle_plugin_test.dart
View file @
90f38907
...
...
@@ -63,6 +63,51 @@ Future<void> main() async {
await
runProjectTest
((
FlutterProject
project
)
async
{
section
(
'gradlew assembleRelease'
);
await
project
.
runGradleTask
(
'assembleRelease'
);
// When the platform-target isn't specified, we generate the snapshots
// for arm and arm64.
final
List
<
String
>
targetPlatforms
=
<
String
>[
'android-arm'
,
'android-arm64'
];
for
(
final
String
targetPlatform
in
targetPlatforms
)
{
final
String
androidArmSnapshotPath
=
path
.
join
(
project
.
rootPath
,
'build'
,
'app'
,
'intermediates'
,
'flutter'
,
'release'
,
targetPlatform
);
final
String
isolateSnapshotData
=
path
.
join
(
androidArmSnapshotPath
,
'isolate_snapshot_data'
);
if
(!
File
(
isolateSnapshotData
).
existsSync
())
{
throw
TaskResult
.
failure
(
'Snapshot doesn
\'
t exist:
$isolateSnapshotData
'
);
}
final
String
isolateSnapshotInstr
=
path
.
join
(
androidArmSnapshotPath
,
'isolate_snapshot_instr'
);
if
(!
File
(
isolateSnapshotInstr
).
existsSync
())
{
throw
TaskResult
.
failure
(
'Snapshot doesn
\'
t exist:
$isolateSnapshotInstr
'
);
}
final
String
vmSnapshotData
=
path
.
join
(
androidArmSnapshotPath
,
'vm_snapshot_data'
);
if
(!
File
(
isolateSnapshotData
).
existsSync
())
{
throw
TaskResult
.
failure
(
'Snapshot doesn
\'
t exist:
$vmSnapshotData
'
);
}
final
String
vmSnapshotInstr
=
path
.
join
(
androidArmSnapshotPath
,
'vm_snapshot_instr'
);
if
(!
File
(
isolateSnapshotData
).
existsSync
())
{
throw
TaskResult
.
failure
(
'Snapshot doesn
\'
t exist:
$vmSnapshotInstr
'
);
}
}
});
await
runProjectTest
((
FlutterProject
project
)
async
{
...
...
@@ -311,7 +356,7 @@ class _Dependencies {
String
_validateSnapshotDependency
(
FlutterProject
project
,
String
expectedTarget
)
{
final
_Dependencies
deps
=
_Dependencies
(
path
.
join
(
project
.
rootPath
,
'build'
,
'app'
,
'intermediates'
,
'flutter'
,
'debug'
,
'snapshot_blob.bin.d'
));
'flutter'
,
'debug'
,
'
android-arm'
,
'
snapshot_blob.bin.d'
));
return
deps
.
target
==
expectedTarget
?
null
:
'Dependency file should have
$expectedTarget
as target. Instead has
${deps.target}
'
;
}
packages/flutter_tools/gradle/flutter.gradle
View file @
90f38907
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/commands/build_apk.dart
View file @
90f38907
...
...
@@ -27,7 +27,9 @@ class BuildApkCommand extends BuildSubCommand {
)
..
addOption
(
'target-platform'
,
defaultsTo:
'android-arm'
,
allowed:
<
String
>[
'android-arm'
,
'android-arm64'
,
'android-x86'
,
'android-x64'
]);
allowed:
<
String
>[
'android-arm'
,
'android-arm64'
,
'android-x86'
,
'android-x64'
],
help:
'The target platform for which the app is compiled.'
,
);
}
@override
...
...
packages/flutter_tools/lib/src/commands/build_appbundle.dart
View file @
90f38907
...
...
@@ -20,23 +20,30 @@ class BuildAppBundleCommand extends BuildSubCommand {
argParser
..
addFlag
(
'track-widget-creation'
,
negatable:
false
,
hide:
!
verboseHelp
)
..
addFlag
(
'build-shared-library'
,
..
addFlag
(
'build-shared-library'
,
negatable:
false
,
help:
'Whether to prefer compiling to a *.so file (android only).'
,
)
..
addOption
(
'target-platform'
,
defaultsTo:
'android-arm'
,
allowed:
<
String
>[
'android-arm'
,
'android-arm64'
]);
..
addOption
(
'target-platform'
,
allowed:
<
String
>[
'android-arm'
,
'android-arm64'
],
help:
'The target platform for which the app is compiled.
\n
'
'By default, the bundle will include
\'
arm
\'
and
\'
arm64
\'
, '
'which is the recommended configuration for app bundles.
\n
'
'For more, see https://developer.android.com/distribute/best-practices/develop/64-bit'
,
);
}
@override
final
String
name
=
'appbundle'
;
@override
final
String
description
=
'Build an Android App Bundle file from your app.
\n\n
'
'This command can build debug and release versions of an app bundle for your application.
\'
debug
\'
builds support '
'debugging and a quick development cycle.
\'
release
\'
builds don
\'
t support debugging and are '
'suitable for deploying to app stores.
\n
app bundle improves your app size'
;
final
String
description
=
'Build an Android App Bundle file from your app.
\n\n
'
'This command can build debug and release versions of an app bundle for your application.
\'
debug
\'
builds support '
'debugging and a quick development cycle.
\'
release
\'
builds don
\'
t support debugging and are '
'suitable for deploying to app stores.
\n
app bundle improves your app size'
;
@override
Future
<
FlutterCommandResult
>
runCommand
()
async
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment