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
c81c78f8
Unverified
Commit
c81c78f8
authored
Sep 25, 2019
by
Emmanuel Garcia
Committed by
GitHub
Sep 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test that flutter assets are contained in the APK (#41254)
parent
778add83
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
module_host_with_custom_build_test.dart
...vicelab/bin/tasks/module_host_with_custom_build_test.dart
+4
-0
module_test.dart
dev/devicelab/bin/tasks/module_test.dart
+2
-0
apk_utils.dart
dev/devicelab/lib/framework/apk_utils.dart
+7
-0
No files found.
dev/devicelab/bin/tasks/module_host_with_custom_build_test.dart
View file @
c81c78f8
...
@@ -100,6 +100,7 @@ Future<void> main() async {
...
@@ -100,6 +100,7 @@ Future<void> main() async {
final
Iterable
<
String
>
demoDebugFiles
=
await
getFilesInApk
(
demoDebugApk
);
final
Iterable
<
String
>
demoDebugFiles
=
await
getFilesInApk
(
demoDebugApk
);
checkItContains
<
String
>(<
String
>[
checkItContains
<
String
>(<
String
>[
...
flutterAssets
,
'assets/flutter_assets/isolate_snapshot_data'
,
'assets/flutter_assets/isolate_snapshot_data'
,
'assets/flutter_assets/kernel_blob.bin'
,
'assets/flutter_assets/kernel_blob.bin'
,
'assets/flutter_assets/vm_snapshot_data'
,
'assets/flutter_assets/vm_snapshot_data'
,
...
@@ -149,6 +150,7 @@ Future<void> main() async {
...
@@ -149,6 +150,7 @@ Future<void> main() async {
final
Iterable
<
String
>
demoStagingFiles
=
await
getFilesInApk
(
demoStagingApk
);
final
Iterable
<
String
>
demoStagingFiles
=
await
getFilesInApk
(
demoStagingApk
);
checkItContains
<
String
>(<
String
>[
checkItContains
<
String
>(<
String
>[
...
flutterAssets
,
'assets/flutter_assets/isolate_snapshot_data'
,
'assets/flutter_assets/isolate_snapshot_data'
,
'assets/flutter_assets/kernel_blob.bin'
,
'assets/flutter_assets/kernel_blob.bin'
,
'assets/flutter_assets/vm_snapshot_data'
,
'assets/flutter_assets/vm_snapshot_data'
,
...
@@ -200,6 +202,7 @@ Future<void> main() async {
...
@@ -200,6 +202,7 @@ Future<void> main() async {
final
Iterable
<
String
>
demoReleaseFiles
=
await
getFilesInApk
(
demoReleaseApk
);
final
Iterable
<
String
>
demoReleaseFiles
=
await
getFilesInApk
(
demoReleaseApk
);
checkItContains
<
String
>(<
String
>[
checkItContains
<
String
>(<
String
>[
...
flutterAssets
,
'lib/arm64-v8a/libapp.so'
,
'lib/arm64-v8a/libapp.so'
,
'lib/arm64-v8a/libflutter.so'
,
'lib/arm64-v8a/libflutter.so'
,
'lib/armeabi-v7a/libapp.so'
,
'lib/armeabi-v7a/libapp.so'
,
...
@@ -250,6 +253,7 @@ Future<void> main() async {
...
@@ -250,6 +253,7 @@ Future<void> main() async {
final
Iterable
<
String
>
demoProdFiles
=
await
getFilesInApk
(
demoProdApk
);
final
Iterable
<
String
>
demoProdFiles
=
await
getFilesInApk
(
demoProdApk
);
checkItContains
<
String
>(<
String
>[
checkItContains
<
String
>(<
String
>[
...
flutterAssets
,
'lib/arm64-v8a/libapp.so'
,
'lib/arm64-v8a/libapp.so'
,
'lib/arm64-v8a/libflutter.so'
,
'lib/arm64-v8a/libflutter.so'
,
'lib/armeabi-v7a/libapp.so'
,
'lib/armeabi-v7a/libapp.so'
,
...
...
dev/devicelab/bin/tasks/module_test.dart
View file @
c81c78f8
...
@@ -190,6 +190,7 @@ Future<void> main() async {
...
@@ -190,6 +190,7 @@ Future<void> main() async {
section
(
'Check files in debug APK'
);
section
(
'Check files in debug APK'
);
checkItContains
<
String
>(<
String
>[
checkItContains
<
String
>(<
String
>[
...
flutterAssets
,
'AndroidManifest.xml'
,
'AndroidManifest.xml'
,
'assets/flutter_assets/isolate_snapshot_data'
,
'assets/flutter_assets/isolate_snapshot_data'
,
'assets/flutter_assets/kernel_blob.bin'
,
'assets/flutter_assets/kernel_blob.bin'
,
...
@@ -246,6 +247,7 @@ Future<void> main() async {
...
@@ -246,6 +247,7 @@ Future<void> main() async {
section
(
'Check files in release APK'
);
section
(
'Check files in release APK'
);
checkItContains
<
String
>(<
String
>[
checkItContains
<
String
>(<
String
>[
...
flutterAssets
,
'AndroidManifest.xml'
,
'AndroidManifest.xml'
,
'lib/arm64-v8a/libapp.so'
,
'lib/arm64-v8a/libapp.so'
,
'lib/arm64-v8a/libflutter.so'
,
'lib/arm64-v8a/libflutter.so'
,
...
...
dev/devicelab/lib/framework/apk_utils.dart
View file @
c81c78f8
...
@@ -10,6 +10,13 @@ import 'package:path/path.dart' as path;
...
@@ -10,6 +10,13 @@ import 'package:path/path.dart' as path;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/utils.dart'
;
import
'package:flutter_devicelab/framework/utils.dart'
;
final
List
<
String
>
flutterAssets
=
<
String
>[
'assets/flutter_assets/AssetManifest.json'
,
'assets/flutter_assets/LICENSE'
,
'assets/flutter_assets/fonts/MaterialIcons-Regular.ttf'
,
'assets/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf'
,
];
/// Runs the given [testFunction] on a freshly generated Flutter project.
/// Runs the given [testFunction] on a freshly generated Flutter project.
Future
<
void
>
runProjectTest
(
Future
<
void
>
testFunction
(
FlutterProject
project
))
async
{
Future
<
void
>
runProjectTest
(
Future
<
void
>
testFunction
(
FlutterProject
project
))
async
{
final
Directory
tempDir
=
Directory
.
systemTemp
.
createTempSync
(
'flutter_devicelab_gradle_plugin_test.'
);
final
Directory
tempDir
=
Directory
.
systemTemp
.
createTempSync
(
'flutter_devicelab_gradle_plugin_test.'
);
...
...
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