[native assets] Cleanup dead code (#161913)

This PR deletes dead code.

Testing: No new use cases covered, all existing use cases covered by
existing tests.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
This commit is contained in:
Daco Harkes 2025-01-21 00:04:38 +01:00 committed by GitHub
parent 27f3f9ad2f
commit 883ef85413
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 0 additions and 13 deletions

View File

@ -42,7 +42,6 @@ abstract class DartBuild extends Target {
final FlutterNativeAssetsBuildRunner buildRunner =
_buildRunner ??
FlutterNativeAssetsBuildRunnerImpl(
projectUri,
environment.packageConfigPath,
packageConfig,
fileSystem,

View File

@ -193,14 +193,12 @@ abstract interface class FlutterNativeAssetsBuildRunner {
/// Uses `package:native_assets_builder` for its implementation.
class FlutterNativeAssetsBuildRunnerImpl implements FlutterNativeAssetsBuildRunner {
FlutterNativeAssetsBuildRunnerImpl(
this.projectUri,
this.packageConfigPath,
this.packageConfig,
this.fileSystem,
this.logger,
);
final Uri projectUri;
final String packageConfigPath;
final PackageConfig packageConfig;
final FileSystem fileSystem;
@ -235,14 +233,8 @@ class FlutterNativeAssetsBuildRunnerImpl implements FlutterNativeAssetsBuildRunn
logger: _logger,
dartExecutable: _dartExecutable,
fileSystem: fileSystem,
hookEnvironment: filteredEnvironment(NativeAssetsBuildRunner.hookEnvironmentVariablesFilter),
);
static Map<String, String> filteredEnvironment(Set<String> allowList) => <String, String>{
for (final MapEntry<String, String> entry in const LocalPlatform().environment.entries)
if (allowList.contains(entry.key.toUpperCase())) entry.key: entry.value,
};
@override
Future<bool> hasPackageConfig() {
return fileSystem.file(packageConfigPath).exists();

View File

@ -30,7 +30,6 @@ Future<Uri?> testCompilerBuildNativeAssets(BuildInfo buildInfo) async {
}
final Uri projectUri = FlutterProject.current().directory.uri;
final FlutterNativeAssetsBuildRunner buildRunner = FlutterNativeAssetsBuildRunnerImpl(
projectUri,
buildInfo.packageConfigPath,
buildInfo.packageConfig,
globals.fs,

View File

@ -112,7 +112,6 @@ void main() {
logger: environment.logger,
);
final FlutterNativeAssetsBuildRunner runner = FlutterNativeAssetsBuildRunnerImpl(
projectUri,
packageConfigFile.path,
packageConfig,
fileSystem,

View File

@ -397,7 +397,6 @@ InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault
logger: environment.logger,
);
final FlutterNativeAssetsBuildRunner runner = FlutterNativeAssetsBuildRunnerImpl(
projectUri,
packageConfigFile.path,
packageConfig,
fileSystem,

View File

@ -264,7 +264,6 @@ void main() {
logger: environment.logger,
);
final FlutterNativeAssetsBuildRunner runner = FlutterNativeAssetsBuildRunnerImpl(
projectUri,
packageConfigFile.path,
packageConfig,
fileSystem,