forked from firka/flutter
[tool] Remove some usages of deprecated usage package (#151359)
Partially addresses https://github.com/flutter/flutter/issues/150575 and https://github.com/flutter/flutter/issues/150665 Will require a g3fix.
This commit is contained in:
@@ -22,7 +22,6 @@ import 'package:flutter_tools/src/ios/mac.dart';
|
||||
import 'package:flutter_tools/src/ios/plist_parser.dart';
|
||||
import 'package:flutter_tools/src/ios/xcodeproj.dart';
|
||||
import 'package:flutter_tools/src/project.dart';
|
||||
import 'package:flutter_tools/src/reporting/reporting.dart';
|
||||
import 'package:test/fake.dart';
|
||||
import 'package:unified_analytics/unified_analytics.dart';
|
||||
|
||||
@@ -71,7 +70,6 @@ final Platform notMacosPlatform = FakePlatform(
|
||||
|
||||
void main() {
|
||||
late MemoryFileSystem fileSystem;
|
||||
late TestUsage usage;
|
||||
late FakeAnalytics fakeAnalytics;
|
||||
late BufferLogger logger;
|
||||
late FakeProcessManager processManager;
|
||||
@@ -85,7 +83,6 @@ void main() {
|
||||
setUp(() {
|
||||
fileSystem = MemoryFileSystem.test();
|
||||
artifacts = Artifacts.test(fileSystem: fileSystem);
|
||||
usage = TestUsage();
|
||||
fakeAnalytics = getInitializedFakeAnalyticsInstance(
|
||||
fs: fileSystem,
|
||||
fakeFlutterVersion: FakeFlutterVersion(),
|
||||
@@ -570,9 +567,6 @@ void main() {
|
||||
|
||||
expect(logger.statusText, contains('A summary of your iOS bundle analysis can be found at'));
|
||||
expect(logger.statusText, contains('dart devtools --appSizeBase='));
|
||||
expect(usage.events, contains(
|
||||
const TestUsageEvent('code-size-analysis', 'ios'),
|
||||
));
|
||||
expect(fakeAnalytics.sentEvents, contains(
|
||||
Event.codeSizeAnalysis(platform: 'ios')
|
||||
));
|
||||
@@ -582,7 +576,6 @@ void main() {
|
||||
ProcessManager: () => processManager,
|
||||
Platform: () => macosPlatform,
|
||||
FileSystemUtils: () => FileSystemUtils(fileSystem: fileSystem, platform: macosPlatform),
|
||||
Usage: () => usage,
|
||||
Analytics: () => fakeAnalytics,
|
||||
XcodeProjectInterpreter: () => FakeXcodeProjectInterpreterWithBuildSettings(),
|
||||
});
|
||||
@@ -645,7 +638,6 @@ void main() {
|
||||
fileSystem: fileSystem,
|
||||
platform: macosPlatform,
|
||||
),
|
||||
Usage: () => usage,
|
||||
XcodeProjectInterpreter: () => FakeXcodeProjectInterpreterWithBuildSettings(),
|
||||
Analytics: () => fakeAnalytics,
|
||||
});
|
||||
@@ -700,7 +692,6 @@ void main() {
|
||||
fileSystem: fileSystem,
|
||||
platform: macosPlatform,
|
||||
),
|
||||
Usage: () => usage,
|
||||
XcodeProjectInterpreter: () => FakeXcodeProjectInterpreterWithBuildSettings(),
|
||||
FlutterProjectFactory: () => FlutterProjectFactory(
|
||||
fileSystem: fileSystem,
|
||||
|
||||
@@ -18,7 +18,6 @@ import 'package:flutter_tools/src/commands/build.dart';
|
||||
import 'package:flutter_tools/src/commands/build_ios.dart';
|
||||
import 'package:flutter_tools/src/ios/plist_parser.dart';
|
||||
import 'package:flutter_tools/src/ios/xcodeproj.dart';
|
||||
import 'package:flutter_tools/src/reporting/reporting.dart';
|
||||
import 'package:test/fake.dart';
|
||||
import 'package:unified_analytics/unified_analytics.dart';
|
||||
|
||||
@@ -79,7 +78,6 @@ class FakePlistUtils extends Fake implements PlistParser {
|
||||
|
||||
void main() {
|
||||
late MemoryFileSystem fileSystem;
|
||||
late TestUsage usage;
|
||||
late FakeProcessManager fakeProcessManager;
|
||||
late ProcessUtils processUtils;
|
||||
late FakePlistUtils plistUtils;
|
||||
@@ -94,7 +92,6 @@ void main() {
|
||||
setUp(() {
|
||||
fileSystem = MemoryFileSystem.test();
|
||||
artifacts = Artifacts.test(fileSystem: fileSystem);
|
||||
usage = TestUsage();
|
||||
fakeProcessManager = FakeProcessManager.empty();
|
||||
logger = BufferLogger.test();
|
||||
processUtils = ProcessUtils(
|
||||
@@ -1041,9 +1038,6 @@ void main() {
|
||||
|
||||
expect(logger.statusText, contains('A summary of your iOS bundle analysis can be found at'));
|
||||
expect(logger.statusText, contains('dart devtools --appSizeBase='));
|
||||
expect(usage.events, contains(
|
||||
const TestUsageEvent('code-size-analysis', 'ios'),
|
||||
));
|
||||
expect(fakeProcessManager, hasNoRemainingExpectations);
|
||||
expect(fakeAnalytics.sentEvents, contains(
|
||||
Event.codeSizeAnalysis(platform: 'ios')
|
||||
@@ -1054,7 +1048,6 @@ void main() {
|
||||
ProcessManager: () => fakeProcessManager,
|
||||
Platform: () => macosPlatform,
|
||||
FileSystemUtils: () => FileSystemUtils(fileSystem: fileSystem, platform: macosPlatform),
|
||||
Usage: () => usage,
|
||||
Analytics: () => fakeAnalytics,
|
||||
XcodeProjectInterpreter: () => FakeXcodeProjectInterpreterWithBuildSettings(),
|
||||
});
|
||||
|
||||
@@ -19,7 +19,6 @@ import 'package:flutter_tools/src/commands/build.dart';
|
||||
import 'package:flutter_tools/src/commands/build_linux.dart';
|
||||
import 'package:flutter_tools/src/features.dart';
|
||||
import 'package:flutter_tools/src/project.dart';
|
||||
import 'package:flutter_tools/src/reporting/reporting.dart';
|
||||
import 'package:test/fake.dart';
|
||||
import 'package:unified_analytics/unified_analytics.dart';
|
||||
|
||||
@@ -53,7 +52,6 @@ void main() {
|
||||
late FakeProcessManager processManager;
|
||||
late ProcessUtils processUtils;
|
||||
late Logger logger;
|
||||
late TestUsage usage;
|
||||
late Artifacts artifacts;
|
||||
late FakeAnalytics fakeAnalytics;
|
||||
|
||||
@@ -61,7 +59,6 @@ void main() {
|
||||
fileSystem = MemoryFileSystem.test();
|
||||
artifacts = Artifacts.test(fileSystem: fileSystem);
|
||||
Cache.flutterRoot = _kTestFlutterRoot;
|
||||
usage = TestUsage();
|
||||
logger = BufferLogger.test();
|
||||
processManager = FakeProcessManager.empty();
|
||||
processUtils = ProcessUtils(
|
||||
@@ -751,9 +748,6 @@ set(BINARY_NAME "fizz_bar")
|
||||
|
||||
expect(testLogger.statusText, contains('A summary of your Linux bundle analysis can be found at'));
|
||||
expect(testLogger.statusText, contains('dart devtools --appSizeBase='));
|
||||
expect(usage.events, contains(
|
||||
const TestUsageEvent('code-size-analysis', 'linux'),
|
||||
));
|
||||
expect(fakeAnalytics.sentEvents, contains(
|
||||
Event.codeSizeAnalysis(platform: 'linux')
|
||||
));
|
||||
@@ -762,7 +756,6 @@ set(BINARY_NAME "fizz_bar")
|
||||
ProcessManager: () => processManager,
|
||||
Platform: () => linuxPlatform,
|
||||
FeatureFlags: () => TestFeatureFlags(isLinuxEnabled: true),
|
||||
Usage: () => usage,
|
||||
OperatingSystemUtils: () => FakeOperatingSystemUtils(),
|
||||
Analytics: () => fakeAnalytics,
|
||||
});
|
||||
@@ -808,9 +801,6 @@ set(BINARY_NAME "fizz_bar")
|
||||
|
||||
// check if libapp.so of "build/linux/arm64/release" directory can be referenced.
|
||||
expect(testLogger.statusText, contains('libapp.so (Dart AOT)'));
|
||||
expect(usage.events, contains(
|
||||
const TestUsageEvent('code-size-analysis', 'linux'),
|
||||
));
|
||||
expect(fakeAnalytics.sentEvents, contains(
|
||||
Event.codeSizeAnalysis(platform: 'linux')
|
||||
));
|
||||
@@ -819,7 +809,6 @@ set(BINARY_NAME "fizz_bar")
|
||||
ProcessManager: () => processManager,
|
||||
Platform: () => linuxPlatform,
|
||||
FeatureFlags: () => TestFeatureFlags(isLinuxEnabled: true),
|
||||
Usage: () => usage,
|
||||
OperatingSystemUtils: () => CustomFakeOperatingSystemUtils(hostPlatform: HostPlatform.linux_arm64),
|
||||
Analytics: () => fakeAnalytics,
|
||||
});
|
||||
|
||||
@@ -20,7 +20,6 @@ import 'package:flutter_tools/src/commands/build_macos.dart';
|
||||
import 'package:flutter_tools/src/features.dart';
|
||||
import 'package:flutter_tools/src/ios/xcodeproj.dart';
|
||||
import 'package:flutter_tools/src/project.dart';
|
||||
import 'package:flutter_tools/src/reporting/reporting.dart';
|
||||
import 'package:unified_analytics/unified_analytics.dart';
|
||||
|
||||
import '../../src/common.dart';
|
||||
@@ -66,7 +65,6 @@ final Platform notMacosPlatform = FakePlatform(
|
||||
|
||||
void main() {
|
||||
late MemoryFileSystem fileSystem;
|
||||
late TestUsage usage;
|
||||
late FakeProcessManager fakeProcessManager;
|
||||
late ProcessUtils processUtils;
|
||||
late BufferLogger logger;
|
||||
@@ -82,7 +80,6 @@ void main() {
|
||||
fileSystem = MemoryFileSystem.test();
|
||||
artifacts = Artifacts.test(fileSystem: fileSystem);
|
||||
logger = BufferLogger.test();
|
||||
usage = TestUsage();
|
||||
fakeProcessManager = FakeProcessManager.empty();
|
||||
processUtils = ProcessUtils(
|
||||
logger: logger,
|
||||
@@ -657,7 +654,6 @@ STDERR STUFF
|
||||
Platform: () => macosPlatform,
|
||||
FeatureFlags: () => TestFeatureFlags(isMacOSEnabled: true),
|
||||
FileSystemUtils: () => FileSystemUtils(fileSystem: fileSystem, platform: macosPlatform),
|
||||
Usage: () => usage,
|
||||
Analytics: () => fakeAnalytics,
|
||||
});
|
||||
testUsingContext('Performs code size analysis and sends analytics from arm64 host', () async {
|
||||
@@ -682,9 +678,6 @@ STDERR STUFF
|
||||
|
||||
expect(testLogger.statusText, contains('A summary of your macOS bundle analysis can be found at'));
|
||||
expect(testLogger.statusText, contains('dart devtools --appSizeBase='));
|
||||
expect(usage.events, contains(
|
||||
const TestUsageEvent('code-size-analysis', 'macos'),
|
||||
));
|
||||
expect(fakeAnalytics.sentEvents, contains(Event.codeSizeAnalysis(platform: 'macos')));
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => fileSystem,
|
||||
@@ -711,7 +704,6 @@ STDERR STUFF
|
||||
Platform: () => macosPlatform,
|
||||
FeatureFlags: () => TestFeatureFlags(isMacOSEnabled: true),
|
||||
FileSystemUtils: () => FileSystemUtils(fileSystem: fileSystem, platform: macosPlatform),
|
||||
Usage: () => usage,
|
||||
Analytics: () => fakeAnalytics,
|
||||
});
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ import 'package:flutter_tools/src/build_info.dart';
|
||||
import 'package:flutter_tools/src/cache.dart';
|
||||
import 'package:flutter_tools/src/commands/build_windows.dart';
|
||||
import 'package:flutter_tools/src/features.dart';
|
||||
import 'package:flutter_tools/src/reporting/reporting.dart';
|
||||
import 'package:flutter_tools/src/windows/build_windows.dart';
|
||||
import 'package:flutter_tools/src/windows/visual_studio.dart';
|
||||
import 'package:test/fake.dart';
|
||||
@@ -47,7 +46,6 @@ final Platform notWindowsPlatform = FakePlatform(
|
||||
void main() {
|
||||
late MemoryFileSystem fileSystem;
|
||||
late ProcessManager processManager;
|
||||
late TestUsage usage;
|
||||
late FakeAnalytics fakeAnalytics;
|
||||
|
||||
setUpAll(() {
|
||||
@@ -58,7 +56,6 @@ void main() {
|
||||
setUp(() {
|
||||
fileSystem = MemoryFileSystem.test(style: FileSystemStyle.windows);
|
||||
Cache.flutterRoot = flutterRoot;
|
||||
usage = TestUsage();
|
||||
fakeAnalytics = getInitializedFakeAnalyticsInstance(
|
||||
fs: fileSystem,
|
||||
fakeFlutterVersion: FakeFlutterVersion(),
|
||||
@@ -997,9 +994,6 @@ if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
|
||||
expect(testLogger.statusText, contains('A summary of your Windows bundle analysis can be found at'));
|
||||
expect(testLogger.statusText, contains('dart devtools --appSizeBase='));
|
||||
expect(usage.events, contains(
|
||||
const TestUsageEvent('code-size-analysis', 'windows'),
|
||||
));
|
||||
expect(fakeAnalytics.sentEvents, contains(
|
||||
Event.codeSizeAnalysis(platform: 'windows')
|
||||
));
|
||||
@@ -1009,7 +1003,6 @@ if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
ProcessManager: () => processManager,
|
||||
Platform: () => windowsPlatform,
|
||||
FileSystemUtils: () => FileSystemUtils(fileSystem: fileSystem, platform: windowsPlatform),
|
||||
Usage: () => usage,
|
||||
Analytics: () => fakeAnalytics,
|
||||
});
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ import 'package:flutter_tools/src/cache.dart';
|
||||
import 'package:flutter_tools/src/commands/build_apk.dart';
|
||||
import 'package:flutter_tools/src/globals.dart' as globals;
|
||||
import 'package:flutter_tools/src/project.dart';
|
||||
import 'package:flutter_tools/src/reporting/reporting.dart';
|
||||
import 'package:test/fake.dart';
|
||||
import 'package:unified_analytics/testing.dart';
|
||||
import 'package:unified_analytics/unified_analytics.dart';
|
||||
|
||||
import '../../src/android_common.dart';
|
||||
@@ -31,11 +31,9 @@ void main() {
|
||||
|
||||
group('Usage', () {
|
||||
late Directory tempDir;
|
||||
late TestUsage testUsage;
|
||||
late FakeAnalytics fakeAnalytics;
|
||||
|
||||
setUp(() {
|
||||
testUsage = TestUsage();
|
||||
tempDir = globals.fs.systemTempDirectory.createTempSync('flutter_tools_packages_test.');
|
||||
fakeAnalytics = getInitializedFakeAnalyticsInstance(
|
||||
fs: MemoryFileSystem.test(),
|
||||
@@ -50,9 +48,7 @@ void main() {
|
||||
testUsingContext('indicate the default target platforms', () async {
|
||||
final String projectPath = await createProject(tempDir,
|
||||
arguments: <String>['--no-pub', '--template=app']);
|
||||
final BuildApkCommand command = await runBuildApkCommand(projectPath);
|
||||
|
||||
expect((await command.usageValues).commandBuildApkTargetPlatform, 'android-arm,android-arm64,android-x64');
|
||||
await runBuildApkCommand(projectPath);
|
||||
|
||||
expect(
|
||||
fakeAnalytics.sentEvents,
|
||||
@@ -77,11 +73,19 @@ void main() {
|
||||
|
||||
final BuildApkCommand commandWithFlag = await runBuildApkCommand(projectPath,
|
||||
arguments: <String>['--split-per-abi']);
|
||||
expect((await commandWithFlag.usageValues).commandBuildApkSplitPerAbi, true);
|
||||
|
||||
expect(
|
||||
(await commandWithFlag.unifiedAnalyticsUsageValues('run'))
|
||||
.eventData['buildApkSplitPerAbi'],
|
||||
isTrue,
|
||||
);
|
||||
|
||||
final BuildApkCommand commandWithoutFlag = await runBuildApkCommand(projectPath);
|
||||
expect((await commandWithoutFlag.usageValues).commandBuildApkSplitPerAbi, false);
|
||||
|
||||
expect(
|
||||
(await commandWithoutFlag.unifiedAnalyticsUsageValues('run'))
|
||||
.eventData['buildApkSplitPerAbi'],
|
||||
isFalse
|
||||
);
|
||||
}, overrides: <Type, Generator>{
|
||||
AndroidBuilder: () => FakeAndroidBuilder(),
|
||||
});
|
||||
@@ -90,23 +94,27 @@ void main() {
|
||||
final String projectPath = await createProject(tempDir,
|
||||
arguments: <String>['--no-pub', '--template=app']);
|
||||
|
||||
final BuildApkCommand commandDefault = await runBuildApkCommand(projectPath);
|
||||
expect((await commandDefault.usageValues).commandBuildApkBuildMode, 'release');
|
||||
final BuildApkCommand defaultBuildCommand = await runBuildApkCommand(projectPath);
|
||||
final Event defaultBuildCommandUsageValues = await defaultBuildCommand.unifiedAnalyticsUsageValues('build');
|
||||
expect(defaultBuildCommandUsageValues.eventData['buildApkBuildMode'], 'release');
|
||||
|
||||
final BuildApkCommand commandInRelease = await runBuildApkCommand(projectPath,
|
||||
arguments: <String>['--release']);
|
||||
expect((await commandInRelease.usageValues).commandBuildApkBuildMode, 'release');
|
||||
final BuildApkCommand releaseBuildCommand = await runBuildApkCommand(projectPath, arguments: <String>['--release']);
|
||||
final Event releaseBuildCommandUsageValues = await releaseBuildCommand.unifiedAnalyticsUsageValues('build');
|
||||
expect(releaseBuildCommandUsageValues.eventData['buildApkBuildMode'], 'release');
|
||||
|
||||
final BuildApkCommand commandInDebug = await runBuildApkCommand(projectPath,
|
||||
arguments: <String>['--debug']);
|
||||
expect((await commandInDebug.usageValues).commandBuildApkBuildMode, 'debug');
|
||||
final BuildApkCommand debugBuildCommand = await runBuildApkCommand(projectPath, arguments: <String>['--debug']);
|
||||
final Event debugBuildCommandUsageValues = await debugBuildCommand.unifiedAnalyticsUsageValues('build');
|
||||
expect(debugBuildCommandUsageValues.eventData['buildApkBuildMode'], 'debug');
|
||||
|
||||
final BuildApkCommand commandInProfile = await runBuildApkCommand(projectPath,
|
||||
arguments: <String>['--profile']);
|
||||
expect((await commandInProfile.usageValues).commandBuildApkBuildMode, 'profile');
|
||||
final BuildApkCommand profileBuildCommand = await runBuildApkCommand(projectPath, arguments: <String>['--profile']);
|
||||
final Event profileBuildCommandUsageValues = await profileBuildCommand.unifiedAnalyticsUsageValues('build');
|
||||
expect(profileBuildCommandUsageValues.eventData['buildApkBuildMode'], 'profile');
|
||||
|
||||
fakeAnalytics.sentEvents.clear();
|
||||
await runBuildApkCommand(projectPath, arguments: <String>['--profile']);
|
||||
}, overrides: <Type, Generator>{
|
||||
AndroidBuilder: () => FakeAndroidBuilder(),
|
||||
Analytics: () => fakeAnalytics,
|
||||
});
|
||||
|
||||
testUsingContext('logs success', () async {
|
||||
@@ -115,22 +123,22 @@ void main() {
|
||||
|
||||
await runBuildApkCommand(projectPath);
|
||||
|
||||
expect(testUsage.events, contains(
|
||||
const TestUsageEvent(
|
||||
'tool-command-result',
|
||||
'apk',
|
||||
label: 'success',
|
||||
),
|
||||
));
|
||||
final Iterable<Event> successEvent = fakeAnalytics.sentEvents.where(
|
||||
(Event e) =>
|
||||
e.eventName == DashEvent.flutterCommandResult &&
|
||||
e.eventData['commandPath'] == 'create' &&
|
||||
e.eventData['result'] == 'success',
|
||||
);
|
||||
expect(successEvent, isNotEmpty, reason: 'Tool should send create success event');
|
||||
},
|
||||
overrides: <Type, Generator>{
|
||||
AndroidBuilder: () => FakeAndroidBuilder(),
|
||||
Usage: () => testUsage,
|
||||
Analytics: () => fakeAnalytics,
|
||||
});
|
||||
|
||||
group('Impeller AndroidManifest.xml setting', () {
|
||||
// Adds a key-value `<meta-data>` pair to the `<application>` tag in the
|
||||
// cooresponding `AndroidManifest.xml` file, right before the closing
|
||||
// corresponding `AndroidManifest.xml` file, right before the closing
|
||||
// `</application>` tag.
|
||||
void writeManifestMetadata({
|
||||
required String projectPath,
|
||||
@@ -248,15 +256,18 @@ void main() {
|
||||
late FakeProcessManager processManager;
|
||||
late String gradlew;
|
||||
late AndroidSdk mockAndroidSdk;
|
||||
late TestUsage testUsage;
|
||||
late FakeAnalytics analytics;
|
||||
|
||||
setUp(() {
|
||||
testUsage = TestUsage();
|
||||
tempDir = globals.fs.systemTempDirectory.createTempSync('flutter_tools_packages_test.');
|
||||
gradlew = globals.fs.path.join(tempDir.path, 'flutter_project', 'android',
|
||||
globals.platform.isWindows ? 'gradlew.bat' : 'gradlew');
|
||||
processManager = FakeProcessManager.empty();
|
||||
mockAndroidSdk = FakeAndroidSdk(globals.fs.directory('irrelevant'));
|
||||
analytics = getInitializedFakeAnalyticsInstance(
|
||||
fs: MemoryFileSystem.test(),
|
||||
fakeFlutterVersion: FakeFlutterVersion(),
|
||||
);
|
||||
});
|
||||
|
||||
tearDown(() {
|
||||
@@ -449,14 +460,16 @@ void main() {
|
||||
containsIgnoringWhitespace('To learn more, see: https://developer.android.com/studio/build/shrink-code'),
|
||||
)
|
||||
);
|
||||
expect(testUsage.events, contains(
|
||||
const TestUsageEvent(
|
||||
'build',
|
||||
'gradle',
|
||||
label: 'gradle-r8-failure',
|
||||
parameters: CustomDimensions(),
|
||||
|
||||
expect(
|
||||
analytics.sentEvents,
|
||||
contains(
|
||||
Event.flutterBuildInfo(
|
||||
label: 'gradle-r8-failure',
|
||||
buildType: 'gradle',
|
||||
),
|
||||
),
|
||||
));
|
||||
);
|
||||
expect(processManager, hasNoRemainingExpectations);
|
||||
},
|
||||
overrides: <Type, Generator>{
|
||||
@@ -464,7 +477,7 @@ void main() {
|
||||
Java: () => null,
|
||||
FlutterProjectFactory: () => FakeFlutterProjectFactory(tempDir),
|
||||
ProcessManager: () => processManager,
|
||||
Usage: () => testUsage,
|
||||
Analytics: () => analytics,
|
||||
AndroidStudio: () => FakeAndroidStudio(),
|
||||
});
|
||||
|
||||
@@ -503,14 +516,14 @@ void main() {
|
||||
),
|
||||
),
|
||||
);
|
||||
expect(testUsage.events, contains(
|
||||
const TestUsageEvent(
|
||||
'build',
|
||||
'gradle',
|
||||
label: 'app-not-using-android-x',
|
||||
parameters: CustomDimensions(),
|
||||
|
||||
expect(
|
||||
analytics.sentEvents,
|
||||
contains(
|
||||
Event.flutterBuildInfo(
|
||||
label: 'app-not-using-android-x', buildType: 'gradle'),
|
||||
),
|
||||
));
|
||||
);
|
||||
expect(processManager, hasNoRemainingExpectations);
|
||||
},
|
||||
overrides: <Type, Generator>{
|
||||
@@ -518,7 +531,7 @@ void main() {
|
||||
FlutterProjectFactory: () => FakeFlutterProjectFactory(tempDir),
|
||||
Java: () => null,
|
||||
ProcessManager: () => processManager,
|
||||
Usage: () => testUsage,
|
||||
Analytics: () => analytics,
|
||||
AndroidStudio: () => FakeAndroidStudio(),
|
||||
});
|
||||
|
||||
@@ -550,14 +563,14 @@ void main() {
|
||||
))
|
||||
),
|
||||
);
|
||||
expect(testUsage.events, contains(
|
||||
const TestUsageEvent(
|
||||
'build',
|
||||
'gradle',
|
||||
|
||||
expect(
|
||||
analytics.sentEvents,
|
||||
contains(Event.flutterBuildInfo(
|
||||
label: 'app-using-android-x',
|
||||
parameters: CustomDimensions(),
|
||||
),
|
||||
));
|
||||
buildType: 'gradle',
|
||||
)),
|
||||
);
|
||||
expect(processManager, hasNoRemainingExpectations);
|
||||
},
|
||||
overrides: <Type, Generator>{
|
||||
@@ -565,7 +578,7 @@ void main() {
|
||||
FlutterProjectFactory: () => FakeFlutterProjectFactory(tempDir),
|
||||
Java: () => null,
|
||||
ProcessManager: () => processManager,
|
||||
Usage: () => testUsage,
|
||||
Analytics: () => analytics,
|
||||
AndroidStudio: () => FakeAndroidStudio(),
|
||||
});
|
||||
});
|
||||
|
||||
@@ -12,7 +12,6 @@ import 'package:flutter_tools/src/cache.dart';
|
||||
import 'package:flutter_tools/src/commands/build_appbundle.dart';
|
||||
import 'package:flutter_tools/src/globals.dart' as globals;
|
||||
import 'package:flutter_tools/src/project.dart';
|
||||
import 'package:flutter_tools/src/reporting/reporting.dart';
|
||||
import 'package:test/fake.dart';
|
||||
import 'package:unified_analytics/unified_analytics.dart';
|
||||
|
||||
@@ -25,14 +24,12 @@ import '../../src/test_flutter_command_runner.dart';
|
||||
void main() {
|
||||
Cache.disableLocking();
|
||||
|
||||
group('Usage', () {
|
||||
group('analytics', () {
|
||||
late Directory tempDir;
|
||||
late TestUsage testUsage;
|
||||
late FakeAnalytics fakeAnalytics;
|
||||
|
||||
setUp(() {
|
||||
tempDir = globals.fs.systemTempDirectory.createTempSync('flutter_tools_packages_test.');
|
||||
testUsage = TestUsage();
|
||||
fakeAnalytics = getInitializedFakeAnalyticsInstance(
|
||||
fs: MemoryFileSystem.test(),
|
||||
fakeFlutterVersion: FakeFlutterVersion(),
|
||||
@@ -46,9 +43,8 @@ void main() {
|
||||
testUsingContext('indicate the default target platforms', () async {
|
||||
final String projectPath = await createProject(tempDir,
|
||||
arguments: <String>['--no-pub', '--template=app']);
|
||||
final BuildAppBundleCommand command = await runBuildAppBundleCommand(projectPath);
|
||||
|
||||
expect((await command.usageValues).commandBuildAppBundleTargetPlatform, 'android-arm,android-arm64,android-x64');
|
||||
await runBuildAppBundleCommand(projectPath);
|
||||
|
||||
expect(
|
||||
fakeAnalytics.sentEvents,
|
||||
@@ -74,23 +70,56 @@ void main() {
|
||||
final String projectPath = await createProject(tempDir,
|
||||
arguments: <String>['--no-pub', '--template=app']);
|
||||
|
||||
final BuildAppBundleCommand commandDefault = await runBuildAppBundleCommand(projectPath);
|
||||
expect((await commandDefault.usageValues).commandBuildAppBundleBuildMode, 'release');
|
||||
await runBuildAppBundleCommand(projectPath);
|
||||
expect(
|
||||
fakeAnalytics.sentEvents,
|
||||
contains(Event.commandUsageValues(
|
||||
workflow: 'appbundle',
|
||||
commandHasTerminal: false,
|
||||
buildAppBundleTargetPlatform: 'android-arm,android-arm64,android-x64',
|
||||
buildAppBundleBuildMode: 'release',
|
||||
)),
|
||||
);
|
||||
|
||||
final BuildAppBundleCommand commandInRelease = await runBuildAppBundleCommand(projectPath,
|
||||
arguments: <String>['--release']);
|
||||
expect((await commandInRelease.usageValues).commandBuildAppBundleBuildMode, 'release');
|
||||
fakeAnalytics.sentEvents.clear();
|
||||
await runBuildAppBundleCommand(projectPath, arguments: <String>['--release']);
|
||||
expect(
|
||||
fakeAnalytics.sentEvents,
|
||||
contains(Event.commandUsageValues(
|
||||
workflow: 'appbundle',
|
||||
commandHasTerminal: false,
|
||||
buildAppBundleTargetPlatform: 'android-arm,android-arm64,android-x64',
|
||||
buildAppBundleBuildMode: 'release',
|
||||
)),
|
||||
);
|
||||
|
||||
final BuildAppBundleCommand commandInDebug = await runBuildAppBundleCommand(projectPath,
|
||||
arguments: <String>['--debug']);
|
||||
expect((await commandInDebug.usageValues).commandBuildAppBundleBuildMode, 'debug');
|
||||
fakeAnalytics.sentEvents.clear();
|
||||
await runBuildAppBundleCommand(projectPath, arguments: <String>['--debug']);
|
||||
expect(
|
||||
fakeAnalytics.sentEvents,
|
||||
contains(Event.commandUsageValues(
|
||||
workflow: 'appbundle',
|
||||
commandHasTerminal: false,
|
||||
buildAppBundleTargetPlatform: 'android-arm,android-arm64,android-x64',
|
||||
buildAppBundleBuildMode: 'debug',
|
||||
)),
|
||||
);
|
||||
|
||||
final BuildAppBundleCommand commandInProfile = await runBuildAppBundleCommand(projectPath,
|
||||
arguments: <String>['--profile']);
|
||||
expect((await commandInProfile.usageValues).commandBuildAppBundleBuildMode, 'profile');
|
||||
fakeAnalytics.sentEvents.clear();
|
||||
await runBuildAppBundleCommand(projectPath, arguments: <String>['--profile']);
|
||||
|
||||
expect(
|
||||
fakeAnalytics.sentEvents,
|
||||
contains(Event.commandUsageValues(
|
||||
workflow: 'appbundle',
|
||||
commandHasTerminal: false,
|
||||
buildAppBundleTargetPlatform: 'android-arm,android-arm64,android-x64',
|
||||
buildAppBundleBuildMode: 'profile',
|
||||
)),
|
||||
);
|
||||
}, overrides: <Type, Generator>{
|
||||
AndroidBuilder: () => FakeAndroidBuilder(),
|
||||
Analytics: () => fakeAnalytics,
|
||||
});
|
||||
|
||||
testUsingContext('logs success', () async {
|
||||
@@ -99,27 +128,38 @@ void main() {
|
||||
|
||||
await runBuildAppBundleCommand(projectPath);
|
||||
|
||||
expect(testUsage.events, contains(
|
||||
const TestUsageEvent('tool-command-result', 'appbundle', label: 'success'),
|
||||
));
|
||||
expect(
|
||||
fakeAnalytics.sentEvents,
|
||||
contains(
|
||||
Event.flutterCommandResult(
|
||||
commandPath: 'create',
|
||||
result: 'success',
|
||||
commandHasTerminal: false,
|
||||
maxRss: globals.processInfo.maxRss,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
overrides: <Type, Generator>{
|
||||
AndroidBuilder: () => FakeAndroidBuilder(),
|
||||
Usage: () => testUsage,
|
||||
Analytics: () => fakeAnalytics,
|
||||
});
|
||||
});
|
||||
|
||||
group('Gradle', () {
|
||||
late Directory tempDir;
|
||||
late FakeProcessManager processManager;
|
||||
late FakeAndroidSdk fakeAndroidSdk;
|
||||
late TestUsage testUsage;
|
||||
late FakeAndroidSdk androidSdk;
|
||||
late FakeAnalytics analytics;
|
||||
|
||||
setUp(() {
|
||||
testUsage = TestUsage();
|
||||
analytics = getInitializedFakeAnalyticsInstance(
|
||||
fs: MemoryFileSystem.test(),
|
||||
fakeFlutterVersion: FakeFlutterVersion(),
|
||||
);
|
||||
tempDir = globals.fs.systemTempDirectory.createTempSync('flutter_tools_packages_test.');
|
||||
processManager = FakeProcessManager.any();
|
||||
fakeAndroidSdk = FakeAndroidSdk(globals.fs.directory('irrelevant'));
|
||||
androidSdk = FakeAndroidSdk(globals.fs.directory('irrelevant'));
|
||||
});
|
||||
|
||||
tearDown(() {
|
||||
@@ -176,20 +216,18 @@ void main() {
|
||||
),
|
||||
);
|
||||
|
||||
expect(testUsage.events, contains(
|
||||
const TestUsageEvent(
|
||||
'build',
|
||||
'gradle',
|
||||
expect(analytics.sentEvents, contains(
|
||||
Event.flutterBuildInfo(
|
||||
label: 'app-not-using-android-x',
|
||||
parameters: CustomDimensions(),
|
||||
buildType: 'gradle',
|
||||
),
|
||||
));
|
||||
},
|
||||
overrides: <Type, Generator>{
|
||||
AndroidSdk: () => fakeAndroidSdk,
|
||||
AndroidSdk: () => androidSdk,
|
||||
FlutterProjectFactory: () => FakeFlutterProjectFactory(tempDir),
|
||||
ProcessManager: () => processManager,
|
||||
Usage: () => testUsage,
|
||||
Analytics: () => analytics,
|
||||
});
|
||||
|
||||
testUsingContext('reports when the app is using AndroidX', () async {
|
||||
@@ -216,20 +254,18 @@ void main() {
|
||||
)
|
||||
);
|
||||
|
||||
expect(testUsage.events, contains(
|
||||
const TestUsageEvent(
|
||||
'build',
|
||||
'gradle',
|
||||
expect(analytics.sentEvents, contains(
|
||||
Event.flutterBuildInfo(
|
||||
label: 'app-using-android-x',
|
||||
parameters: CustomDimensions(),
|
||||
buildType: 'gradle',
|
||||
),
|
||||
));
|
||||
},
|
||||
overrides: <Type, Generator>{
|
||||
AndroidSdk: () => fakeAndroidSdk,
|
||||
AndroidSdk: () => androidSdk,
|
||||
FlutterProjectFactory: () => FakeFlutterProjectFactory(tempDir),
|
||||
ProcessManager: () => processManager,
|
||||
Usage: () => testUsage,
|
||||
Analytics: () => analytics,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ import 'package:flutter_tools/src/base/user_messages.dart';
|
||||
import 'package:flutter_tools/src/build_info.dart';
|
||||
import 'package:flutter_tools/src/cache.dart';
|
||||
import 'package:flutter_tools/src/project.dart';
|
||||
import 'package:flutter_tools/src/reporting/reporting.dart';
|
||||
import 'package:test/fake.dart';
|
||||
import 'package:unified_analytics/unified_analytics.dart';
|
||||
|
||||
@@ -44,7 +43,6 @@ const String minimalV2EmbeddingManifest = r'''
|
||||
void main() {
|
||||
group('gradle build', () {
|
||||
late BufferLogger logger;
|
||||
late TestUsage testUsage;
|
||||
late FakeAnalytics fakeAnalytics;
|
||||
late MemoryFileSystem fileSystem;
|
||||
late FakeProcessManager processManager;
|
||||
@@ -52,7 +50,6 @@ void main() {
|
||||
setUp(() {
|
||||
processManager = FakeProcessManager.empty();
|
||||
logger = BufferLogger.test();
|
||||
testUsage = TestUsage();
|
||||
fileSystem = MemoryFileSystem.test();
|
||||
Cache.flutterRoot = '';
|
||||
|
||||
@@ -69,7 +66,6 @@ void main() {
|
||||
processManager: processManager,
|
||||
fileSystem: fileSystem,
|
||||
artifacts: Artifacts.test(),
|
||||
usage: testUsage,
|
||||
analytics: fakeAnalytics,
|
||||
gradleUtils: FakeGradleUtils(),
|
||||
platform: FakePlatform(),
|
||||
@@ -149,16 +145,6 @@ void main() {
|
||||
|
||||
expect(handlerCalled, isTrue);
|
||||
|
||||
expect(testUsage.events, contains(
|
||||
const TestUsageEvent(
|
||||
'build',
|
||||
'gradle',
|
||||
label: 'gradle-random-event-label-failure',
|
||||
parameters: CustomDimensions(),
|
||||
),
|
||||
));
|
||||
expect(testUsage.events, hasLength(2));
|
||||
|
||||
expect(
|
||||
fakeAnalytics.sentEvents,
|
||||
containsAll(<Event>[
|
||||
@@ -187,7 +173,6 @@ void main() {
|
||||
processManager: processManager,
|
||||
fileSystem: fileSystem,
|
||||
artifacts: Artifacts.test(),
|
||||
usage: testUsage,
|
||||
analytics: fakeAnalytics,
|
||||
gradleUtils: FakeGradleUtils(),
|
||||
platform: FakePlatform(),
|
||||
@@ -262,7 +247,6 @@ void main() {
|
||||
processManager: processManager,
|
||||
fileSystem: fileSystem,
|
||||
artifacts: Artifacts.test(),
|
||||
usage: testUsage,
|
||||
analytics: fakeAnalytics,
|
||||
gradleUtils: FakeGradleUtils(),
|
||||
platform: FakePlatform(),
|
||||
@@ -355,15 +339,6 @@ void main() {
|
||||
expect(logger.statusText, contains('Retrying Gradle Build: #2, wait time: 200ms'));
|
||||
|
||||
expect(testFnCalled, equals(maxRetries + 1));
|
||||
expect(testUsage.events, contains(
|
||||
const TestUsageEvent(
|
||||
'build',
|
||||
'gradle',
|
||||
label: 'gradle-random-event-label-failure',
|
||||
parameters: CustomDimensions(),
|
||||
),
|
||||
));
|
||||
expect(testUsage.events, hasLength(4));
|
||||
|
||||
expect(fakeAnalytics.sentEvents, hasLength(7));
|
||||
expect(fakeAnalytics.sentEvents, contains(
|
||||
@@ -383,7 +358,6 @@ void main() {
|
||||
processManager: processManager,
|
||||
fileSystem: fileSystem,
|
||||
artifacts: Artifacts.test(),
|
||||
usage: testUsage,
|
||||
analytics: fakeAnalytics,
|
||||
gradleUtils: FakeGradleUtils(),
|
||||
platform: FakePlatform(),
|
||||
@@ -463,16 +437,6 @@ void main() {
|
||||
|
||||
expect(handlerCalled, isTrue);
|
||||
|
||||
expect(testUsage.events, contains(
|
||||
const TestUsageEvent(
|
||||
'build',
|
||||
'gradle',
|
||||
label: 'gradle-random-event-label-failure',
|
||||
parameters: CustomDimensions(),
|
||||
),
|
||||
));
|
||||
expect(testUsage.events, hasLength(2));
|
||||
|
||||
expect(fakeAnalytics.sentEvents, hasLength(3));
|
||||
expect(fakeAnalytics.sentEvents, contains(
|
||||
Event.flutterBuildInfo(
|
||||
@@ -492,7 +456,6 @@ void main() {
|
||||
processManager: processManager,
|
||||
fileSystem: fileSystem,
|
||||
artifacts: Artifacts.test(),
|
||||
usage: testUsage,
|
||||
analytics: fakeAnalytics,
|
||||
gradleUtils: FakeGradleUtils(),
|
||||
platform: FakePlatform(),
|
||||
@@ -564,7 +527,6 @@ void main() {
|
||||
processManager: processManager,
|
||||
fileSystem: fileSystem,
|
||||
artifacts: Artifacts.test(),
|
||||
usage: testUsage,
|
||||
analytics: fakeAnalytics,
|
||||
gradleUtils: FakeGradleUtils(),
|
||||
platform: FakePlatform(),
|
||||
@@ -654,14 +616,14 @@ void main() {
|
||||
),
|
||||
],
|
||||
);
|
||||
expect(testUsage.events, contains(
|
||||
const TestUsageEvent(
|
||||
'build',
|
||||
'gradle',
|
||||
label: 'gradle-random-event-label-success',
|
||||
parameters: CustomDimensions(),
|
||||
|
||||
expect(
|
||||
fakeAnalytics.sentEvents,
|
||||
contains(
|
||||
Event.flutterBuildInfo(
|
||||
label: 'gradle-random-event-label-success', buildType: 'gradle'),
|
||||
),
|
||||
));
|
||||
);
|
||||
expect(processManager, hasNoRemainingExpectations);
|
||||
}, overrides: <Type, Generator>{
|
||||
AndroidStudio: () => FakeAndroidStudio(),
|
||||
@@ -674,7 +636,6 @@ void main() {
|
||||
processManager: processManager,
|
||||
fileSystem: fileSystem,
|
||||
artifacts: Artifacts.test(),
|
||||
usage: testUsage,
|
||||
analytics: fakeAnalytics,
|
||||
gradleUtils: FakeGradleUtils(),
|
||||
platform: FakePlatform(
|
||||
@@ -766,12 +727,10 @@ void main() {
|
||||
localGradleErrors: <GradleHandledError>[],
|
||||
);
|
||||
|
||||
expect(testUsage.events, contains(
|
||||
const TestUsageEvent(
|
||||
'code-size-analysis',
|
||||
'apk',
|
||||
),
|
||||
));
|
||||
expect(
|
||||
fakeAnalytics.sentEvents,
|
||||
contains(Event.codeSizeAnalysis(platform: 'apk')),
|
||||
);
|
||||
}, overrides: <Type, Generator>{
|
||||
AndroidStudio: () => FakeAndroidStudio(),
|
||||
});
|
||||
@@ -783,7 +742,6 @@ void main() {
|
||||
processManager: processManager,
|
||||
fileSystem: fileSystem,
|
||||
artifacts: Artifacts.test(),
|
||||
usage: testUsage,
|
||||
analytics: fakeAnalytics,
|
||||
gradleUtils: FakeGradleUtils(),
|
||||
platform: FakePlatform(),
|
||||
@@ -922,7 +880,6 @@ android {
|
||||
processManager: processManager,
|
||||
fileSystem: fileSystem,
|
||||
artifacts: Artifacts.test(),
|
||||
usage: testUsage,
|
||||
analytics: fakeAnalytics,
|
||||
gradleUtils: FakeGradleUtils(),
|
||||
platform: FakePlatform(),
|
||||
@@ -968,7 +925,6 @@ BuildVariant: paidProfile
|
||||
processManager: processManager,
|
||||
fileSystem: fileSystem,
|
||||
artifacts: Artifacts.test(),
|
||||
usage: testUsage,
|
||||
analytics: fakeAnalytics,
|
||||
gradleUtils: FakeGradleUtils(),
|
||||
platform: FakePlatform(),
|
||||
@@ -1002,7 +958,6 @@ Gradle Crashed
|
||||
processManager: processManager,
|
||||
fileSystem: fileSystem,
|
||||
artifacts: Artifacts.test(),
|
||||
usage: testUsage,
|
||||
analytics: fakeAnalytics,
|
||||
gradleUtils: FakeGradleUtils(),
|
||||
platform: FakePlatform(),
|
||||
@@ -1043,7 +998,6 @@ Gradle Crashed
|
||||
processManager: processManager,
|
||||
fileSystem: fileSystem,
|
||||
artifacts: Artifacts.test(),
|
||||
usage: testUsage,
|
||||
analytics: fakeAnalytics,
|
||||
gradleUtils: FakeGradleUtils(),
|
||||
platform: FakePlatform(),
|
||||
@@ -1127,7 +1081,6 @@ Gradle Crashed
|
||||
processManager: processManager,
|
||||
fileSystem: fileSystem,
|
||||
artifacts: Artifacts.test(),
|
||||
usage: testUsage,
|
||||
analytics: fakeAnalytics,
|
||||
gradleUtils: FakeGradleUtils(),
|
||||
platform: FakePlatform(),
|
||||
@@ -1194,7 +1147,6 @@ Gradle Crashed
|
||||
processManager: processManager,
|
||||
fileSystem: fileSystem,
|
||||
artifacts: Artifacts.test(),
|
||||
usage: testUsage,
|
||||
analytics: fakeAnalytics,
|
||||
gradleUtils: FakeGradleUtils(),
|
||||
platform: FakePlatform(),
|
||||
@@ -1262,7 +1214,6 @@ Gradle Crashed
|
||||
processManager: processManager,
|
||||
fileSystem: fileSystem,
|
||||
artifacts: Artifacts.testLocalEngine(localEngine: 'out/android_arm', localEngineHost: 'out/host_release'),
|
||||
usage: testUsage,
|
||||
analytics: fakeAnalytics,
|
||||
gradleUtils: FakeGradleUtils(),
|
||||
platform: FakePlatform(),
|
||||
@@ -1348,7 +1299,6 @@ Gradle Crashed
|
||||
processManager: processManager,
|
||||
fileSystem: fileSystem,
|
||||
artifacts: Artifacts.testLocalEngine(localEngine: 'out/android_arm64', localEngineHost: 'out/host_release'),
|
||||
usage: testUsage,
|
||||
analytics: fakeAnalytics,
|
||||
gradleUtils: FakeGradleUtils(),
|
||||
platform: FakePlatform(),
|
||||
@@ -1434,7 +1384,6 @@ Gradle Crashed
|
||||
processManager: processManager,
|
||||
fileSystem: fileSystem,
|
||||
artifacts: Artifacts.testLocalEngine(localEngine: 'out/android_x86', localEngineHost: 'out/host_release'),
|
||||
usage: testUsage,
|
||||
analytics: fakeAnalytics,
|
||||
gradleUtils: FakeGradleUtils(),
|
||||
platform: FakePlatform(),
|
||||
@@ -1520,7 +1469,6 @@ Gradle Crashed
|
||||
processManager: processManager,
|
||||
fileSystem: fileSystem,
|
||||
artifacts: Artifacts.testLocalEngine(localEngine: 'out/android_x64', localEngineHost: 'out/host_release'),
|
||||
usage: testUsage,
|
||||
analytics: fakeAnalytics,
|
||||
gradleUtils: FakeGradleUtils(),
|
||||
platform: FakePlatform(),
|
||||
@@ -1607,7 +1555,6 @@ Gradle Crashed
|
||||
processManager: processManager,
|
||||
fileSystem: fileSystem,
|
||||
artifacts: Artifacts.test(),
|
||||
usage: testUsage,
|
||||
analytics: fakeAnalytics,
|
||||
gradleUtils: FakeGradleUtils(),
|
||||
platform: FakePlatform(),
|
||||
@@ -1674,7 +1621,6 @@ Gradle Crashed
|
||||
processManager: processManager,
|
||||
fileSystem: fileSystem,
|
||||
artifacts: Artifacts.testLocalEngine(localEngine: 'out/android_arm', localEngineHost: 'out/host_release'),
|
||||
usage: testUsage,
|
||||
analytics: fakeAnalytics,
|
||||
gradleUtils: FakeGradleUtils(),
|
||||
platform: FakePlatform(),
|
||||
@@ -1771,7 +1717,6 @@ Gradle Crashed
|
||||
processManager: processManager,
|
||||
fileSystem: fileSystem,
|
||||
artifacts: Artifacts.testLocalEngine(localEngine: 'out/android_arm64', localEngineHost: 'out/host_release'),
|
||||
usage: testUsage,
|
||||
analytics: fakeAnalytics,
|
||||
gradleUtils: FakeGradleUtils(),
|
||||
platform: FakePlatform(),
|
||||
@@ -1867,7 +1812,6 @@ Gradle Crashed
|
||||
processManager: processManager,
|
||||
fileSystem: fileSystem,
|
||||
artifacts: Artifacts.testLocalEngine(localEngine: 'out/android_x86', localEngineHost: 'out/host_release'),
|
||||
usage: testUsage,
|
||||
analytics: fakeAnalytics,
|
||||
gradleUtils: FakeGradleUtils(),
|
||||
platform: FakePlatform(),
|
||||
@@ -1963,7 +1907,6 @@ Gradle Crashed
|
||||
processManager: processManager,
|
||||
fileSystem: fileSystem,
|
||||
artifacts: Artifacts.testLocalEngine(localEngine: 'out/android_x64', localEngineHost: 'out/host_release'),
|
||||
usage: testUsage,
|
||||
analytics: fakeAnalytics,
|
||||
gradleUtils: FakeGradleUtils(),
|
||||
platform: FakePlatform(),
|
||||
|
||||
@@ -8,7 +8,6 @@ import 'package:flutter_tools/src/base/file_system.dart';
|
||||
import 'package:flutter_tools/src/base/logger.dart';
|
||||
import 'package:flutter_tools/src/build_info.dart';
|
||||
import 'package:flutter_tools/src/project.dart';
|
||||
import 'package:flutter_tools/src/reporting/reporting.dart';
|
||||
import 'package:unified_analytics/unified_analytics.dart';
|
||||
|
||||
import '../../src/common.dart';
|
||||
@@ -37,7 +36,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -56,7 +54,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -75,7 +72,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -94,7 +90,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -113,7 +108,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -132,7 +126,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -151,7 +144,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -170,7 +162,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -189,7 +180,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -208,7 +198,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -227,7 +216,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -241,7 +229,6 @@ void main() {
|
||||
project,
|
||||
BuildInfo.debug,
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -260,7 +247,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -279,7 +265,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -298,7 +283,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -309,17 +293,16 @@ void main() {
|
||||
testWithoutContext("Finds app bundle when flavor doesn't contain underscores in profile mode", () {
|
||||
final FlutterProject project = generateFakeAppBundle('fooProfile', 'app.aab', fileSystem);
|
||||
final File bundle = findBundleFile(
|
||||
project,
|
||||
const BuildInfo(
|
||||
BuildMode.profile,
|
||||
'foo',
|
||||
treeShakeIcons: false,
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
project,
|
||||
const BuildInfo(
|
||||
BuildMode.profile,
|
||||
'foo',
|
||||
treeShakeIcons: false,
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
expect(bundle, isNotNull);
|
||||
expect(bundle.path, '/build/app/outputs/bundle/fooProfile/app.aab');
|
||||
@@ -336,7 +319,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -355,7 +337,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -374,7 +355,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -393,7 +373,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -407,7 +386,6 @@ void main() {
|
||||
project,
|
||||
BuildInfo.debug,
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -426,7 +404,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -445,7 +422,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -464,7 +440,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -483,7 +458,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -503,7 +477,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -523,7 +496,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
TestUsage(),
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
@@ -533,7 +505,6 @@ void main() {
|
||||
|
||||
testWithoutContext('AAB not found', () {
|
||||
final FlutterProject project = FlutterProject.fromDirectoryTest(fileSystem.currentDirectory);
|
||||
final TestUsage testUsage = TestUsage();
|
||||
expect(
|
||||
() {
|
||||
findBundleFile(
|
||||
@@ -545,7 +516,6 @@ void main() {
|
||||
packageConfigPath: '.dart_tool/package_config.json',
|
||||
),
|
||||
BufferLogger.test(),
|
||||
testUsage,
|
||||
fakeAnalytics,
|
||||
);
|
||||
},
|
||||
@@ -553,16 +523,6 @@ void main() {
|
||||
message:
|
||||
"Gradle build failed to produce an .aab file. It's likely that this file "
|
||||
"was generated under ${project.android.buildDirectory.path}, but the tool couldn't find it."));
|
||||
expect(testUsage.events, contains(
|
||||
TestUsageEvent(
|
||||
'build',
|
||||
'gradle',
|
||||
label: 'gradle-expected-file-not-found',
|
||||
parameters: CustomDimensions.fromMap(<String, String> {
|
||||
'cd37': 'androidGradlePluginVersion: 7.6.3, fileExtension: .aab',
|
||||
}),
|
||||
),
|
||||
));
|
||||
expect(fakeAnalytics.sentEvents, hasLength(1));
|
||||
expect(
|
||||
fakeAnalytics.sentEvents,
|
||||
|
||||
@@ -7,7 +7,6 @@ import 'package:file/memory.dart';
|
||||
import 'package:flutter_tools/src/base/analyze_size.dart';
|
||||
import 'package:flutter_tools/src/base/file_system.dart';
|
||||
import 'package:flutter_tools/src/base/logger.dart';
|
||||
import 'package:flutter_tools/src/reporting/reporting.dart';
|
||||
import 'package:unified_analytics/unified_analytics.dart';
|
||||
|
||||
import '../../src/common.dart';
|
||||
@@ -66,7 +65,6 @@ void main() {
|
||||
fileSystem: fileSystem,
|
||||
logger: logger,
|
||||
appFilenamePattern: RegExp(r'lib.*app\.so'),
|
||||
flutterUsage: TestUsage(),
|
||||
analytics: const NoOpAnalytics(),
|
||||
);
|
||||
|
||||
@@ -151,7 +149,6 @@ void main() {
|
||||
fileSystem: fileSystem,
|
||||
logger: logger,
|
||||
appFilenamePattern: RegExp(r'lib.*app\.so'),
|
||||
flutterUsage: TestUsage(),
|
||||
analytics: const NoOpAnalytics(),
|
||||
);
|
||||
|
||||
@@ -194,7 +191,6 @@ void main() {
|
||||
fileSystem: fileSystem,
|
||||
logger: logger,
|
||||
appFilenamePattern: RegExp(r'lib.*app\.so'),
|
||||
flutterUsage: TestUsage(),
|
||||
analytics: const NoOpAnalytics(),
|
||||
);
|
||||
|
||||
@@ -238,7 +234,6 @@ void main() {
|
||||
fileSystem: fileSystem,
|
||||
logger: logger,
|
||||
appFilenamePattern: RegExp(r'lib.*app\.so'),
|
||||
flutterUsage: TestUsage(),
|
||||
analytics: const NoOpAnalytics(),
|
||||
);
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ import 'package:flutter_tools/src/migrations/cocoapods_toolchain_directory_migra
|
||||
import 'package:flutter_tools/src/migrations/xcode_project_object_version_migration.dart';
|
||||
import 'package:flutter_tools/src/migrations/xcode_script_build_phase_migration.dart';
|
||||
import 'package:flutter_tools/src/migrations/xcode_thin_binary_build_phase_input_paths_migration.dart';
|
||||
import 'package:flutter_tools/src/reporting/reporting.dart';
|
||||
import 'package:flutter_tools/src/xcode_project.dart';
|
||||
import 'package:test/fake.dart';
|
||||
import 'package:unified_analytics/unified_analytics.dart';
|
||||
@@ -32,15 +31,11 @@ import '../../src/fakes.dart';
|
||||
|
||||
void main () {
|
||||
group('iOS migration', () {
|
||||
late TestUsage testUsage;
|
||||
late FakeAnalytics fakeAnalytics;
|
||||
|
||||
setUp(() {
|
||||
testUsage = TestUsage();
|
||||
|
||||
final MemoryFileSystem fs = MemoryFileSystem.test();
|
||||
fakeAnalytics = getInitializedFakeAnalyticsInstance(
|
||||
fs: fs,
|
||||
fs: MemoryFileSystem.test(),
|
||||
fakeFlutterVersion: FakeFlutterVersion(),
|
||||
);
|
||||
});
|
||||
@@ -69,11 +64,9 @@ void main () {
|
||||
final RemoveFrameworkLinkAndEmbeddingMigration iosProjectMigration = RemoveFrameworkLinkAndEmbeddingMigration(
|
||||
project,
|
||||
testLogger,
|
||||
testUsage,
|
||||
fakeAnalytics,
|
||||
);
|
||||
await iosProjectMigration.migrate();
|
||||
expect(testUsage.events, isEmpty);
|
||||
expect(fakeAnalytics.sentEvents, isEmpty);
|
||||
|
||||
expect(xcodeProjectInfoFile.existsSync(), isFalse);
|
||||
@@ -90,11 +83,9 @@ void main () {
|
||||
final RemoveFrameworkLinkAndEmbeddingMigration iosProjectMigration = RemoveFrameworkLinkAndEmbeddingMigration(
|
||||
project,
|
||||
testLogger,
|
||||
testUsage,
|
||||
fakeAnalytics,
|
||||
);
|
||||
await iosProjectMigration.migrate();
|
||||
expect(testUsage.events, isEmpty);
|
||||
expect(fakeAnalytics.sentEvents, isEmpty);
|
||||
|
||||
expect(xcodeProjectInfoFile.lastModifiedSync(), projectLastModified);
|
||||
@@ -112,7 +103,6 @@ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.
|
||||
final RemoveFrameworkLinkAndEmbeddingMigration iosProjectMigration = RemoveFrameworkLinkAndEmbeddingMigration(
|
||||
project,
|
||||
testLogger,
|
||||
testUsage,
|
||||
fakeAnalytics,
|
||||
);
|
||||
await iosProjectMigration.migrate();
|
||||
@@ -140,11 +130,9 @@ keep this 2
|
||||
final RemoveFrameworkLinkAndEmbeddingMigration iosProjectMigration = RemoveFrameworkLinkAndEmbeddingMigration(
|
||||
project,
|
||||
testLogger,
|
||||
testUsage,
|
||||
fakeAnalytics,
|
||||
);
|
||||
await iosProjectMigration.migrate();
|
||||
expect(testUsage.events, isEmpty);
|
||||
expect(fakeAnalytics.sentEvents, isEmpty);
|
||||
|
||||
expect(xcodeProjectInfoFile.readAsStringSync(), r'''
|
||||
@@ -163,14 +151,11 @@ keep this 2
|
||||
final RemoveFrameworkLinkAndEmbeddingMigration iosProjectMigration = RemoveFrameworkLinkAndEmbeddingMigration(
|
||||
project,
|
||||
testLogger,
|
||||
testUsage,
|
||||
fakeAnalytics,
|
||||
);
|
||||
|
||||
expect(iosProjectMigration.migrate, throwsToolExit(message: 'Your Xcode project requires migration'));
|
||||
expect(testUsage.events, contains(
|
||||
const TestUsageEvent('ios-migration', 'remove-frameworks', label: 'failure'),
|
||||
));
|
||||
|
||||
expect(fakeAnalytics.sentEvents, contains(
|
||||
Event.appleUsageEvent(
|
||||
workflow: 'ios-migration',
|
||||
@@ -188,13 +173,9 @@ keep this 2
|
||||
final RemoveFrameworkLinkAndEmbeddingMigration iosProjectMigration = RemoveFrameworkLinkAndEmbeddingMigration(
|
||||
project,
|
||||
testLogger,
|
||||
testUsage,
|
||||
fakeAnalytics,
|
||||
);
|
||||
expect(iosProjectMigration.migrate, throwsToolExit(message: 'Your Xcode project requires migration'));
|
||||
expect(testUsage.events, contains(
|
||||
const TestUsageEvent('ios-migration', 'remove-frameworks', label: 'failure'),
|
||||
));
|
||||
expect(fakeAnalytics.sentEvents, contains(
|
||||
Event.appleUsageEvent(
|
||||
workflow: 'ios-migration',
|
||||
@@ -212,13 +193,10 @@ keep this 2
|
||||
final RemoveFrameworkLinkAndEmbeddingMigration iosProjectMigration = RemoveFrameworkLinkAndEmbeddingMigration(
|
||||
project,
|
||||
testLogger,
|
||||
testUsage,
|
||||
fakeAnalytics,
|
||||
);
|
||||
expect(iosProjectMigration.migrate, throwsToolExit(message: 'Your Xcode project requires migration'));
|
||||
expect(testUsage.events, contains(
|
||||
const TestUsageEvent('ios-migration', 'remove-frameworks', label: 'failure'),
|
||||
));
|
||||
|
||||
expect(fakeAnalytics.sentEvents, contains(
|
||||
Event.appleUsageEvent(
|
||||
workflow: 'ios-migration',
|
||||
|
||||
@@ -16,7 +16,6 @@ import 'package:flutter_tools/src/ios/code_signing.dart';
|
||||
import 'package:flutter_tools/src/ios/mac.dart';
|
||||
import 'package:flutter_tools/src/ios/xcresult.dart';
|
||||
import 'package:flutter_tools/src/project.dart';
|
||||
import 'package:flutter_tools/src/reporting/reporting.dart';
|
||||
import 'package:test/fake.dart';
|
||||
import 'package:unified_analytics/unified_analytics.dart';
|
||||
|
||||
@@ -191,14 +190,12 @@ void main() {
|
||||
|
||||
group('Diagnose Xcode build failure', () {
|
||||
late Map<String, String> buildSettings;
|
||||
late TestUsage testUsage;
|
||||
late FakeAnalytics fakeAnalytics;
|
||||
|
||||
setUp(() {
|
||||
buildSettings = <String, String>{
|
||||
'PRODUCT_BUNDLE_IDENTIFIER': 'test.app',
|
||||
};
|
||||
testUsage = TestUsage();
|
||||
|
||||
final MemoryFileSystem fs = MemoryFileSystem.test();
|
||||
fakeAnalytics = getInitializedFakeAnalyticsInstance(
|
||||
@@ -222,24 +219,12 @@ void main() {
|
||||
final MemoryFileSystem fs = MemoryFileSystem.test();
|
||||
await diagnoseXcodeBuildFailure(
|
||||
buildResult,
|
||||
flutterUsage: testUsage,
|
||||
logger: logger,
|
||||
analytics: fakeAnalytics,
|
||||
fileSystem: fs,
|
||||
platform: SupportedPlatform.ios,
|
||||
project: FakeFlutterProject(fileSystem: fs),
|
||||
);
|
||||
expect(testUsage.events, contains(
|
||||
TestUsageEvent(
|
||||
'build',
|
||||
'ios',
|
||||
label: 'xcode-bitcode-failure',
|
||||
parameters: CustomDimensions(
|
||||
buildEventCommand: buildCommands.toString(),
|
||||
buildEventSettings: buildSettings.toString(),
|
||||
),
|
||||
),
|
||||
));
|
||||
expect(
|
||||
fakeAnalytics.sentEvents,
|
||||
contains(Event.flutterBuildInfo(
|
||||
@@ -323,7 +308,6 @@ Error launching application on iPhone.''',
|
||||
final MemoryFileSystem fs = MemoryFileSystem.test();
|
||||
await diagnoseXcodeBuildFailure(
|
||||
buildResult,
|
||||
flutterUsage: testUsage,
|
||||
logger: logger,
|
||||
analytics: fakeAnalytics,
|
||||
fileSystem: fs,
|
||||
@@ -369,7 +353,6 @@ Error launching application on iPhone.''',
|
||||
final MemoryFileSystem fs = MemoryFileSystem.test();
|
||||
await diagnoseXcodeBuildFailure(
|
||||
buildResult,
|
||||
flutterUsage: testUsage,
|
||||
logger: logger,
|
||||
analytics: fakeAnalytics,
|
||||
fileSystem: fs,
|
||||
@@ -417,7 +400,6 @@ Could not build the precompiled application for the device.''',
|
||||
final MemoryFileSystem fs = MemoryFileSystem.test();
|
||||
await diagnoseXcodeBuildFailure(
|
||||
buildResult,
|
||||
flutterUsage: testUsage,
|
||||
logger: logger,
|
||||
analytics: fakeAnalytics,
|
||||
fileSystem: fs,
|
||||
@@ -469,7 +451,6 @@ Could not build the precompiled application for the device.''',
|
||||
final MemoryFileSystem fs = MemoryFileSystem.test();
|
||||
await diagnoseXcodeBuildFailure(
|
||||
buildResult,
|
||||
flutterUsage: testUsage,
|
||||
logger: logger,
|
||||
analytics: fakeAnalytics,
|
||||
fileSystem: fs,
|
||||
@@ -504,7 +485,6 @@ Could not build the precompiled application for the device.''',
|
||||
project.ios.podfile.createSync(recursive: true);
|
||||
await diagnoseXcodeBuildFailure(
|
||||
buildResult,
|
||||
flutterUsage: testUsage,
|
||||
logger: logger,
|
||||
analytics: fakeAnalytics,
|
||||
fileSystem: fs,
|
||||
@@ -549,7 +529,6 @@ duplicate symbol '_$s29plugin_1_name23PluginNamePluginC9setDouble3key5valueySS_S
|
||||
project.ios.podfile.createSync(recursive: true);
|
||||
await diagnoseXcodeBuildFailure(
|
||||
buildResult,
|
||||
flutterUsage: testUsage,
|
||||
logger: logger,
|
||||
analytics: fakeAnalytics,
|
||||
fileSystem: fs,
|
||||
@@ -591,7 +570,6 @@ duplicate symbol '_$s29plugin_1_name23PluginNamePluginC9setDouble3key5valueySS_S
|
||||
project.ios.podfile.createSync(recursive: true);
|
||||
await diagnoseXcodeBuildFailure(
|
||||
buildResult,
|
||||
flutterUsage: testUsage,
|
||||
logger: logger,
|
||||
analytics: fakeAnalytics,
|
||||
fileSystem: fs,
|
||||
@@ -632,7 +610,6 @@ duplicate symbol '_$s29plugin_1_name23PluginNamePluginC9setDouble3key5valueySS_S
|
||||
project.ios.podfile.createSync(recursive: true);
|
||||
await diagnoseXcodeBuildFailure(
|
||||
buildResult,
|
||||
flutterUsage: testUsage,
|
||||
logger: logger,
|
||||
analytics: fakeAnalytics,
|
||||
fileSystem: fs,
|
||||
@@ -675,7 +652,6 @@ duplicate symbol '_$s29plugin_1_name23PluginNamePluginC9setDouble3key5valueySS_S
|
||||
.createSync(recursive: true);
|
||||
await diagnoseXcodeBuildFailure(
|
||||
buildResult,
|
||||
flutterUsage: testUsage,
|
||||
logger: logger,
|
||||
analytics: fakeAnalytics,
|
||||
fileSystem: fs,
|
||||
|
||||
Reference in New Issue
Block a user