[native assets] Roll dependencies (#155432)
Rolls native deps to the latest version, and cleans up deprecated field from template. Tests: * All the unit and integration tests for native assets. The template and dependencies are exercised in the integration test. Since `package:native_assets_builder` already checks for having no static libraries as output, the custom check in flutter_tools is removed. The tests stubbing out the native assets builder exercising the custom check are also removed. (The integration tests now check for the error message from the native assets builder.)
This commit is contained in:
@@ -340,49 +340,6 @@ void main() {
|
||||
}
|
||||
}
|
||||
|
||||
testUsingContext('static libs not supported', overrides: <Type, Generator>{
|
||||
FeatureFlags: () => TestFeatureFlags(isNativeAssetsEnabled: true),
|
||||
ProcessManager: () => FakeProcessManager.empty(),
|
||||
}, () async {
|
||||
final File packageConfig = environment.projectDir.childFile('.dart_tool/package_config.json');
|
||||
await packageConfig.parent.create();
|
||||
await packageConfig.create();
|
||||
expect(
|
||||
() => dryRunNativeAssetsLinux(
|
||||
projectUri: projectUri,
|
||||
fileSystem: fileSystem,
|
||||
buildRunner: FakeNativeAssetsBuildRunner(
|
||||
packagesWithNativeAssetsResult: <Package>[
|
||||
Package('bar', projectUri),
|
||||
],
|
||||
buildDryRunResult: FakeNativeAssetsBuilderResult(
|
||||
assets: <AssetImpl>[
|
||||
NativeCodeAssetImpl(
|
||||
id: 'package:bar/bar.dart',
|
||||
linkMode: StaticLinkingImpl(),
|
||||
os: OSImpl.macOS,
|
||||
architecture: ArchitectureImpl.arm64,
|
||||
file: Uri.file('bar.a'),
|
||||
),
|
||||
NativeCodeAssetImpl(
|
||||
id: 'package:bar/bar.dart',
|
||||
linkMode: StaticLinkingImpl(),
|
||||
os: OSImpl.macOS,
|
||||
architecture: ArchitectureImpl.x64,
|
||||
file: Uri.file('bar.a'),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
throwsToolExit(
|
||||
message: 'Native asset(s) package:bar/bar.dart have their link mode set to '
|
||||
'static, but this is not yet supported. '
|
||||
'For more info see https://github.com/dart-lang/sdk/issues/49418.',
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
testUsingContext('Native assets dry run error', overrides: <Type, Generator>{
|
||||
FeatureFlags: () => TestFeatureFlags(isNativeAssetsEnabled: true),
|
||||
ProcessManager: () => FakeProcessManager.empty(),
|
||||
|
||||
@@ -541,51 +541,6 @@ void main() {
|
||||
}
|
||||
}
|
||||
|
||||
testUsingContext('static libs not supported', overrides: <Type, Generator>{
|
||||
FeatureFlags: () => TestFeatureFlags(isNativeAssetsEnabled: true),
|
||||
ProcessManager: () => FakeProcessManager.empty(),
|
||||
}, () async {
|
||||
final File packageConfig = environment.projectDir.childFile('.dart_tool/package_config.json');
|
||||
await packageConfig.parent.create();
|
||||
await packageConfig.create();
|
||||
expect(
|
||||
() => dryRunNativeAssetsMacOS(
|
||||
projectUri: projectUri,
|
||||
fileSystem: fileSystem,
|
||||
buildRunner: FakeNativeAssetsBuildRunner(
|
||||
packagesWithNativeAssetsResult: <Package>[
|
||||
Package('bar', projectUri),
|
||||
],
|
||||
buildDryRunResult: FakeNativeAssetsBuilderResult(
|
||||
assets: <AssetImpl>[
|
||||
NativeCodeAssetImpl(
|
||||
id: 'package:bar/bar.dart',
|
||||
linkMode: StaticLinkingImpl(),
|
||||
os: OSImpl.macOS,
|
||||
architecture: ArchitectureImpl.arm64,
|
||||
file: Uri.file('bar.a'),
|
||||
),
|
||||
NativeCodeAssetImpl(
|
||||
id: 'package:bar/bar.dart',
|
||||
linkMode: StaticLinkingImpl(),
|
||||
os: OSImpl.macOS,
|
||||
architecture: ArchitectureImpl.x64,
|
||||
file: Uri.file('bar.a'),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
throwsToolExit(
|
||||
message: 'Native asset(s) package:bar/bar.dart have their link mode set to '
|
||||
'static, but this is not yet supported. '
|
||||
'For more info see https://github.com/dart-lang/sdk/issues/49418.',
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
|
||||
testUsingContext('Native assets dry run error', overrides: <Type, Generator>{
|
||||
FeatureFlags: () => TestFeatureFlags(isNativeAssetsEnabled: true),
|
||||
ProcessManager: () => FakeProcessManager.empty(),
|
||||
|
||||
@@ -306,44 +306,6 @@ void main() {
|
||||
}
|
||||
}
|
||||
|
||||
testUsingContext('static libs not supported', overrides: <Type, Generator>{
|
||||
FeatureFlags: () => TestFeatureFlags(isNativeAssetsEnabled: true),
|
||||
ProcessManager: () => FakeProcessManager.empty(),
|
||||
}, () async {
|
||||
final File packageConfig = environment.projectDir.childFile('.dart_tool/package_config.json');
|
||||
await packageConfig.parent.create();
|
||||
await packageConfig.create();
|
||||
expect(
|
||||
() => dryRunNativeAssetsWindows(
|
||||
projectUri: projectUri,
|
||||
fileSystem: fileSystem,
|
||||
buildRunner: FakeNativeAssetsBuildRunner(
|
||||
packagesWithNativeAssetsResult: <Package>[
|
||||
Package('bar', projectUri),
|
||||
],
|
||||
buildDryRunResult: FakeNativeAssetsBuilderResult(
|
||||
assets: <AssetImpl>[
|
||||
NativeCodeAssetImpl(
|
||||
id: 'package:bar/bar.dart',
|
||||
linkMode: StaticLinkingImpl(),
|
||||
os: OSImpl.windows,
|
||||
architecture: ArchitectureImpl.x64,
|
||||
file: Uri.file(OSImpl.windows.staticlibFileName('bar')),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
throwsToolExit(
|
||||
message: 'Native asset(s) package:bar/bar.dart have their link mode set to '
|
||||
'static, but this is not yet supported. '
|
||||
'For more info see https://github.com/dart-lang/sdk/issues/49418.',
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
|
||||
testUsingContext('Native assets dry run error', overrides: <Type, Generator>{
|
||||
FeatureFlags: () => TestFeatureFlags(isNativeAssetsEnabled: true),
|
||||
ProcessManager: () => FakeProcessManager.empty(),
|
||||
|
||||
@@ -271,13 +271,13 @@ void main() {
|
||||
'build',
|
||||
buildSubcommand,
|
||||
if (buildSubcommand == 'ios') '--no-codesign',
|
||||
if (buildSubcommand == 'windows') '-v' // Requires verbose mode for error.
|
||||
'-v', // Requires verbose mode for error.
|
||||
],
|
||||
workingDirectory: exampleDirectory.path,
|
||||
);
|
||||
expect(
|
||||
(result.stdout as String) + (result.stderr as String),
|
||||
contains('link mode set to static, but this is not yet supported'),
|
||||
contains('has a link mode "static", which is not allowed by by the config link mode preference "dynamic"'),
|
||||
);
|
||||
expect(result.exitCode, isNot(0));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user