[flutter_tools] Deferred components build system (#76192)
This commit is contained in:
@@ -22,7 +22,7 @@ void main() {
|
||||
Environment env;
|
||||
|
||||
Environment createEnvironment() {
|
||||
final Map<String, String> defines = <String, String>{ kSplitAot: 'true' };
|
||||
final Map<String, String> defines = <String, String>{ kDeferredComponents: 'true' };
|
||||
final Environment result = Environment(
|
||||
outputDir: fileSystem.directory('/output'),
|
||||
buildDir: fileSystem.directory('/build'),
|
||||
|
||||
@@ -10,9 +10,6 @@ import 'package:flutter_tools/src/android/deferred_components_validator.dart';
|
||||
import 'package:flutter_tools/src/base/deferred_component.dart';
|
||||
import 'package:flutter_tools/src/base/file_system.dart';
|
||||
import 'package:flutter_tools/src/base/logger.dart';
|
||||
import 'package:flutter_tools/src/build_system/build_system.dart';
|
||||
import 'package:flutter_tools/src/build_system/targets/common.dart';
|
||||
import 'package:flutter_tools/src/globals.dart' as globals;
|
||||
|
||||
import '../../src/common.dart';
|
||||
import '../../src/context.dart';
|
||||
@@ -20,37 +17,20 @@ import '../../src/context.dart';
|
||||
void main() {
|
||||
FileSystem fileSystem;
|
||||
BufferLogger logger;
|
||||
Environment env;
|
||||
|
||||
Environment createEnvironment() {
|
||||
final Map<String, String> defines = <String, String>{ kSplitAot: 'true' };
|
||||
final Environment result = Environment(
|
||||
outputDir: fileSystem.directory('/output'),
|
||||
buildDir: fileSystem.directory('/build'),
|
||||
projectDir: fileSystem.directory('/project'),
|
||||
defines: defines,
|
||||
inputs: <String, String>{},
|
||||
cacheDir: fileSystem.directory('/cache'),
|
||||
flutterRootDir: fileSystem.directory('/flutter_root'),
|
||||
artifacts: globals.artifacts,
|
||||
fileSystem: fileSystem,
|
||||
logger: logger,
|
||||
processManager: globals.processManager,
|
||||
engineVersion: 'invalidEngineVersion',
|
||||
generateDartPluginRegistry: false,
|
||||
);
|
||||
return result;
|
||||
}
|
||||
Directory projectDir;
|
||||
Directory flutterRootDir;
|
||||
|
||||
setUp(() {
|
||||
fileSystem = MemoryFileSystem.test();
|
||||
logger = BufferLogger.test();
|
||||
env = createEnvironment();
|
||||
projectDir = fileSystem.directory('/project');
|
||||
flutterRootDir = fileSystem.directory('/flutter_root');
|
||||
});
|
||||
|
||||
testWithoutContext('No checks passes', () async {
|
||||
final DeferredComponentsPrebuildValidator validator = DeferredComponentsPrebuildValidator(
|
||||
env,
|
||||
projectDir,
|
||||
logger,
|
||||
exitOnFail: false,
|
||||
title: 'test check',
|
||||
);
|
||||
@@ -61,7 +41,8 @@ void main() {
|
||||
|
||||
testWithoutContext('clearTempDir passes', () async {
|
||||
final DeferredComponentsPrebuildValidator validator = DeferredComponentsPrebuildValidator(
|
||||
env,
|
||||
projectDir,
|
||||
logger,
|
||||
exitOnFail: false,
|
||||
title: 'test check',
|
||||
);
|
||||
@@ -72,7 +53,7 @@ void main() {
|
||||
});
|
||||
|
||||
testUsingContext('androidComponentSetup build.gradle does not exist', () async {
|
||||
final Directory templatesDir = env.flutterRootDir.childDirectory('templates').childDirectory('deferred_component');
|
||||
final Directory templatesDir = flutterRootDir.childDirectory('templates').childDirectory('deferred_component');
|
||||
final File buildGradleTemplate = templatesDir.childFile('build.gradle.tmpl');
|
||||
final File androidManifestTemplate = templatesDir.childDirectory('src').childDirectory('main').childFile('AndroidManifest.xml.tmpl');
|
||||
if (templatesDir.existsSync()) {
|
||||
@@ -84,12 +65,13 @@ void main() {
|
||||
androidManifestTemplate.writeAsStringSync('fake AndroidManigest.xml template {{componentName}}', flush: true, mode: FileMode.append);
|
||||
|
||||
final DeferredComponentsPrebuildValidator validator = DeferredComponentsPrebuildValidator(
|
||||
env,
|
||||
projectDir,
|
||||
logger,
|
||||
exitOnFail: false,
|
||||
title: 'test check',
|
||||
templatesDir: templatesDir,
|
||||
);
|
||||
final Directory componentDir = env.projectDir.childDirectory('android').childDirectory('component1');
|
||||
final Directory componentDir = projectDir.childDirectory('android').childDirectory('component1');
|
||||
final File file = componentDir.childDirectory('src').childDirectory('main').childFile('AndroidManifest.xml');
|
||||
if (file.existsSync()) {
|
||||
file.deleteSync();
|
||||
@@ -109,7 +91,7 @@ void main() {
|
||||
});
|
||||
|
||||
testUsingContext('androidComponentSetup AndroidManifest.xml does not exist', () async {
|
||||
final Directory templatesDir = env.flutterRootDir.childDirectory('templates').childDirectory('deferred_component');
|
||||
final Directory templatesDir = flutterRootDir.childDirectory('templates').childDirectory('deferred_component');
|
||||
final File buildGradleTemplate = templatesDir.childFile('build.gradle.tmpl');
|
||||
final File androidManifestTemplate = templatesDir.childDirectory('src').childDirectory('main').childFile('AndroidManifest.xml.tmpl');
|
||||
if (templatesDir.existsSync()) {
|
||||
@@ -121,12 +103,13 @@ void main() {
|
||||
androidManifestTemplate.writeAsStringSync('fake AndroidManigest.xml template {{componentName}}', flush: true, mode: FileMode.append);
|
||||
|
||||
final DeferredComponentsPrebuildValidator validator = DeferredComponentsPrebuildValidator(
|
||||
env,
|
||||
projectDir,
|
||||
logger,
|
||||
exitOnFail: false,
|
||||
title: 'test check',
|
||||
templatesDir: templatesDir,
|
||||
);
|
||||
final Directory componentDir = env.projectDir.childDirectory('android').childDirectory('component1');
|
||||
final Directory componentDir = projectDir.childDirectory('android').childDirectory('component1');
|
||||
final File file = componentDir.childFile('build.gradle');
|
||||
if (file.existsSync()) {
|
||||
file.deleteSync();
|
||||
@@ -146,7 +129,7 @@ void main() {
|
||||
});
|
||||
|
||||
testUsingContext('androidComponentSetup all files exist passes', () async {
|
||||
final Directory templatesDir = env.flutterRootDir.childDirectory('templates').childDirectory('deferred_component');
|
||||
final Directory templatesDir = flutterRootDir.childDirectory('templates').childDirectory('deferred_component');
|
||||
final File buildGradleTemplate = templatesDir.childFile('build.gradle.tmpl');
|
||||
final File androidManifestTemplate = templatesDir.childDirectory('src').childDirectory('main').childFile('AndroidManifest.xml.tmpl');
|
||||
if (templatesDir.existsSync()) {
|
||||
@@ -158,12 +141,13 @@ void main() {
|
||||
androidManifestTemplate.writeAsStringSync('fake AndroidManigest.xml template {{componentName}}', flush: true, mode: FileMode.append);
|
||||
|
||||
final DeferredComponentsPrebuildValidator validator = DeferredComponentsPrebuildValidator(
|
||||
env,
|
||||
projectDir,
|
||||
logger,
|
||||
exitOnFail: false,
|
||||
title: 'test check',
|
||||
templatesDir: templatesDir,
|
||||
);
|
||||
final Directory componentDir = env.projectDir.childDirectory('android').childDirectory('component1');
|
||||
final Directory componentDir = projectDir.childDirectory('android').childDirectory('component1');
|
||||
final File buildGradle = componentDir.childFile('build.gradle');
|
||||
if (buildGradle.existsSync()) {
|
||||
buildGradle.deleteSync();
|
||||
@@ -189,11 +173,12 @@ void main() {
|
||||
|
||||
testWithoutContext('androidStringMapping creates new file', () async {
|
||||
final DeferredComponentsPrebuildValidator validator = DeferredComponentsPrebuildValidator(
|
||||
env,
|
||||
projectDir,
|
||||
logger,
|
||||
exitOnFail: false,
|
||||
title: 'test check',
|
||||
);
|
||||
final Directory baseModuleDir = env.projectDir.childDirectory('android').childDirectory('app');
|
||||
final Directory baseModuleDir = projectDir.childDirectory('android').childDirectory('app');
|
||||
final File stringRes = baseModuleDir.childDirectory('src').childDirectory('main').childDirectory('res').childDirectory('values').childFile('strings.xml');
|
||||
if (stringRes.existsSync()) {
|
||||
stringRes.deleteSync();
|
||||
@@ -239,7 +224,7 @@ void main() {
|
||||
expect(logger.statusText.contains('Newly generated android files:\n'), true);
|
||||
expect(logger.statusText.contains('build/${DeferredComponentsValidator.kDeferredComponentsTempDirectory}/app/src/main/res/values/strings.xml\n'), true);
|
||||
|
||||
final File stringsOutput = env.projectDir
|
||||
final File stringsOutput = projectDir
|
||||
.childDirectory('build')
|
||||
.childDirectory(DeferredComponentsValidator.kDeferredComponentsTempDirectory)
|
||||
.childDirectory('app')
|
||||
@@ -255,11 +240,12 @@ void main() {
|
||||
|
||||
testWithoutContext('androidStringMapping modifies strings file', () async {
|
||||
final DeferredComponentsPrebuildValidator validator = DeferredComponentsPrebuildValidator(
|
||||
env,
|
||||
projectDir,
|
||||
logger,
|
||||
exitOnFail: false,
|
||||
title: 'test check',
|
||||
);
|
||||
final Directory baseModuleDir = env.projectDir.childDirectory('android').childDirectory('app');
|
||||
final Directory baseModuleDir = projectDir.childDirectory('android').childDirectory('app');
|
||||
final File stringRes = baseModuleDir.childDirectory('src').childDirectory('main').childDirectory('res').childDirectory('values').childFile('strings.xml');
|
||||
if (stringRes.existsSync()) {
|
||||
stringRes.deleteSync();
|
||||
@@ -285,7 +271,7 @@ void main() {
|
||||
expect(logger.statusText.contains('Modified android files:\n'), true);
|
||||
expect(logger.statusText.contains('build/${DeferredComponentsValidator.kDeferredComponentsTempDirectory}/app/src/main/res/values/strings.xml\n'), true);
|
||||
|
||||
final File stringsOutput = env.projectDir
|
||||
final File stringsOutput = projectDir
|
||||
.childDirectory('build')
|
||||
.childDirectory(DeferredComponentsValidator.kDeferredComponentsTempDirectory)
|
||||
.childDirectory('app')
|
||||
|
||||
@@ -176,6 +176,129 @@ flutter:
|
||||
FileSystem: () => testFileSystem,
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
});
|
||||
|
||||
testUsingContext('deferred assets are parsed', () async {
|
||||
globals.fs.file('.packages').createSync();
|
||||
globals.fs.file(globals.fs.path.join('assets', 'foo', 'bar.txt')).createSync(recursive: true);
|
||||
globals.fs.file(globals.fs.path.join('assets', 'bar', 'barbie.txt')).createSync(recursive: true);
|
||||
globals.fs.file(globals.fs.path.join('assets', 'wild', 'dash.txt')).createSync(recursive: true);
|
||||
globals.fs.file('pubspec.yaml')
|
||||
..createSync()
|
||||
..writeAsStringSync(r'''
|
||||
name: example
|
||||
flutter:
|
||||
assets:
|
||||
- assets/foo/
|
||||
deferred-components:
|
||||
- name: component1
|
||||
assets:
|
||||
- assets/bar/barbie.txt
|
||||
- assets/wild/
|
||||
''');
|
||||
final AssetBundle bundle = AssetBundleFactory.defaultInstance(
|
||||
logger: globals.logger,
|
||||
fileSystem: globals.fs,
|
||||
platform: globals.platform,
|
||||
splitDeferredAssets: true,
|
||||
).createBundle();
|
||||
await bundle.build(manifestPath: 'pubspec.yaml', packagesPath: '.packages', deferredComponentsEnabled: true);
|
||||
// Expected assets:
|
||||
// - asset manifest
|
||||
// - font manifest
|
||||
// - license file
|
||||
// - assets/foo/bar.txt
|
||||
expect(bundle.entries.length, 4);
|
||||
expect(bundle.deferredComponentsEntries.length, 1);
|
||||
expect(bundle.deferredComponentsEntries['component1'].length, 2);
|
||||
expect(bundle.needsBuild(manifestPath: 'pubspec.yaml'), false);
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => testFileSystem,
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
});
|
||||
|
||||
testUsingContext('deferred assets are parsed regularly when splitDeferredAssets Disabled', () async {
|
||||
globals.fs.file('.packages').createSync();
|
||||
globals.fs.file(globals.fs.path.join('assets', 'foo', 'bar.txt')).createSync(recursive: true);
|
||||
globals.fs.file(globals.fs.path.join('assets', 'bar', 'barbie.txt')).createSync(recursive: true);
|
||||
globals.fs.file(globals.fs.path.join('assets', 'wild', 'dash.txt')).createSync(recursive: true);
|
||||
globals.fs.file('pubspec.yaml')
|
||||
..createSync()
|
||||
..writeAsStringSync(r'''
|
||||
name: example
|
||||
flutter:
|
||||
assets:
|
||||
- assets/foo/
|
||||
deferred-components:
|
||||
- name: component1
|
||||
assets:
|
||||
- assets/bar/barbie.txt
|
||||
- assets/wild/
|
||||
''');
|
||||
final AssetBundle bundle = AssetBundleFactory.instance.createBundle();
|
||||
await bundle.build(manifestPath: 'pubspec.yaml', packagesPath: '.packages', deferredComponentsEnabled: false);
|
||||
// Expected assets:
|
||||
// - asset manifest
|
||||
// - font manifest
|
||||
// - license file
|
||||
// - assets/foo/bar.txt
|
||||
expect(bundle.entries.length, 6);
|
||||
expect(bundle.deferredComponentsEntries.isEmpty, true);
|
||||
expect(bundle.needsBuild(manifestPath: 'pubspec.yaml'), false);
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => testFileSystem,
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
});
|
||||
|
||||
testUsingContext('deferred assets wildcard parsed', () async {
|
||||
final File packageFile = globals.fs.file('.packages')..createSync();
|
||||
globals.fs.file(globals.fs.path.join('assets', 'foo', 'bar.txt')).createSync(recursive: true);
|
||||
globals.fs.file(globals.fs.path.join('assets', 'bar', 'barbie.txt')).createSync(recursive: true);
|
||||
globals.fs.file(globals.fs.path.join('assets', 'wild', 'dash.txt')).createSync(recursive: true);
|
||||
globals.fs.file('pubspec.yaml')
|
||||
..createSync()
|
||||
..writeAsStringSync(r'''
|
||||
name: example
|
||||
flutter:
|
||||
assets:
|
||||
- assets/foo/
|
||||
deferred-components:
|
||||
- name: component1
|
||||
assets:
|
||||
- assets/bar/barbie.txt
|
||||
- assets/wild/
|
||||
''');
|
||||
final AssetBundle bundle = AssetBundleFactory.defaultInstance(
|
||||
logger: globals.logger,
|
||||
fileSystem: globals.fs,
|
||||
platform: globals.platform,
|
||||
splitDeferredAssets: true,
|
||||
).createBundle();
|
||||
await bundle.build(manifestPath: 'pubspec.yaml', packagesPath: '.packages', deferredComponentsEnabled: true);
|
||||
// Expected assets:
|
||||
// - asset manifest
|
||||
// - font manifest
|
||||
// - license file
|
||||
// - assets/foo/bar.txt
|
||||
expect(bundle.entries.length, 4);
|
||||
expect(bundle.deferredComponentsEntries.length, 1);
|
||||
expect(bundle.deferredComponentsEntries['component1'].length, 2);
|
||||
expect(bundle.needsBuild(manifestPath: 'pubspec.yaml'), false);
|
||||
|
||||
// Simulate modifying the files by updating the filestat time manually.
|
||||
globals.fs.file(globals.fs.path.join('assets', 'wild', 'fizz.txt'))
|
||||
..createSync(recursive: true)
|
||||
..setLastModifiedSync(packageFile.lastModifiedSync().add(const Duration(hours: 1)));
|
||||
|
||||
expect(bundle.needsBuild(manifestPath: 'pubspec.yaml'), true);
|
||||
await bundle.build(manifestPath: 'pubspec.yaml', packagesPath: '.packages', deferredComponentsEnabled: true);
|
||||
|
||||
expect(bundle.entries.length, 4);
|
||||
expect(bundle.deferredComponentsEntries.length, 1);
|
||||
expect(bundle.deferredComponentsEntries['component1'].length, 3);
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => testFileSystem,
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
});
|
||||
});
|
||||
|
||||
testUsingContext('Failed directory delete shows message', () async {
|
||||
|
||||
@@ -130,16 +130,16 @@ void main() {
|
||||
wrapColumn: maxLineWidth,
|
||||
);
|
||||
|
||||
expect(commandHelp.L.toString(), endsWith('\x1B[1;30m(debugDumpLayerTree)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.P.toString(), endsWith('\x1B[1;30m(WidgetsApp.showPerformanceOverlay)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.S.toString(), endsWith('\x1B[1;30m(debugDumpSemantics)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.U.toString(), endsWith('\x1B[1;30m(debugDumpSemantics)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.a.toString(), endsWith('\x1B[1;30m(debugProfileWidgetBuilds)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.i.toString(), endsWith('\x1B[1;30m(WidgetsApp.showWidgetInspectorOverride)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.o.toString(), endsWith('\x1B[1;30m(defaultTargetPlatform)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.p.toString(), endsWith('\x1B[1;30m(debugPaintSizeEnabled)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.t.toString(), endsWith('\x1B[1;30m(debugDumpRenderTree)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.w.toString(), endsWith('\x1B[1;30m(debugDumpApp)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.L.toString(), endsWith('\x1B[90m(debugDumpLayerTree)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.P.toString(), endsWith('\x1B[90m(WidgetsApp.showPerformanceOverlay)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.S.toString(), endsWith('\x1B[90m(debugDumpSemantics)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.U.toString(), endsWith('\x1B[90m(debugDumpSemantics)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.a.toString(), endsWith('\x1B[90m(debugProfileWidgetBuilds)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.i.toString(), endsWith('\x1B[90m(WidgetsApp.showWidgetInspectorOverride)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.o.toString(), endsWith('\x1B[90m(defaultTargetPlatform)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.p.toString(), endsWith('\x1B[90m(debugPaintSizeEnabled)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.t.toString(), endsWith('\x1B[90m(debugDumpRenderTree)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.w.toString(), endsWith('\x1B[90m(debugDumpApp)\x1B[39m\x1b[22m'));
|
||||
});
|
||||
|
||||
testWithoutContext('should not create a help text longer than maxLineWidth without ansi support', () {
|
||||
@@ -180,24 +180,24 @@ void main() {
|
||||
wrapColumn: maxLineWidth,
|
||||
);
|
||||
|
||||
expect(commandHelp.L.toString(), equals('\x1B[1mL\x1B[22m Dump layer tree to the console. \x1B[1;30m(debugDumpLayerTree)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.P.toString(), equals('\x1B[1mP\x1B[22m Toggle performance overlay. \x1B[1;30m(WidgetsApp.showPerformanceOverlay)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.L.toString(), equals('\x1B[1mL\x1B[22m Dump layer tree to the console. \x1B[90m(debugDumpLayerTree)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.P.toString(), equals('\x1B[1mP\x1B[22m Toggle performance overlay. \x1B[90m(WidgetsApp.showPerformanceOverlay)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.R.toString(), equals('\x1B[1mR\x1B[22m Hot restart.'));
|
||||
expect(commandHelp.S.toString(), equals('\x1B[1mS\x1B[22m Dump accessibility tree in traversal order. \x1B[1;30m(debugDumpSemantics)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.U.toString(), equals('\x1B[1mU\x1B[22m Dump accessibility tree in inverse hit test order. \x1B[1;30m(debugDumpSemantics)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.a.toString(), equals('\x1B[1ma\x1B[22m Toggle timeline events for all widget build methods. \x1B[1;30m(debugProfileWidgetBuilds)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.S.toString(), equals('\x1B[1mS\x1B[22m Dump accessibility tree in traversal order. \x1B[90m(debugDumpSemantics)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.U.toString(), equals('\x1B[1mU\x1B[22m Dump accessibility tree in inverse hit test order. \x1B[90m(debugDumpSemantics)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.a.toString(), equals('\x1B[1ma\x1B[22m Toggle timeline events for all widget build methods. \x1B[90m(debugProfileWidgetBuilds)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.d.toString(), equals('\x1B[1md\x1B[22m Detach (terminate "flutter run" but leave application running).'));
|
||||
expect(commandHelp.g.toString(), equals('\x1B[1mg\x1B[22m Run source code generators.'));
|
||||
expect(commandHelp.h.toString(), equals('\x1B[1mh\x1B[22m Repeat this help message.'));
|
||||
expect(commandHelp.i.toString(), equals('\x1B[1mi\x1B[22m Toggle widget inspector. \x1B[1;30m(WidgetsApp.showWidgetInspectorOverride)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.o.toString(), equals('\x1B[1mo\x1B[22m Simulate different operating systems. \x1B[1;30m(defaultTargetPlatform)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.p.toString(), equals('\x1B[1mp\x1B[22m Toggle the display of construction lines. \x1B[1;30m(debugPaintSizeEnabled)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.i.toString(), equals('\x1B[1mi\x1B[22m Toggle widget inspector. \x1B[90m(WidgetsApp.showWidgetInspectorOverride)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.o.toString(), equals('\x1B[1mo\x1B[22m Simulate different operating systems. \x1B[90m(defaultTargetPlatform)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.p.toString(), equals('\x1B[1mp\x1B[22m Toggle the display of construction lines. \x1B[90m(debugPaintSizeEnabled)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.q.toString(), equals('\x1B[1mq\x1B[22m Quit (terminate the application on the device).'));
|
||||
expect(commandHelp.r.toString(), equals('\x1B[1mr\x1B[22m Hot reload. $fire$fire$fire'));
|
||||
expect(commandHelp.s.toString(), equals('\x1B[1ms\x1B[22m Save a screenshot to flutter.png.'));
|
||||
expect(commandHelp.t.toString(), equals('\x1B[1mt\x1B[22m Dump rendering tree to the console. \x1B[1;30m(debugDumpRenderTree)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.t.toString(), equals('\x1B[1mt\x1B[22m Dump rendering tree to the console. \x1B[90m(debugDumpRenderTree)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.v.toString(), equals('\x1B[1mv\x1B[22m Launch DevTools.'));
|
||||
expect(commandHelp.w.toString(), equals('\x1B[1mw\x1B[22m Dump widget hierarchy to the console. \x1B[1;30m(debugDumpApp)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.w.toString(), equals('\x1B[1mw\x1B[22m Dump widget hierarchy to the console. \x1B[90m(debugDumpApp)\x1B[39m\x1b[22m'));
|
||||
expect(commandHelp.z.toString(), equals('\x1B[1mz\x1B[22m Toggle elevation checker.'));
|
||||
});
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ void main() {
|
||||
buildDir: fileSystem.directory('build')..createSync(),
|
||||
projectDir: fileSystem.directory('project')..createSync(),
|
||||
defines: <String, String>{
|
||||
kSplitAot: 'true',
|
||||
kDeferredComponents: 'true',
|
||||
},
|
||||
artifacts: null,
|
||||
processManager: null,
|
||||
@@ -44,11 +44,10 @@ void main() {
|
||||
environment.buildDir.createSync(recursive: true);
|
||||
const AndroidAot androidAot = AndroidAot(TargetPlatform.android_arm64, BuildMode.release);
|
||||
const AndroidAotBundle androidAotBundle = AndroidAotBundle(androidAot);
|
||||
final CompositeTarget androidDefBundle = CompositeTarget(<Target>[androidAotBundle]);
|
||||
final CompositeTarget compositeTarget = CompositeTarget(<Target>[androidDefBundle]);
|
||||
final AndroidAotDeferredComponentsBundle androidDefBundle = AndroidAotDeferredComponentsBundle(androidAotBundle);
|
||||
final DeferredComponentsGenSnapshotValidatorTarget validatorTarget = DeferredComponentsGenSnapshotValidatorTarget(
|
||||
dependency: compositeTarget,
|
||||
abis: <String>['arm64-v8a'],
|
||||
deferredComponentsDependencies: <AndroidAotDeferredComponentsBundle>[androidDefBundle],
|
||||
nonDeferredComponentsDependencies: <Target>[],
|
||||
title: 'test checks',
|
||||
exitOnFail: false,
|
||||
);
|
||||
@@ -68,7 +67,7 @@ void main() {
|
||||
buildDir: fileSystem.directory('build')..createSync(),
|
||||
projectDir: fileSystem.directory('project')..createSync(),
|
||||
defines: <String, String>{
|
||||
kSplitAot: 'true',
|
||||
kDeferredComponents: 'true',
|
||||
},
|
||||
artifacts: null,
|
||||
processManager: null,
|
||||
@@ -78,11 +77,10 @@ void main() {
|
||||
environment.buildDir.createSync(recursive: true);
|
||||
const AndroidAot androidAot = AndroidAot(TargetPlatform.android_arm64, BuildMode.release);
|
||||
const AndroidAotBundle androidAotBundle = AndroidAotBundle(androidAot);
|
||||
final CompositeTarget androidDefBundle = CompositeTarget(<Target>[androidAotBundle]);
|
||||
final CompositeTarget compositeTarget = CompositeTarget(<Target>[androidDefBundle]);
|
||||
final AndroidAotDeferredComponentsBundle androidDefBundle = AndroidAotDeferredComponentsBundle(androidAotBundle);
|
||||
final DeferredComponentsGenSnapshotValidatorTarget validatorTarget = DeferredComponentsGenSnapshotValidatorTarget(
|
||||
dependency: compositeTarget,
|
||||
abis: <String>['arm64-v8a'],
|
||||
deferredComponentsDependencies: <AndroidAotDeferredComponentsBundle>[androidDefBundle],
|
||||
nonDeferredComponentsDependencies: <Target>[],
|
||||
title: 'test checks',
|
||||
exitOnFail: false,
|
||||
);
|
||||
@@ -101,7 +99,7 @@ void main() {
|
||||
buildDir: fileSystem.directory('build')..createSync(),
|
||||
projectDir: fileSystem.directory('project')..createSync(),
|
||||
defines: <String, String>{
|
||||
kSplitAot: 'true',
|
||||
kDeferredComponents: 'true',
|
||||
},
|
||||
artifacts: null,
|
||||
processManager: null,
|
||||
@@ -111,11 +109,10 @@ void main() {
|
||||
environment.buildDir.createSync(recursive: true);
|
||||
const AndroidAot androidAot = AndroidAot(TargetPlatform.android_arm64, BuildMode.release);
|
||||
const AndroidAotBundle androidAotBundle = AndroidAotBundle(androidAot);
|
||||
final CompositeTarget androidDefBundle = CompositeTarget(<Target>[androidAotBundle]);
|
||||
final CompositeTarget compositeTarget = CompositeTarget(<Target>[androidDefBundle]);
|
||||
final AndroidAotDeferredComponentsBundle androidDefBundle = AndroidAotDeferredComponentsBundle(androidAotBundle);
|
||||
final DeferredComponentsGenSnapshotValidatorTarget validatorTarget = DeferredComponentsGenSnapshotValidatorTarget(
|
||||
dependency: compositeTarget,
|
||||
abis: <String>['arm64-v8a'],
|
||||
deferredComponentsDependencies: <AndroidAotDeferredComponentsBundle>[androidDefBundle],
|
||||
nonDeferredComponentsDependencies: <Target>[],
|
||||
title: 'test checks',
|
||||
exitOnFail: false,
|
||||
);
|
||||
|
||||
@@ -0,0 +1,274 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// @dart = 2.8
|
||||
|
||||
import 'package:archive/archive.dart';
|
||||
import 'package:file/file.dart';
|
||||
import 'package:file_testing/file_testing.dart';
|
||||
import 'package:flutter_tools/src/base/io.dart';
|
||||
|
||||
import '../src/common.dart';
|
||||
import 'test_data/deferred_components_project.dart';
|
||||
import 'test_driver.dart';
|
||||
import 'test_utils.dart';
|
||||
|
||||
void main() {
|
||||
Directory tempDir;
|
||||
FlutterRunTestDriver _flutter;
|
||||
|
||||
setUp(() async {
|
||||
tempDir = createResolvedTempDirectorySync('run_test.');
|
||||
_flutter = FlutterRunTestDriver(tempDir);
|
||||
});
|
||||
|
||||
tearDown(() async {
|
||||
await _flutter.stop();
|
||||
tryToDelete(tempDir);
|
||||
});
|
||||
|
||||
testWithoutContext('simple build appbundle android-arm64 target succeeds', () async {
|
||||
final DeferredComponentsProject project = DeferredComponentsProject(BasicDeferredComponentsConfig());
|
||||
await project.setUpIn(tempDir);
|
||||
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
|
||||
final ProcessResult result = await processManager.run(<String>[
|
||||
flutterBin,
|
||||
...getLocalEngineArguments(),
|
||||
'build',
|
||||
'appbundle',
|
||||
'--target-platform=android-arm64'
|
||||
], workingDirectory: tempDir.path);
|
||||
|
||||
expect(result.stdout.toString(), contains('app-release.aab'));
|
||||
expect(result.stdout.toString(), contains('Deferred components prebuild validation passed.'));
|
||||
expect(result.stdout.toString(), contains('Deferred components gen_snapshot validation passed.'));
|
||||
|
||||
final String line = result.stdout.toString()
|
||||
.split('\n')
|
||||
.firstWhere((String line) => line.contains('app-release.aab'));
|
||||
|
||||
final String outputFilePath = line.split(' ')[2].trim();
|
||||
final File outputFile = fileSystem.file(fileSystem.path.join(tempDir.path, outputFilePath));
|
||||
expect(outputFile, exists);
|
||||
|
||||
final Archive archive = ZipDecoder().decodeBytes(outputFile.readAsBytesSync());
|
||||
|
||||
expect(archive.findFile('base/lib/arm64-v8a/libapp.so') != null, true);
|
||||
expect(archive.findFile('base/lib/arm64-v8a/libflutter.so') != null, true);
|
||||
expect(archive.findFile('component1/lib/arm64-v8a/libapp.so-2.part.so') != null, true);
|
||||
|
||||
expect(archive.findFile('component1/assets/flutter_assets/test_assets/asset2.txt') != null, true);
|
||||
expect(archive.findFile('base/assets/flutter_assets/test_assets/asset1.txt') != null, true);
|
||||
|
||||
expect(result.exitCode, 0);
|
||||
}, timeout: const Timeout(Duration(minutes: 2)));
|
||||
|
||||
testWithoutContext('simple build appbundle all targets succeeds', () async {
|
||||
final DeferredComponentsProject project = DeferredComponentsProject(BasicDeferredComponentsConfig());
|
||||
await project.setUpIn(tempDir);
|
||||
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
|
||||
final ProcessResult result = await processManager.run(<String>[
|
||||
flutterBin,
|
||||
...getLocalEngineArguments(),
|
||||
'build',
|
||||
'appbundle',
|
||||
], workingDirectory: tempDir.path);
|
||||
|
||||
expect(result.stdout.toString(), contains('app-release.aab'));
|
||||
expect(result.stdout.toString(), contains('Deferred components prebuild validation passed.'));
|
||||
expect(result.stdout.toString(), contains('Deferred components gen_snapshot validation passed.'));
|
||||
|
||||
final String line = result.stdout.toString()
|
||||
.split('\n')
|
||||
.firstWhere((String line) => line.contains('app-release.aab'));
|
||||
|
||||
final String outputFilePath = line.split(' ')[2].trim();
|
||||
final File outputFile = fileSystem.file(fileSystem.path.join(tempDir.path, outputFilePath));
|
||||
expect(outputFile, exists);
|
||||
|
||||
final Archive archive = ZipDecoder().decodeBytes(outputFile.readAsBytesSync());
|
||||
|
||||
expect(archive.findFile('base/lib/arm64-v8a/libapp.so') != null, true);
|
||||
expect(archive.findFile('base/lib/arm64-v8a/libflutter.so') != null, true);
|
||||
expect(archive.findFile('component1/lib/arm64-v8a/libapp.so-2.part.so') != null, true);
|
||||
|
||||
expect(archive.findFile('base/lib/armeabi-v7a/libapp.so') != null, true);
|
||||
expect(archive.findFile('base/lib/armeabi-v7a/libflutter.so') != null, true);
|
||||
expect(archive.findFile('component1/lib/armeabi-v7a/libapp.so-2.part.so') != null, true);
|
||||
|
||||
expect(archive.findFile('base/lib/x86_64/libapp.so') != null, true);
|
||||
expect(archive.findFile('base/lib/x86_64/libflutter.so') != null, true);
|
||||
expect(archive.findFile('component1/lib/x86_64/libapp.so-2.part.so') != null, true);
|
||||
|
||||
expect(archive.findFile('component1/assets/flutter_assets/test_assets/asset2.txt') != null, true);
|
||||
expect(archive.findFile('base/assets/flutter_assets/test_assets/asset1.txt') != null, true);
|
||||
|
||||
expect(result.exitCode, 0);
|
||||
}, timeout: const Timeout(Duration(minutes: 3)));
|
||||
|
||||
testWithoutContext('simple build appbundle no-deferred-components succeeds', () async {
|
||||
final DeferredComponentsProject project = DeferredComponentsProject(BasicDeferredComponentsConfig());
|
||||
await project.setUpIn(tempDir);
|
||||
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
|
||||
final ProcessResult result = await processManager.run(<String>[
|
||||
flutterBin,
|
||||
...getLocalEngineArguments(),
|
||||
'build',
|
||||
'appbundle',
|
||||
'--no-deferred-components'
|
||||
], workingDirectory: tempDir.path);
|
||||
|
||||
expect(result.stdout.toString().contains('app-release.aab'), true);
|
||||
expect(result.stdout.toString().contains('Deferred components prebuild validation passed.'), false);
|
||||
expect(result.stdout.toString().contains('Deferred components gen_snapshot validation passed.'), false);
|
||||
|
||||
final String line = result.stdout.toString()
|
||||
.split('\n')
|
||||
.firstWhere((String line) => line.contains('app-release.aab'));
|
||||
|
||||
final String outputFilePath = line.split(' ')[2].trim();
|
||||
final File outputFile = fileSystem.file(fileSystem.path.join(tempDir.path, outputFilePath));
|
||||
expect(outputFile, exists);
|
||||
|
||||
final Archive archive = ZipDecoder().decodeBytes(outputFile.readAsBytesSync());
|
||||
|
||||
expect(archive.findFile('base/lib/arm64-v8a/libapp.so') != null, true);
|
||||
expect(archive.findFile('base/lib/arm64-v8a/libflutter.so') != null, true);
|
||||
expect(archive.findFile('component1/lib/arm64-v8a/libapp.so-2.part.so') != null, false);
|
||||
|
||||
expect(archive.findFile('base/lib/armeabi-v7a/libapp.so') != null, true);
|
||||
expect(archive.findFile('base/lib/armeabi-v7a/libflutter.so') != null, true);
|
||||
expect(archive.findFile('component1/lib/armeabi-v7a/libapp.so-2.part.so') != null, false);
|
||||
|
||||
expect(archive.findFile('base/lib/x86_64/libapp.so') != null, true);
|
||||
expect(archive.findFile('base/lib/x86_64/libflutter.so') != null, true);
|
||||
expect(archive.findFile('component1/lib/x86_64/libapp.so-2.part.so') != null, false);
|
||||
|
||||
// Asset 2 is merged into the base module assets.
|
||||
expect(archive.findFile('component1/assets/flutter_assets/test_assets/asset2.txt') != null, false);
|
||||
expect(archive.findFile('base/assets/flutter_assets/test_assets/asset2.txt') != null, true);
|
||||
expect(archive.findFile('base/assets/flutter_assets/test_assets/asset1.txt') != null, true);
|
||||
|
||||
expect(result.exitCode, 0);
|
||||
}, timeout: const Timeout(Duration(minutes: 3)));
|
||||
|
||||
testWithoutContext('simple build appbundle mismatched golden no-validate-deferred-components succeeds', () async {
|
||||
final DeferredComponentsProject project = DeferredComponentsProject(MismatchedGoldenDeferredComponentsConfig());
|
||||
await project.setUpIn(tempDir);
|
||||
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
|
||||
final ProcessResult result = await processManager.run(<String>[
|
||||
flutterBin,
|
||||
...getLocalEngineArguments(),
|
||||
'build',
|
||||
'appbundle',
|
||||
'--no-validate-deferred-components',
|
||||
], workingDirectory: tempDir.path);
|
||||
|
||||
expect(result.stdout.toString().contains('app-release.aab'), true);
|
||||
expect(result.stdout.toString().contains('Deferred components prebuild validation passed.'), false);
|
||||
expect(result.stdout.toString().contains('Deferred components gen_snapshot validation passed.'), false);
|
||||
|
||||
expect(result.stdout.toString().contains('New loading units were found:'), false);
|
||||
expect(result.stdout.toString().contains('Previously existing loading units no longer exist:'), false);
|
||||
|
||||
final String line = result.stdout.toString()
|
||||
.split('\n')
|
||||
.firstWhere((String line) => line.contains('app-release.aab'));
|
||||
|
||||
final String outputFilePath = line.split(' ')[2].trim();
|
||||
final File outputFile = fileSystem.file(fileSystem.path.join(tempDir.path, outputFilePath));
|
||||
expect(outputFile, exists);
|
||||
|
||||
final Archive archive = ZipDecoder().decodeBytes(outputFile.readAsBytesSync());
|
||||
|
||||
expect(archive.findFile('base/lib/arm64-v8a/libapp.so') != null, true);
|
||||
expect(archive.findFile('base/lib/arm64-v8a/libflutter.so') != null, true);
|
||||
expect(archive.findFile('component1/lib/arm64-v8a/libapp.so-2.part.so') != null, true);
|
||||
|
||||
expect(archive.findFile('base/lib/armeabi-v7a/libapp.so') != null, true);
|
||||
expect(archive.findFile('base/lib/armeabi-v7a/libflutter.so') != null, true);
|
||||
expect(archive.findFile('component1/lib/armeabi-v7a/libapp.so-2.part.so') != null, true);
|
||||
|
||||
expect(archive.findFile('base/lib/x86_64/libapp.so') != null, true);
|
||||
expect(archive.findFile('base/lib/x86_64/libflutter.so') != null, true);
|
||||
expect(archive.findFile('component1/lib/x86_64/libapp.so-2.part.so') != null, true);
|
||||
|
||||
expect(archive.findFile('component1/assets/flutter_assets/test_assets/asset2.txt') != null, true);
|
||||
expect(archive.findFile('base/assets/flutter_assets/test_assets/asset1.txt') != null, true);
|
||||
|
||||
expect(result.exitCode, 0);
|
||||
}, timeout: const Timeout(Duration(minutes: 3)));
|
||||
|
||||
testWithoutContext('simple build appbundle missing android dynamic feature module fails', () async {
|
||||
final DeferredComponentsProject project = DeferredComponentsProject(NoAndroidDynamicFeatureModuleDeferredComponentsConfig());
|
||||
await project.setUpIn(tempDir);
|
||||
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
|
||||
final ProcessResult result = await processManager.run(<String>[
|
||||
flutterBin,
|
||||
...getLocalEngineArguments(),
|
||||
'build',
|
||||
'appbundle',
|
||||
], workingDirectory: tempDir.path);
|
||||
|
||||
expect(result.stdout.toString().contains('app-release.aab'), false);
|
||||
expect(result.stdout.toString().contains('Deferred components prebuild validation passed.'), false);
|
||||
expect(result.stdout.toString().contains('Deferred components gen_snapshot validation passed.'), false);
|
||||
|
||||
expect(result.stdout.toString(), contains('Newly generated android files:'));
|
||||
final String pathSeparator = fileSystem.path.separator;
|
||||
expect(result.stdout.toString(), contains('build${pathSeparator}android_deferred_components_setup_files${pathSeparator}component1${pathSeparator}build.gradle'));
|
||||
expect(result.stdout.toString(), contains('build${pathSeparator}android_deferred_components_setup_files${pathSeparator}component1${pathSeparator}src${pathSeparator}main${pathSeparator}AndroidManifest.xml'));
|
||||
|
||||
expect(result.exitCode, 1);
|
||||
});
|
||||
|
||||
testWithoutContext('simple build appbundle missing golden fails', () async {
|
||||
final DeferredComponentsProject project = DeferredComponentsProject(NoGoldenDeferredComponentsConfig());
|
||||
await project.setUpIn(tempDir);
|
||||
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
|
||||
final ProcessResult result = await processManager.run(<String>[
|
||||
flutterBin,
|
||||
...getLocalEngineArguments(),
|
||||
'build',
|
||||
'appbundle',
|
||||
], workingDirectory: tempDir.path);
|
||||
|
||||
expect(result.stdout.toString().contains('app-release.aab'), false);
|
||||
expect(result.stdout.toString().contains('Deferred components prebuild validation passed.'), true);
|
||||
expect(result.stdout.toString().contains('Deferred components gen_snapshot validation passed.'), false);
|
||||
|
||||
expect(result.stdout.toString(), contains('New loading units were found:'));
|
||||
expect(result.stdout.toString(), contains('- package:test/deferred_library.dart'));
|
||||
|
||||
expect(result.stdout.toString().contains('Previously existing loading units no longer exist:'), false);
|
||||
|
||||
expect(result.exitCode, 1);
|
||||
});
|
||||
|
||||
testWithoutContext('simple build appbundle mismatched golden fails', () async {
|
||||
final DeferredComponentsProject project = DeferredComponentsProject(MismatchedGoldenDeferredComponentsConfig());
|
||||
await project.setUpIn(tempDir);
|
||||
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
|
||||
final ProcessResult result = await processManager.run(<String>[
|
||||
flutterBin,
|
||||
...getLocalEngineArguments(),
|
||||
'build',
|
||||
'appbundle',
|
||||
], workingDirectory: tempDir.path);
|
||||
|
||||
expect(result.stdout.toString().contains('app-release.aab'), false);
|
||||
expect(result.stdout.toString().contains('Deferred components prebuild validation passed.'), true);
|
||||
expect(result.stdout.toString().contains('Deferred components gen_snapshot validation passed.'), false);
|
||||
|
||||
expect(result.stdout.toString(), contains('New loading units were found:'));
|
||||
expect(result.stdout.toString(), contains('- package:test/deferred_library.dart'));
|
||||
|
||||
expect(result.stdout.toString(), contains('Previously existing loading units no longer exist:'));
|
||||
expect(result.stdout.toString(), contains('- package:test/invalid_lib_name.dart'));
|
||||
|
||||
expect(result.stdout.toString(), contains('This loading unit check will not fail again on the next build attempt'));
|
||||
|
||||
expect(result.exitCode, 1);
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// @dart = 2.8
|
||||
|
||||
import 'package:file/file.dart';
|
||||
|
||||
import '../test_utils.dart';
|
||||
|
||||
abstract class DeferredComponentsConfig {
|
||||
String get deferredLibrary;
|
||||
String get deferredComponentsGolden;
|
||||
String get androidSettings;
|
||||
String get androidBuild;
|
||||
String get androidLocalProperties;
|
||||
String get androidGradleProperties;
|
||||
String get androidKeyProperties;
|
||||
List<int> get androidKey;
|
||||
String get appBuild;
|
||||
String get appManifest;
|
||||
String get appStrings;
|
||||
String get appStyles;
|
||||
String get appLaunchBackground;
|
||||
String get asset1;
|
||||
String get asset2;
|
||||
List<DeferredComponentModule> get deferredComponents;
|
||||
|
||||
void setUpIn(Directory dir) {
|
||||
if (deferredLibrary != null) {
|
||||
writeFile(fileSystem.path.join(dir.path, 'lib', 'deferred_library.dart'), deferredLibrary);
|
||||
}
|
||||
if (deferredComponentsGolden != null) {
|
||||
writeFile(fileSystem.path.join(dir.path, 'deferred_components_loading_units.yaml'), deferredComponentsGolden);
|
||||
}
|
||||
if (androidSettings != null) {
|
||||
writeFile(fileSystem.path.join(dir.path, 'android', 'settings.gradle'), androidSettings);
|
||||
}
|
||||
if (androidBuild != null) {
|
||||
writeFile(fileSystem.path.join(dir.path, 'android', 'build.gradle'), androidBuild);
|
||||
}
|
||||
if (androidLocalProperties != null) {
|
||||
writeFile(fileSystem.path.join(dir.path, 'android', 'local.properties'), androidLocalProperties);
|
||||
}
|
||||
if (androidGradleProperties != null) {
|
||||
writeFile(fileSystem.path.join(dir.path, 'android', 'gradle.properties'), androidGradleProperties);
|
||||
}
|
||||
if (androidKeyProperties != null) {
|
||||
writeFile(fileSystem.path.join(dir.path, 'android', 'key.properties'), androidKeyProperties);
|
||||
}
|
||||
if (androidKey != null) {
|
||||
writeBytesFile(fileSystem.path.join(dir.path, 'android', 'app', 'key.jks'), androidKey);
|
||||
}
|
||||
if (appBuild != null) {
|
||||
writeFile(fileSystem.path.join(dir.path, 'android', 'app', 'build.gradle'), appBuild);
|
||||
}
|
||||
if (appManifest != null) {
|
||||
writeFile(fileSystem.path.join(dir.path, 'android', 'app', 'src', 'main', 'AndroidManifest.xml'), appManifest);
|
||||
}
|
||||
if (appStrings != null) {
|
||||
writeFile(fileSystem.path.join(dir.path, 'android', 'app', 'src', 'main', 'res', 'values', 'strings.xml'), appStrings);
|
||||
}
|
||||
if (appStyles != null) {
|
||||
writeFile(fileSystem.path.join(dir.path, 'android', 'app', 'src', 'main', 'res', 'values', 'styles.xml'), appStyles);
|
||||
}
|
||||
if (appLaunchBackground != null) {
|
||||
writeFile(fileSystem.path.join(dir.path, 'android', 'app', 'src', 'main', 'res', 'drawable', 'launch_background.xml'), appLaunchBackground);
|
||||
}
|
||||
if (asset1 != null) {
|
||||
writeFile(fileSystem.path.join(dir.path, 'test_assets/asset1.txt'), asset1);
|
||||
}
|
||||
if (asset2 != null) {
|
||||
writeFile(fileSystem.path.join(dir.path, 'test_assets/asset2.txt'), asset2);
|
||||
}
|
||||
if (deferredComponents != null) {
|
||||
for (final DeferredComponentModule component in deferredComponents) {
|
||||
component.setUpIn(dir);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class DeferredComponentModule {
|
||||
DeferredComponentModule(this.name);
|
||||
|
||||
String name;
|
||||
|
||||
void setUpIn(Directory dir) {
|
||||
if (name != null) {
|
||||
writeFile(fileSystem.path.join(dir.path, 'android', name, 'build.gradle'), r'''
|
||||
def localProperties = new Properties()
|
||||
def localPropertiesFile = rootProject.file('local.properties')
|
||||
if (localPropertiesFile.exists()) {
|
||||
localPropertiesFile.withReader('UTF-8') { reader ->
|
||||
localProperties.load(reader)
|
||||
}
|
||||
}
|
||||
|
||||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
||||
if (flutterVersionCode == null) {
|
||||
flutterVersionCode = '1'
|
||||
}
|
||||
|
||||
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
||||
if (flutterVersionName == null) {
|
||||
flutterVersionName = '1.0'
|
||||
}
|
||||
|
||||
apply plugin: "com.android.dynamic-feature"
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
|
||||
sourceSets {
|
||||
applicationVariants.all { variant ->
|
||||
main.assets.srcDirs += "${project.buildDir}/intermediates/flutter/${variant.name}/deferred_assets"
|
||||
main.jniLibs.srcDirs += "${project.buildDir}/intermediates/flutter/${variant.name}/deferred_libs"
|
||||
}
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 30
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility 1.8
|
||||
targetCompatibility 1.8
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(":app")
|
||||
}
|
||||
''');
|
||||
|
||||
writeFile(fileSystem.path.join(dir.path, 'android', name, 'src', 'main', 'AndroidManifest.xml'), '''
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:dist="http://schemas.android.com/apk/distribution"
|
||||
package="com.example.$name">
|
||||
|
||||
<dist:module
|
||||
dist:instant="false"
|
||||
dist:title="@string/component1Name">
|
||||
<dist:delivery>
|
||||
<dist:on-demand />
|
||||
</dist:delivery>
|
||||
<dist:fusing dist:include="true" />
|
||||
</dist:module>
|
||||
</manifest>
|
||||
''');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,619 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// @dart = 2.8
|
||||
|
||||
import '../../src/common.dart';
|
||||
import 'deferred_components_config.dart';
|
||||
import 'project.dart';
|
||||
|
||||
class DeferredComponentsProject extends Project {
|
||||
DeferredComponentsProject(this.deferredComponents);
|
||||
|
||||
@override
|
||||
final String pubspec = '''
|
||||
name: test
|
||||
environment:
|
||||
sdk: ">=2.12.0-0 <3.0.0"
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
flutter:
|
||||
assets:
|
||||
- test_assets/asset1.txt
|
||||
deferred-components:
|
||||
- name: component1
|
||||
libraries:
|
||||
- package:test/deferred_library.dart
|
||||
assets:
|
||||
- test_assets/asset2.txt
|
||||
''';
|
||||
|
||||
@override
|
||||
final String main = r'''
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'deferred_library.dart' deferred as DeferredLibrary;
|
||||
|
||||
Future<void>? libFuture;
|
||||
String deferredText = 'incomplete';
|
||||
|
||||
Future<void> main() async {
|
||||
while (true) {
|
||||
if (libFuture == null) {
|
||||
libFuture = DeferredLibrary.loadLibrary();
|
||||
libFuture?.whenComplete(() => deferredText = 'complete ${DeferredLibrary.add(10, 42)}');
|
||||
}
|
||||
runApp(new MyApp());
|
||||
await Future.delayed(const Duration(milliseconds: 50));
|
||||
}
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
topLevelFunction();
|
||||
return new MaterialApp( // BUILD BREAKPOINT
|
||||
title: 'Flutter Demo',
|
||||
home: new Container(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
topLevelFunction() {
|
||||
print(deferredText); // TOP LEVEL BREAKPOINT
|
||||
}
|
||||
''';
|
||||
|
||||
@override
|
||||
final DeferredComponentsConfig deferredComponents;
|
||||
}
|
||||
|
||||
/// Contains the necessary files for a bare-bones deferred component release app.
|
||||
class BasicDeferredComponentsConfig extends DeferredComponentsConfig {
|
||||
@override
|
||||
String get deferredLibrary => r'''
|
||||
library DeferredLibrary;
|
||||
|
||||
int add(int i, int j) {
|
||||
return i + j;
|
||||
}
|
||||
''';
|
||||
|
||||
@override
|
||||
String get deferredComponentsGolden => r'''
|
||||
loading-units:
|
||||
- id: 2
|
||||
libraries:
|
||||
- package:test/deferred_library.dart
|
||||
''';
|
||||
|
||||
@override
|
||||
String get androidSettings => r'''
|
||||
include ':app', ':component1'
|
||||
|
||||
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
|
||||
def properties = new Properties()
|
||||
|
||||
assert localPropertiesFile.exists()
|
||||
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
|
||||
|
||||
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
||||
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
|
||||
''';
|
||||
|
||||
@override
|
||||
String get androidBuild => r'''
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.3.50'
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.1.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.buildDir = '../build'
|
||||
subprojects {
|
||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||
}
|
||||
subprojects {
|
||||
project.evaluationDependsOn(':app')
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
''';
|
||||
|
||||
@override
|
||||
String get appBuild => r'''
|
||||
def localProperties = new Properties()
|
||||
def localPropertiesFile = rootProject.file('local.properties')
|
||||
if (localPropertiesFile.exists()) {
|
||||
localPropertiesFile.withReader('UTF-8') { reader ->
|
||||
localProperties.load(reader)
|
||||
}
|
||||
}
|
||||
|
||||
def flutterRoot = localProperties.getProperty('flutter.sdk')
|
||||
if (flutterRoot == null) {
|
||||
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
||||
}
|
||||
|
||||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
||||
if (flutterVersionCode == null) {
|
||||
flutterVersionCode = '1'
|
||||
}
|
||||
|
||||
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
||||
if (flutterVersionName == null) {
|
||||
flutterVersionName = '1.0'
|
||||
}
|
||||
|
||||
def keystoreProperties = new Properties()
|
||||
def keystorePropertiesFile = rootProject.file('key.properties')
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
disable 'InvalidPackage'
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "ninja.qian.splitaottest1"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 30
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
}
|
||||
signingConfigs {
|
||||
release {
|
||||
keyAlias keystoreProperties['keyAlias']
|
||||
keyPassword keystoreProperties['keyPassword']
|
||||
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
|
||||
storePassword keystoreProperties['storePassword']
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
source '../..'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation "com.google.android.play:core:1.8.0"
|
||||
}
|
||||
|
||||
''';
|
||||
|
||||
@override
|
||||
String get androidLocalProperties => '''
|
||||
flutter.sdk=${getFlutterRoot()}
|
||||
flutter.buildMode=release
|
||||
flutter.versionName=1.0.0
|
||||
flutter.versionCode=22
|
||||
''';
|
||||
|
||||
@override
|
||||
String get androidGradleProperties => '''
|
||||
org.gradle.jvmargs=-Xmx1536M
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
android.enableR8=true
|
||||
android.experimental.enableNewResourceShrinker=true
|
||||
''';
|
||||
|
||||
@override
|
||||
String get androidKeyProperties => '''
|
||||
storePassword=123456
|
||||
keyPassword=123456
|
||||
keyAlias=test_release_key
|
||||
storeFile=key.jks
|
||||
''';
|
||||
|
||||
// This is a test jks keystore, generated for testing use only. Do not use this key in an actual
|
||||
// application.
|
||||
@override
|
||||
final List<int> androidKey = <int>[
|
||||
0xfe, 0xed, 0xfe, 0xed, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01,
|
||||
0x00, 0x10, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x6b,
|
||||
0x65, 0x79, 0x00, 0x00, 0x01, 0x77, 0x87, 0xc9, 0x8c, 0x4f, 0x00, 0x00, 0x05, 0x00, 0x30, 0x82,
|
||||
0x04, 0xfc, 0x30, 0x0e, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x2a, 0x02, 0x11, 0x01, 0x01,
|
||||
0x05, 0x00, 0x04, 0x82, 0x04, 0xe8, 0xe2, 0xca, 0x1f, 0xd5, 0x47, 0xf1, 0x6a, 0x4a, 0xc5, 0xf8,
|
||||
0x0b, 0xc1, 0x11, 0x36, 0xfc, 0xb3, 0x25, 0xb3, 0x54, 0x34, 0x53, 0x2c, 0x71, 0x81, 0xd6, 0x64,
|
||||
0x54, 0xef, 0x5f, 0x85, 0x27, 0xbe, 0xe5, 0x0a, 0x08, 0xc0, 0x76, 0x2d, 0xec, 0xbf, 0x82, 0x9f,
|
||||
0xf9, 0xf0, 0xb3, 0x20, 0x86, 0x9b, 0x25, 0x01, 0x02, 0x15, 0xa8, 0x78, 0x53, 0xd9, 0x97, 0xb8,
|
||||
0x15, 0x84, 0xad, 0x21, 0xe7, 0x04, 0x01, 0x53, 0xc0, 0x8f, 0x14, 0x0c, 0x45, 0xe0, 0x7a, 0x4e,
|
||||
0x95, 0x4e, 0xa9, 0xcd, 0x23, 0xbf, 0x78, 0xcd, 0x10, 0xd3, 0x09, 0xec, 0xfd, 0x64, 0x8d, 0xec,
|
||||
0xe8, 0x02, 0x3e, 0x5a, 0x04, 0x0b, 0xd3, 0x57, 0x66, 0xb9, 0xd0, 0x28, 0xcf, 0x28, 0x04, 0x6e,
|
||||
0x45, 0x67, 0x81, 0xb9, 0x1a, 0x64, 0xd6, 0x05, 0xf5, 0x3d, 0x90, 0x8e, 0x2d, 0x52, 0x95, 0x51,
|
||||
0x5c, 0x26, 0xcc, 0x43, 0x86, 0x7f, 0x07, 0x8c, 0xf8, 0x06, 0x25, 0xff, 0x53, 0xb4, 0x2b, 0x87,
|
||||
0xef, 0x93, 0xac, 0x99, 0xc3, 0x35, 0x6e, 0x1c, 0xf0, 0x9f, 0xb1, 0xda, 0x30, 0x88, 0x1a, 0x50,
|
||||
0xa5, 0x53, 0x39, 0xef, 0x4b, 0x5c, 0xc7, 0x72, 0xc6, 0xe2, 0xf6, 0x2e, 0xf3, 0xcc, 0xc8, 0xd8,
|
||||
0x80, 0xe5, 0x64, 0x45, 0xcb, 0xcc, 0x8c, 0x93, 0x7e, 0x00, 0x49, 0x3f, 0x27, 0xd8, 0xa1, 0xb2,
|
||||
0xa4, 0x7c, 0xc7, 0x39, 0xc9, 0x27, 0x1a, 0x2e, 0xca, 0x88, 0x7f, 0xf1, 0xf1, 0xad, 0x68, 0xb9,
|
||||
0x6b, 0xd8, 0xfe, 0xf1, 0xda, 0xad, 0x2d, 0xb2, 0x08, 0x33, 0x42, 0x12, 0x4b, 0x1f, 0x93, 0x17,
|
||||
0x7d, 0x50, 0xba, 0x68, 0x86, 0xdd, 0x61, 0x74, 0x0c, 0xed, 0x55, 0x60, 0x90, 0x01, 0x93, 0x11,
|
||||
0x13, 0xc2, 0x39, 0x78, 0xf6, 0xa4, 0x28, 0x8f, 0xa6, 0x63, 0x35, 0x28, 0xbd, 0xa1, 0x95, 0xc5,
|
||||
0x31, 0xa2, 0xae, 0x59, 0x67, 0x58, 0x08, 0x57, 0x45, 0xf3, 0x27, 0xfe, 0x83, 0x6a, 0xb3, 0x56,
|
||||
0x2c, 0x9b, 0xae, 0xf7, 0x78, 0x88, 0x88, 0xd4, 0xbe, 0x67, 0x11, 0x6a, 0x64, 0x39, 0x99, 0xaf,
|
||||
0xad, 0xc5, 0xd6, 0x3e, 0x30, 0x91, 0xee, 0x94, 0xdc, 0x50, 0x33, 0x57, 0x80, 0x1c, 0x4d, 0x80,
|
||||
0xda, 0x07, 0xea, 0x8c, 0x37, 0x26, 0x0e, 0xfe, 0xbc, 0x8c, 0x7a, 0xf7, 0x33, 0x3b, 0x85, 0x7c,
|
||||
0xc9, 0xf6, 0x44, 0x15, 0xc1, 0xa6, 0x95, 0x1e, 0x3e, 0x4a, 0x70, 0xb1, 0x31, 0xae, 0x1f, 0x61,
|
||||
0xad, 0x59, 0xc3, 0xc9, 0xa2, 0x0e, 0x11, 0xb8, 0x25, 0x84, 0x90, 0x66, 0x0c, 0x4b, 0x4a, 0xf4,
|
||||
0xec, 0xc0, 0x6a, 0x95, 0x81, 0x22, 0xfc, 0xd1, 0xda, 0xd0, 0x4f, 0x8a, 0x39, 0x6f, 0x24, 0x49,
|
||||
0xd7, 0xa6, 0x82, 0xbd, 0x8d, 0x5e, 0xbd, 0xe2, 0x69, 0x9b, 0xb4, 0xde, 0x37, 0x6a, 0x02, 0x7e,
|
||||
0x40, 0x8c, 0x3c, 0x34, 0x97, 0xfd, 0xc9, 0xc5, 0x75, 0x74, 0xa5, 0x04, 0x93, 0xa4, 0x04, 0x64,
|
||||
0x9f, 0xfd, 0xe2, 0x57, 0x63, 0x11, 0x5e, 0x51, 0x25, 0x36, 0xcc, 0x25, 0xe0, 0xda, 0x6d, 0x82,
|
||||
0xfe, 0xd2, 0x7b, 0x40, 0x82, 0x33, 0x69, 0xb0, 0xe8, 0x91, 0xb7, 0x23, 0xac, 0x22, 0x85, 0x98,
|
||||
0x3e, 0x02, 0x81, 0xa5, 0x4e, 0xaf, 0x99, 0xf1, 0x1b, 0x73, 0x38, 0xcd, 0x4c, 0xaa, 0x33, 0xdc,
|
||||
0x49, 0xd6, 0xf7, 0xdc, 0xa6, 0x59, 0x38, 0x67, 0x89, 0x78, 0x26, 0x8e, 0x1c, 0xee, 0xbe, 0x8b,
|
||||
0x6c, 0xae, 0xcf, 0x26, 0x67, 0x2a, 0xe6, 0xbe, 0x24, 0xc3, 0x6f, 0x2b, 0x1a, 0xcf, 0xb6, 0xd0,
|
||||
0x82, 0x58, 0x05, 0x44, 0x19, 0x91, 0xfb, 0x9f, 0x53, 0x14, 0x4a, 0xf5, 0x84, 0x54, 0x57, 0x8e,
|
||||
0xcc, 0xec, 0x6f, 0x29, 0xdd, 0xa6, 0x38, 0xa4, 0x17, 0x0e, 0x86, 0x63, 0x62, 0xd6, 0x43, 0x1c,
|
||||
0xd5, 0xee, 0x93, 0x35, 0x2f, 0x66, 0x35, 0xc8, 0x33, 0x5c, 0x2b,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x2a, 0x54, 0x89, 0xc7, 0x70, 0x48, 0x3e, 0xf1, 0xc8, 0x01, 0x87,
|
||||
0x67, 0x35, 0xdb, 0x0f, 0x08, 0x82, 0x62, 0x53, 0xb5, 0x7b, 0xcb, 0xc5, 0x60, 0x85, 0x56, 0xc0,
|
||||
0xda, 0xed, 0x1b, 0x06, 0x02, 0xfc, 0xa9, 0x55, 0x99, 0x71, 0x54, 0x88, 0xd7, 0x33, 0xb4, 0xce,
|
||||
0x85, 0x2f, 0x24, 0x82, 0x80, 0xb3, 0xca, 0x56, 0x33, 0x3b, 0x5a, 0x2a, 0xd5, 0xed, 0xbb, 0x6b,
|
||||
0xc9, 0xc1, 0x26, 0x93, 0x51, 0xe2, 0x01, 0x88, 0x39, 0xe4, 0xe7, 0x56, 0xd3, 0x0f, 0x5d, 0xe9,
|
||||
0xfd, 0xcd, 0xeb, 0x13, 0xd6, 0xa0, 0xe3, 0x6c, 0x57, 0x50, 0x09, 0xe8, 0xb2, 0xd4, 0x47, 0xd9,
|
||||
0x0c, 0x3e, 0xac, 0xee, 0x65, 0x53, 0x8d, 0x00, 0x95, 0x90, 0x58, 0x94, 0x32, 0x1a, 0x32, 0xe2,
|
||||
0xe2, 0xc9, 0x66, 0x6d, 0xc8, 0xf2, 0x1e, 0x70, 0xe5, 0xaa, 0xa6, 0x48, 0xad, 0x4a, 0xaf, 0x2a,
|
||||
0x97, 0x59, 0x5e, 0x79, 0xec, 0xdf, 0x1f, 0xe1, 0x37, 0xb5, 0x48, 0x6f, 0x0e, 0xab, 0xce, 0x29,
|
||||
0x32, 0x99, 0x8d, 0xe0, 0xc9, 0x73, 0xba, 0x76, 0xa1, 0x25, 0xd8, 0x98, 0x19, 0x67, 0x87, 0x24,
|
||||
0x00, 0xbb, 0x52, 0x15, 0x41, 0x28, 0x56, 0x1a, 0x6c, 0xb5, 0xbc, 0x4c, 0xcc, 0x17, 0x8a, 0xc7,
|
||||
0x1b, 0xc9, 0xea, 0x31, 0xbb, 0x68,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0x10, 0x18, 0xe5, 0x10, 0x97, 0x47, 0xe9, 0x2e, 0x65, 0xd3, 0x9e, 0x44,
|
||||
0x1b, 0xaf, 0x36, 0x60, 0xcf, 0xe2, 0x1a, 0x6b, 0xbe, 0x7b, 0x1f, 0x80, 0xdd, 0x5c, 0x10, 0x5c,
|
||||
0x89, 0x23, 0xba, 0xa1, 0x98, 0xcc, 0x88, 0x74, 0xbf, 0x26, 0x4c, 0x0c, 0xa5, 0xc7, 0x00, 0x00,
|
||||
0x00, 0x01, 0x00, 0x05, 0x58, 0x2e, 0x35, 0x30, 0x39, 0x00, 0x00, 0x03, 0x7f, 0x30, 0x82, 0x03,
|
||||
0x7b, 0x30, 0x82, 0x02, 0x63, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x04, 0x22, 0x12, 0x53, 0x46,
|
||||
0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30,
|
||||
0x6d, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x13,
|
||||
0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x0a, 0x43, 0x61, 0x6c, 0x69, 0x66, 0x6f, 0x72,
|
||||
0x6e, 0x69, 0x61, 0x31, 0x16, 0x30, 0x14, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x0d, 0x4d, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x56, 0x69, 0x65, 0x77, 0x31, 0x10, 0x30, 0x0e, 0x06,
|
||||
0x03, 0x55, 0x04, 0x0a, 0x13, 0x07, 0x46, 0x6c, 0x75, 0x74, 0x74, 0x65, 0x72, 0x31, 0x10, 0x30,
|
||||
0x0e, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x07, 0x46, 0x6c, 0x75, 0x74, 0x74, 0x65, 0x72, 0x31,
|
||||
0x0d, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x04, 0x44, 0x61, 0x73, 0x68, 0x30, 0x20,
|
||||
0x17, 0x0d, 0x32, 0x31, 0x30, 0x32, 0x30, 0x39, 0x31, 0x37, 0x31, 0x34, 0x32, 0x37, 0x5a, 0x18,
|
||||
0x0f, 0x32, 0x32, 0x39, 0x34, 0x31, 0x31, 0x32, 0x35, 0x31, 0x37, 0x31, 0x34, 0x32, 0x37, 0x5a,
|
||||
0x30, 0x6d, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31,
|
||||
0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x0a, 0x43, 0x61, 0x6c, 0x69, 0x66, 0x6f,
|
||||
0x72, 0x6e, 0x69, 0x61, 0x31, 0x16, 0x30, 0x14, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x0d, 0x4d,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x56, 0x69, 0x65, 0x77, 0x31, 0x10, 0x30, 0x0e,
|
||||
0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x07, 0x46, 0x6c, 0x75, 0x74, 0x74, 0x65, 0x72, 0x31, 0x10,
|
||||
0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x07, 0x46, 0x6c, 0x75, 0x74, 0x74, 0x65, 0x72,
|
||||
0x31, 0x0d, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x04, 0x44, 0x61, 0x73, 0x68, 0x30,
|
||||
0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
|
||||
0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00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x6f, 0x02, 0x85, 0x33, 0x95, 0xbe, 0x86, 0xee, 0x6d, 0x4d, 0x75,
|
||||
0x0f, 0x64, 0xfe, 0x9d, 0xa1, 0x3f, 0x53, 0x1b, 0xa1, 0xeb, 0x7b, 0xe6, 0xdd, 0xa1, 0x0a, 0x38,
|
||||
0xad, 0xce, 0xa3, 0x66, 0xda, 0x51, 0x38, 0xf3, 0x33, 0x3d, 0x96, 0x06, 0xa5, 0x0e, 0xa7, 0xfd,
|
||||
0xb2, 0x7b, 0xd5, 0x21, 0x1a, 0x35, 0x76, 0x25, 0x95, 0x97, 0xd6, 0xd2, 0xfe, 0xbd, 0x86, 0x22,
|
||||
0x05, 0xa3, 0x7d, 0x67, 0x60, 0x86, 0x04, 0xc3, 0xa5, 0xd3, 0xb7, 0x40, 0x0c, 0x31, 0x30, 0xc8,
|
||||
0x93, 0xb7, 0x61, 0xb3, 0x68, 0x90, 0x9d, 0xa0, 0x49, 0x79, 0x9b, 0xc1, 0x9c, 0x47, 0xa8, 0x81,
|
||||
0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x21, 0x30, 0x1f, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e,
|
||||
0x04, 0x16, 0x04, 0x14, 0x71, 0x50, 0x13, 0x2c, 0x3e, 0xaa, 0xfc, 0x7e, 0x6d, 0x16, 0x18, 0xc0,
|
||||
0x6f, 0x32, 0x2e, 0xf0, 0xe1, 0x03, 0x46, 0x94, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86,
|
||||
0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01, 0x01, 0x00, 0x24, 0x98, 0xc6, 0xd6,
|
||||
0xab, 0xb3, 0x94, 0xa1, 0x5d, 0x50, 0x0a, 0x82, 0xf7, 0x1d, 0xf5, 0xdf, 0x93, 0xf2, 0xf2, 0xf2,
|
||||
0xe6, 0x2a, 0x28, 0x67, 0x06, 0x36, 0xf6, 0x1f, 0x8c, 0xa3, 0x41, 0x43, 0x98, 0xc4, 0x6a, 0xd0,
|
||||
0x14, 0x0b, 0x1b, 0x89, 0x75, 0xb1, 0xe5, 0x79, 0x2c, 0xe8, 0xfd, 0x6d, 0x77, 0x72, 0xaa, 0x06,
|
||||
0x15, 0xd3, 0xca, 0x95, 0xca, 0x7d, 0xd5, 0xce, 0xca, 0x5f, 0x88, 0xd2, 0x3c, 0x08, 0xd2, 0x83,
|
||||
0xed, 0x7a, 0x0d, 0x2f, 0x34, 0x37, 0x97, 0x75, 0xd1, 0x2c, 0xa6, 0x30, 0x68, 0x8e, 0x19, 0x23,
|
||||
0x3d, 0x22, 0x62, 0x73, 0x4e, 0xd5, 0x42, 0x09, 0x82, 0xb6, 0x06, 0x17, 0xb8, 0xb6, 0x08, 0x64,
|
||||
0x73, 0x93, 0x02, 0x87, 0xd4, 0xf6, 0xa6, 0xce, 0xad, 0xfd, 0xcc, 0x9f, 0x69, 0x8b, 0xa8, 0xb3,
|
||||
0x4a, 0x45, 0x9e, 0xad, 0xa7, 0xf2, 0xb5, 0x91, 0xc8, 0x61, 0x48, 0x95, 0x8b, 0x36, 0x3e, 0x2f,
|
||||
0x40, 0x80, 0x69, 0xab, 0x3d, 0x45, 0xe1, 0x60, 0x3a, 0xe8, 0x33, 0x06, 0x12, 0x1a, 0x7e, 0x6e,
|
||||
0x11, 0x01, 0xb9, 0x66, 0x1b, 0x61, 0xbf, 0x01, 0x6d, 0x1d, 0x33, 0x58, 0x9a, 0xdd, 0x12, 0xf8,
|
||||
0xc1, 0xa3, 0x71, 0x89, 0x72, 0xed, 0xf4, 0xb2, 0xf3, 0x39, 0xc3, 0xf1, 0xf1, 0xe3, 0xe1, 0x9b,
|
||||
0xce, 0xc7, 0x83, 0x80, 0x32, 0x76, 0x16, 0x8c, 0x95, 0x35, 0xc0, 0xe8, 0xae, 0x02, 0x1b, 0x05,
|
||||
0x21, 0x36, 0xed, 0x4a, 0x71, 0xe0, 0x18, 0x76, 0xaa, 0xb9, 0x98, 0x07, 0x35, 0x27, 0x9b, 0xf2,
|
||||
0x5d, 0xdc, 0x79, 0xe6, 0xaa, 0x4a, 0x01, 0x23, 0x7d, 0x6d, 0x21, 0xbd, 0x97, 0x1b, 0x41, 0x60,
|
||||
0x7c, 0xb7, 0xfa, 0x21, 0x48, 0x52, 0x22, 0x94, 0x2d, 0xb0, 0xef, 0x2d, 0xc3, 0xe2, 0xe6, 0x37,
|
||||
0x55, 0x9d, 0xd9, 0x4d, 0xdd, 0xdd, 0x25, 0x25, 0x6b, 0x13, 0xb6, 0xb0, 0x00, 0x00, 0x00, 0x01,
|
||||
0x00, 0x08, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x00, 0x00, 0x01, 0x77, 0x87, 0xc7,
|
||||
0x7b, 0x73, 0x00, 0x00, 0x02, 0xba, 0x30, 0x82, 0x02, 0xb6, 0x30, 0x0e, 0x06, 0x0a, 0x2b, 0x06,
|
||||
0x01, 0x04, 0x01, 0x2a, 0x02, 0x11, 0x01, 0x01, 0x05, 0x00, 0x04, 0x82, 0x02, 0xa2, 0x23, 0xce,
|
||||
0x04, 0x35, 0x63, 0x08, 0xa7, 0x0b, 0x42, 0x93, 0x53, 0x16, 0xa6, 0xbe, 0x54, 0xf2, 0xe4, 0x27,
|
||||
0x8d, 0xbb, 0x64, 0xe4, 0x23, 0xeb, 0x70, 0x6c, 0xd5, 0x28, 0xe7, 0x8b, 0x73, 0x68, 0xd0, 0x03,
|
||||
0xc5, 0x32, 0xfe, 0x4d, 0x80, 0xa5, 0xff, 0xcd, 0xf0, 0x5c, 0x31, 0xd1, 0xf0, 0xf1, 0xc7, 0x53,
|
||||
0xeb, 0xea, 0xa3, 0xb1, 0x07, 0xdc, 0x6b, 0x9a, 0xff, 0xcd, 0x36, 0x88, 0x83, 0x6c, 0x0a, 0xbf,
|
||||
0x85, 0x3a, 0x5d, 0xc4, 0x54, 0x0a, 0x63, 0xd6, 0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0x26, 0x9d, 0x25, 0x0f, 0x58, 0xb6, 0x3b, 0x48, 0x66, 0xb0, 0x1f, 0x40, 0x07,
|
||||
0x85, 0xd4, 0xc3, 0x61, 0x7a, 0xa5, 0x6b, 0xa1, 0x61, 0x09, 0x78, 0x03, 0x58, 0xfa, 0x52, 0xde,
|
||||
0xb4, 0xf2, 0xc7, 0x40, 0x94, 0x7b, 0x6c, 0x4f, 0xec, 0x5f, 0x17, 0xdf, 0x97, 0xd2, 0x95, 0xa6,
|
||||
0x94, 0x8b, 0xb7, 0xcf, 0x05, 0x3d, 0x9d, 0xcc, 0x55, 0x1e, 0x83, 0x79, 0xf9, 0xe6, 0x22, 0x8e,
|
||||
0xdd, 0x20, 0x22, 0x87, 0x3b, 0xb6, 0x79, 0xc9, 0xcf, 0x4c, 0x8f, 0xbb, 0x4e, 0x1f, 0xd6, 0xa5,
|
||||
0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x58, 0x2e, 0x35, 0x30, 0x39, 0x00, 0x00, 0x02, 0x7a, 0x30,
|
||||
0x82, 0x02, 0x76, 0x30, 0x82, 0x01, 0xdf, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x04, 0x44, 0xbb,
|
||||
0xd2, 0x52, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05,
|
||||
0x00, 0x30, 0x6d, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53,
|
||||
0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x0a, 0x43, 0x61, 0x6c, 0x69, 0x66,
|
||||
0x6f, 0x72, 0x6e, 0x69, 0x61, 0x31, 0x16, 0x30, 0x14, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x0d,
|
||||
0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x56, 0x69, 0x65, 0x77, 0x31, 0x10, 0x30,
|
||||
0x0e, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x07, 0x46, 0x6c, 0x75, 0x74, 0x74, 0x65, 0x72, 0x31,
|
||||
0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x07, 0x46, 0x6c, 0x75, 0x74, 0x74, 0x65,
|
||||
0x72, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x04, 0x44, 0x61, 0x73, 0x68,
|
||||
0x30, 0x20, 0x17, 0x0d, 0x32, 0x31, 0x30, 0x32, 0x30, 0x39, 0x31, 0x37, 0x31, 0x32, 0x31, 0x30,
|
||||
0x5a, 0x18, 0x0f, 0x34, 0x37, 0x35, 0x39, 0x30, 0x31, 0x30, 0x37, 0x31, 0x37, 0x31, 0x32, 0x31,
|
||||
0x30, 0x5a, 0x30, 0x6d, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55,
|
||||
0x53, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x0a, 0x43, 0x61, 0x6c, 0x69,
|
||||
0x66, 0x6f, 0x72, 0x6e, 0x69, 0x61, 0x31, 0x16, 0x30, 0x14, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13,
|
||||
0x0d, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x56, 0x69, 0x65, 0x77, 0x31, 0x10,
|
||||
0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x07, 0x46, 0x6c, 0x75, 0x74, 0x74, 0x65, 0x72,
|
||||
0x31, 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x07, 0x46, 0x6c, 0x75, 0x74, 0x74,
|
||||
0x65, 0x72, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x04, 0x44, 0x61, 0x73,
|
||||
0x68, 0x30, 0x81, 0x9f, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
|
||||
0x01, 0x05, 0x00, 0x03, 0x81, 0x8d, 0x00, 0x30, 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, 0xce, 0x0c,
|
||||
0xe2, 0x0c, 0xc5, 0xb8, 0x20, 0x93, 0xf7, 0x7a, 0x38, 0x3c, 0xb5, 0x52, 0x1c, 0x48, 0x1a, 0x44,
|
||||
0xba, 0xca, 0x88, 0xa0, 0xf0, 0xd6, 0xad, 0x91, 0x9e, 0x0c, 0x09, 0x64, 0xdd, 0x2d, 0x84, 0x0f,
|
||||
0x9e, 0xcb, 0xbb, 0xd9, 0x24, 0xd6, 0xd6, 0xaa, 0x63, 0x1c, 0xfa, 0xb6, 0x45, 0x88, 0xf4, 0x8e,
|
||||
0xb9, 0x2e, 0xe9, 0xa9, 0xed, 0x6b, 0xda, 0xc6, 0x6b, 0x91, 0x06, 0xf9, 0x0a, 0x71, 0x42, 0x2e,
|
||||
0x18, 0x97, 0x80, 0x0c, 0x84, 0xea, 0x69, 0x8f, 0xc0, 0xb0, 0xa8, 0x76, 0xfc, 0x31, 0x86, 0xf9,
|
||||
0x09, 0x7e, 0xa4, 0xff, 0x24, 0x94, 0x79, 0x29, 0xca, 0xd0, 0x9a, 0x07, 0xf3, 0x25, 0x21, 0xa7,
|
||||
0x61, 0x6e, 0x81, 0x1c, 0x13, 0x02, 0xc9, 0xec, 0xa4, 0x42, 0xcc, 0x6c, 0x95, 0x01, 0xe5, 0x51,
|
||||
0x8e, 0x4a, 0xb3, 0x0b, 0x29, 0xf1, 0x8a, 0x1c, 0xb5, 0xe1, 0x41, 0xb6, 0xe3, 0x3d, 0x02, 0x03,
|
||||
0x01, 0x00, 0x01, 0xa3, 0x21, 0x30, 0x1f, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16,
|
||||
0x04, 0x14, 0x5f, 0xf5, 0x0a, 0x1f, 0xe7, 0xf5, 0xde, 0xbd, 0x7c, 0x59, 0xdd, 0x94, 0x26, 0x39,
|
||||
0xf5, 0xc9, 0x21, 0x88, 0xbf, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d,
|
||||
0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x81, 0x81, 0x00, 0x17, 0x3d, 0x26, 0x25, 0xfb, 0xd1, 0x5b,
|
||||
0x9b, 0xd5, 0xed, 0x84, 0x4f, 0x06, 0xa3, 0x4c, 0x17, 0x6d, 0x91, 0xa9, 0x19, 0xc8, 0xa2, 0x1a,
|
||||
0x65, 0x4f, 0xf3, 0x23, 0x28, 0x18, 0x46, 0xe3, 0x77, 0x78, 0xae, 0x2c, 0x5a, 0xfa, 0x1a, 0x01,
|
||||
0x3b, 0x92, 0xa6, 0x7c, 0xee, 0x3c, 0xa0, 0x4c, 0x9e, 0xb1, 0x26, 0xed, 0x9e, 0x1b, 0x81, 0x40,
|
||||
0xa5, 0xce, 0xa8, 0xad, 0x09, 0xdd, 0x7c, 0x83, 0xc8, 0x1d, 0x1e, 0x6a, 0x3e, 0x60, 0x2e, 0x95,
|
||||
0xc6, 0x17, 0x5b, 0x88, 0x0b, 0x54, 0x48, 0x80, 0x95, 0x77, 0x78, 0xcc, 0x5e, 0x09, 0x9e, 0x66,
|
||||
0xe5, 0x87, 0x64, 0x4d, 0x36, 0x12, 0x40, 0xc4, 0x67, 0x78, 0xce, 0x38, 0x60, 0x24, 0xdf, 0x3c,
|
||||
0xc0, 0xbb, 0xf7, 0x7d, 0x2f, 0x66, 0x56, 0xfb, 0xfa, 0x75, 0x2a, 0xe5, 0x23, 0x7a, 0xad, 0x5c,
|
||||
0xef, 0x2d, 0xa1, 0xb6, 0x7c, 0xbd, 0xfa, 0xb3, 0xdc, 0x68, 0x55, 0xd1, 0xa0, 0xac, 0x8c, 0x06,
|
||||
0x62, 0x21, 0xe9, 0x7d, 0x64, 0xd0, 0x60, 0xb3, 0x12, 0x2e, 0x6a, 0x50, 0xf4
|
||||
];
|
||||
|
||||
@override
|
||||
String get appManifest => r'''
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.splitaot">
|
||||
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
|
||||
calls FlutterMain.startInitialization(this); in its onCreate method.
|
||||
In most cases you can leave this as-is, but you if you want to provide
|
||||
additional functionality it is fine to subclass or reimplement
|
||||
FlutterApplication and put your custom class here. -->
|
||||
<application
|
||||
android:name="io.flutter.app.FlutterPlayStoreSplitApplication"
|
||||
android:label="splitaot"
|
||||
android:extractNativeLibs="false">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
to determine the Window background behind the Flutter UI. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme"
|
||||
/>
|
||||
<!-- Displays an Android View that continues showing the launch screen
|
||||
Drawable until Flutter paints its first frame, then this splash
|
||||
screen fades out. A splash screen is useful to avoid any visual
|
||||
gap between the end of Android's launch screen and the painting of
|
||||
Flutter's first frame. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.SplashScreenDrawable"
|
||||
android:resource="@drawable/launch_background"
|
||||
/>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.engine.deferredcomponents.DeferredComponentManager.loadingUnitMapping"
|
||||
android:value="2:component1" />
|
||||
</application>
|
||||
</manifest>
|
||||
''';
|
||||
|
||||
@override
|
||||
String get appStrings => r'''
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="component1Name">component1</string>
|
||||
</resources>
|
||||
''';
|
||||
|
||||
@override
|
||||
String get appStyles => r'''
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
Flutter draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowBackground">@android:color/white</item>
|
||||
</style>
|
||||
</resources>
|
||||
''';
|
||||
|
||||
@override
|
||||
String get appLaunchBackground => r'''
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@android:color/white" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
||||
''';
|
||||
|
||||
@override
|
||||
String get asset1 => r'''
|
||||
asset 1 contents
|
||||
''';
|
||||
|
||||
@override
|
||||
String get asset2 => r'''
|
||||
asset 2 contents
|
||||
''';
|
||||
|
||||
@override
|
||||
List<DeferredComponentModule> get deferredComponents => <DeferredComponentModule>[DeferredComponentModule('component1')];
|
||||
}
|
||||
|
||||
/// Missing android dynamic feature module.
|
||||
class NoAndroidDynamicFeatureModuleDeferredComponentsConfig extends BasicDeferredComponentsConfig {
|
||||
@override
|
||||
List<DeferredComponentModule> get deferredComponents => <DeferredComponentModule>[];
|
||||
}
|
||||
|
||||
/// Missing golden
|
||||
class NoGoldenDeferredComponentsConfig extends BasicDeferredComponentsConfig {
|
||||
@override
|
||||
String get deferredComponentsGolden => null;
|
||||
}
|
||||
|
||||
/// Missing golden
|
||||
class MismatchedGoldenDeferredComponentsConfig extends BasicDeferredComponentsConfig {
|
||||
@override
|
||||
String get deferredComponentsGolden => r'''
|
||||
loading-units:
|
||||
- id: 2
|
||||
libraries:
|
||||
- package:test/invalid_lib_name.dart
|
||||
''';
|
||||
}
|
||||
@@ -7,6 +7,7 @@
|
||||
import 'package:file/file.dart';
|
||||
|
||||
import '../test_utils.dart';
|
||||
import 'deferred_components_config.dart';
|
||||
|
||||
const String _kDefaultHtml = '''
|
||||
<html>
|
||||
@@ -26,6 +27,7 @@ abstract class Project {
|
||||
String get main;
|
||||
String get test => null;
|
||||
String get generatedFile => null;
|
||||
DeferredComponentsConfig get deferredComponents => null;
|
||||
|
||||
Uri get mainDart => Uri.parse('package:test/main.dart');
|
||||
|
||||
@@ -41,6 +43,9 @@ abstract class Project {
|
||||
if (generatedFile != null) {
|
||||
writeFile(fileSystem.path.join(dir.path, '.dart_tool', 'flutter_gen', 'flutter_gen.dart'), generatedFile);
|
||||
}
|
||||
if (deferredComponents != null) {
|
||||
deferredComponents.setUpIn(dir);
|
||||
}
|
||||
writeFile(fileSystem.path.join(dir.path, 'web', 'index.html'), _kDefaultHtml);
|
||||
writePackages(dir.path);
|
||||
await getPackages(dir.path);
|
||||
|
||||
@@ -40,6 +40,13 @@ void writeFile(String path, String content) {
|
||||
..setLastModifiedSync(DateTime.now().add(const Duration(seconds: 10)));
|
||||
}
|
||||
|
||||
void writeBytesFile(String path, List<int> content) {
|
||||
fileSystem.file(path)
|
||||
..createSync(recursive: true)
|
||||
..writeAsBytesSync(content)
|
||||
..setLastModifiedSync(DateTime.now().add(const Duration(seconds: 10)));
|
||||
}
|
||||
|
||||
void writePackages(String folder) {
|
||||
writeFile(fileSystem.path.join(folder, '.packages'), '''
|
||||
test:${fileSystem.path.join(fileSystem.currentDirectory.path, 'lib')}/
|
||||
|
||||
@@ -35,6 +35,8 @@ class FakeAndroidBuilder implements AndroidBuilder {
|
||||
@required FlutterProject project,
|
||||
@required AndroidBuildInfo androidBuildInfo,
|
||||
@required String target,
|
||||
bool validateDeferredComponents = true,
|
||||
bool deferredComponentsEnabled = false,
|
||||
}) async {}
|
||||
}
|
||||
|
||||
|
||||
@@ -90,6 +90,15 @@ String getFlutterRoot() {
|
||||
return path.normalize(path.join(toolsPath, '..', '..'));
|
||||
}
|
||||
|
||||
/// Gets the path to the root of the Android SDK from the environment variable.
|
||||
String getAndroidSdkRoot() {
|
||||
const Platform platform = LocalPlatform();
|
||||
if (platform.environment.containsKey('ANDROID_SDK_ROOT')) {
|
||||
return platform.environment['ANDROID_SDK_ROOT'];
|
||||
}
|
||||
throw StateError('ANDROID_SDK_ROOT environment varible not set');
|
||||
}
|
||||
|
||||
CommandRunner<void> createTestCommandRunner([ FlutterCommand command ]) {
|
||||
final FlutterCommandRunner runner = TestFlutterCommandRunner();
|
||||
if (command != null) {
|
||||
|
||||
Reference in New Issue
Block a user