Skip to content

Commit 883ef85

Browse files
authored
[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
1 parent 27f3f9a commit 883ef85

File tree

6 files changed

+0
-13
lines changed

6 files changed

+0
-13
lines changed

packages/flutter_tools/lib/src/build_system/targets/native_assets.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ abstract class DartBuild extends Target {
4242
final FlutterNativeAssetsBuildRunner buildRunner =
4343
_buildRunner ??
4444
FlutterNativeAssetsBuildRunnerImpl(
45-
projectUri,
4645
environment.packageConfigPath,
4746
packageConfig,
4847
fileSystem,

packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -193,14 +193,12 @@ abstract interface class FlutterNativeAssetsBuildRunner {
193193
/// Uses `package:native_assets_builder` for its implementation.
194194
class FlutterNativeAssetsBuildRunnerImpl implements FlutterNativeAssetsBuildRunner {
195195
FlutterNativeAssetsBuildRunnerImpl(
196-
this.projectUri,
197196
this.packageConfigPath,
198197
this.packageConfig,
199198
this.fileSystem,
200199
this.logger,
201200
);
202201

203-
final Uri projectUri;
204202
final String packageConfigPath;
205203
final PackageConfig packageConfig;
206204
final FileSystem fileSystem;
@@ -235,14 +233,8 @@ class FlutterNativeAssetsBuildRunnerImpl implements FlutterNativeAssetsBuildRunn
235233
logger: _logger,
236234
dartExecutable: _dartExecutable,
237235
fileSystem: fileSystem,
238-
hookEnvironment: filteredEnvironment(NativeAssetsBuildRunner.hookEnvironmentVariablesFilter),
239236
);
240237

241-
static Map<String, String> filteredEnvironment(Set<String> allowList) => <String, String>{
242-
for (final MapEntry<String, String> entry in const LocalPlatform().environment.entries)
243-
if (allowList.contains(entry.key.toUpperCase())) entry.key: entry.value,
244-
};
245-
246238
@override
247239
Future<bool> hasPackageConfig() {
248240
return fileSystem.file(packageConfigPath).exists();

packages/flutter_tools/lib/src/isolated/native_assets/test/native_assets.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ Future<Uri?> testCompilerBuildNativeAssets(BuildInfo buildInfo) async {
3030
}
3131
final Uri projectUri = FlutterProject.current().directory.uri;
3232
final FlutterNativeAssetsBuildRunner buildRunner = FlutterNativeAssetsBuildRunnerImpl(
33-
projectUri,
3433
buildInfo.packageConfigPath,
3534
buildInfo.packageConfig,
3635
globals.fs,

packages/flutter_tools/test/general.shard/isolated/linux/native_assets_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ void main() {
112112
logger: environment.logger,
113113
);
114114
final FlutterNativeAssetsBuildRunner runner = FlutterNativeAssetsBuildRunnerImpl(
115-
projectUri,
116115
packageConfigFile.path,
117116
packageConfig,
118117
fileSystem,

packages/flutter_tools/test/general.shard/isolated/macos/native_assets_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,6 @@ InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault
397397
logger: environment.logger,
398398
);
399399
final FlutterNativeAssetsBuildRunner runner = FlutterNativeAssetsBuildRunnerImpl(
400-
projectUri,
401400
packageConfigFile.path,
402401
packageConfig,
403402
fileSystem,

packages/flutter_tools/test/general.shard/isolated/windows/native_assets_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ void main() {
264264
logger: environment.logger,
265265
);
266266
final FlutterNativeAssetsBuildRunner runner = FlutterNativeAssetsBuildRunnerImpl(
267-
projectUri,
268267
packageConfigFile.path,
269268
packageConfig,
270269
fileSystem,

0 commit comments

Comments
 (0)