remove unused members in executable libs (#107464)
This commit is contained in:
committed by
GitHub
parent
cfff88b26a
commit
93a74ca9f2
@@ -35,7 +35,6 @@ final String flutterRoot = path.dirname(path.dirname(path.dirname(path.fromUri(P
|
||||
final String flutter = path.join(flutterRoot, 'bin', 'flutter$bat');
|
||||
final String dart = path.join(flutterRoot, 'bin', 'cache', 'dart-sdk', 'bin', 'dart$exe');
|
||||
final String pubCache = path.join(flutterRoot, '.pub-cache');
|
||||
final String toolRoot = path.join(flutterRoot, 'packages', 'flutter_tools');
|
||||
final String engineVersionFile = path.join(flutterRoot, 'bin', 'internal', 'engine.version');
|
||||
final String flutterPluginsVersionFile = path.join(flutterRoot, 'bin', 'internal', 'flutter_plugins.version');
|
||||
|
||||
@@ -1812,31 +1811,6 @@ void adjustEnvironmentToEnableFlutterAsserts(Map<String, String> environment) {
|
||||
environment['FLUTTER_TOOL_ARGS'] = toolsArgs.trim();
|
||||
}
|
||||
|
||||
Map<String, String> _initGradleEnvironment() {
|
||||
final String? androidSdkRoot = (Platform.environment['ANDROID_HOME']?.isEmpty ?? true)
|
||||
? Platform.environment['ANDROID_SDK_ROOT']
|
||||
: Platform.environment['ANDROID_HOME'];
|
||||
if (androidSdkRoot == null || androidSdkRoot.isEmpty) {
|
||||
print('${red}Could not find Android SDK; set ANDROID_SDK_ROOT.$reset');
|
||||
exit(1);
|
||||
}
|
||||
return <String, String>{
|
||||
'ANDROID_HOME': androidSdkRoot!,
|
||||
'ANDROID_SDK_ROOT': androidSdkRoot,
|
||||
};
|
||||
}
|
||||
|
||||
final Map<String, String> gradleEnvironment = _initGradleEnvironment();
|
||||
|
||||
void deleteFile(String path) {
|
||||
// This is technically a race condition but nobody else should be running
|
||||
// while this script runs, so we should be ok. (Sadly recursive:true does not
|
||||
// obviate the need for existsSync, at least on Windows.)
|
||||
final File file = File(path);
|
||||
if (file.existsSync())
|
||||
file.deleteSync();
|
||||
}
|
||||
|
||||
enum CiProviders {
|
||||
cirrus,
|
||||
luci,
|
||||
@@ -1865,18 +1839,6 @@ CiProviders? get ciProvider {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Returns the name of the branch being tested.
|
||||
String get branchName {
|
||||
switch(ciProvider) {
|
||||
case CiProviders.cirrus:
|
||||
return Platform.environment['CIRRUS_BRANCH']!;
|
||||
case CiProviders.luci:
|
||||
return Platform.environment['LUCI_BRANCH']!;
|
||||
case null:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
/// Checks the given file's contents to determine if they match the allowed
|
||||
/// pattern for version strings.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user