Unverified Commit cdc2d990 authored by Ian Hickson's avatar Ian Hickson Committed by GitHub
parent 9529d678
......@@ -413,7 +413,7 @@ class DebugAssetServer extends AssetServer {
));
if (dart2jsArchive.existsSync()) {
final Archive archive = TarDecoder().decodeBytes(dart2jsArchive.readAsBytesSync());
partFiles = fs.systemTempDirectory.createTempSync('_flutter_tool')
partFiles = fs.systemTempDirectory.createTempSync('flutter_tool.')
..createSync();
for (ArchiveFile file in archive) {
partFiles.childFile(file.name).writeAsBytesSync(file.content);
......
......@@ -885,7 +885,7 @@ class AndroidMavenArtifacts extends ArtifactSet {
@override
Future<void> update() async {
final Directory tempDir =
fs.systemTempDirectory.createTempSync('gradle_wrapper.');
fs.systemTempDirectory.createTempSync('flutter_gradle_wrapper.');
injectGradleWrapperIfNeeded(tempDir);
final Status status = logger.startProgress('Downloading Android Maven dependencies...',
......
......@@ -545,7 +545,7 @@ abstract class ResidentRunner {
packagesFilePath = packagesFilePath ?? fs.path.absolute(PackageMap.globalPackagesPath),
_dillOutputPath = dillOutputPath,
artifactDirectory = dillOutputPath == null
? fs.systemTempDirectory.createTempSync('_fluttter_tool')
? fs.systemTempDirectory.createTempSync('flutter_tool.')
: fs.file(dillOutputPath).parent,
assetBundle = AssetBundleFactory.instance.createBundle() {
if (!artifactDirectory.existsSync()) {
......
......@@ -63,7 +63,7 @@ Future<int> runTests(
];
if (web) {
final String tempBuildDir = fs.systemTempDirectory
.createTempSync('_flutter_test')
.createTempSync('flutter_test.')
.absolute
.uri
.toFilePath();
......
......@@ -89,7 +89,7 @@ class ChromeLauncher {
/// `skipCheck` does not attempt to make a devtools connection before returning.
Future<Chrome> launch(String url, { bool headless = false, bool skipCheck = false }) async {
final String chromeExecutable = findChromeExecutable();
final Directory dataDir = fs.systemTempDirectory.createTempSync('flutter_tool_');
final Directory dataDir = fs.systemTempDirectory.createTempSync('flutter_tool.');
final int port = await os.findFreePort();
final List<String> args = <String>[
chromeExecutable,
......
......@@ -444,7 +444,7 @@ someOtherTask
setUp(() {
mockLogger = BufferLogger();
tempDir = fs.systemTempDirectory.createTempSync('settings_aar_test.');
tempDir = fs.systemTempDirectory.createTempSync('flutter_settings_aar_test.');
});
......@@ -852,7 +852,7 @@ flutter:
setUp(() {
fs = MemoryFileSystem();
tempDir = fs.systemTempDirectory.createTempSync('artifacts_test.');
tempDir = fs.systemTempDirectory.createTempSync('flutter_artifacts_test.');
gradleBinary = platform.isWindows ? 'gradlew.bat' : 'gradlew';
gradleWrapperDirectory = fs.directory(
fs.path.join(tempDir.path, 'bin', 'cache', 'artifacts', 'gradle_wrapper'));
......@@ -960,7 +960,7 @@ at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)''';
setUp(() {
memoryFileSystem = MemoryFileSystem();
tempDir = memoryFileSystem.systemTempDirectory.createTempSync('artifacts_test.');
tempDir = memoryFileSystem.systemTempDirectory.createTempSync('flutter_artifacts_test.');
gradleWrapperDirectory = memoryFileSystem.directory(
memoryFileSystem.path.join(tempDir.path, 'bin', 'cache', 'artifacts', 'gradle_wrapper'));
gradleWrapperDirectory.createSync(recursive: true);
......@@ -1157,7 +1157,7 @@ at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)''';
});
testUsingContext('returns true when the project is using AndroidX', () async {
final Directory androidDirectory = fs.systemTempDirectory.createTempSync('android.');
final Directory androidDirectory = fs.systemTempDirectory.createTempSync('flutter_android.');
androidDirectory
.childFile('gradle.properties')
......@@ -1170,7 +1170,7 @@ at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)''';
});
testUsingContext('returns false when the project is not using AndroidX', () async {
final Directory androidDirectory = fs.systemTempDirectory.createTempSync('android.');
final Directory androidDirectory = fs.systemTempDirectory.createTempSync('flutter_android.');
androidDirectory
.childFile('gradle.properties')
......@@ -1183,7 +1183,7 @@ at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)''';
});
testUsingContext('returns false when gradle.properties does not exist', () async {
final Directory androidDirectory = fs.systemTempDirectory.createTempSync('android.');
final Directory androidDirectory = fs.systemTempDirectory.createTempSync('flutter_android.');
expect(isAppUsingAndroidX(androidDirectory), isFalse);
......@@ -1313,7 +1313,7 @@ plugin2=${plugin2.path}
mockProcessManager = MockProcessManager();
android = fakePlatform('android');
final Directory tempDir = fs.systemTempDirectory.createTempSync('artifacts_test.');
final Directory tempDir = fs.systemTempDirectory.createTempSync('flutter_artifacts_test.');
cache = Cache(rootOverride: tempDir);
final Directory gradleWrapperDirectory = tempDir
......
......@@ -107,7 +107,7 @@ void main() {
.childFile('gradle.properties')
.writeAsStringSync('irrelevant');
final Directory gradleWrapperDir = fs.systemTempDirectory.createTempSync('gradle_wrapper.');
final Directory gradleWrapperDir = fs.systemTempDirectory.createTempSync('flutter_application_package_test_gradle_wrapper.');
when(mockCache.getArtifactDirectory('gradle_wrapper')).thenReturn(gradleWrapperDir);
fs.directory(gradleWrapperDir.childDirectory('gradle').childDirectory('wrapper'))
......
......@@ -19,7 +19,7 @@ void main() {
setUp(() {
memoryFileSystem = MemoryFileSystem();
tempDir = memoryFileSystem.systemTempDirectory.createTempSync('artifacts_test.');
tempDir = memoryFileSystem.systemTempDirectory.createTempSync('flutter_artifacts_test.');
});
tearDown(() {
......
......@@ -234,8 +234,8 @@ void main() {
});
testUsingContext('makes binary dirs readable and executable by all', () async {
final Directory artifactDir = fs.systemTempDirectory.createTempSync('artifact.');
final Directory downloadDir = fs.systemTempDirectory.createTempSync('download.');
final Directory artifactDir = fs.systemTempDirectory.createTempSync('flutter_cache_test_artifact.');
final Directory downloadDir = fs.systemTempDirectory.createTempSync('flutter_cache_test_download.');
when(mockCache.getArtifactDirectory(any)).thenReturn(artifactDir);
when(mockCache.getDownloadDir()).thenReturn(downloadDir);
final FakeCachedArtifact artifact = FakeCachedArtifact(
......@@ -282,7 +282,7 @@ void main() {
final AndroidMavenArtifacts mavenArtifacts = AndroidMavenArtifacts();
expect(mavenArtifacts.isUpToDate(), isFalse);
final Directory gradleWrapperDir = fs.systemTempDirectory.createTempSync('gradle_wrapper.');
final Directory gradleWrapperDir = fs.systemTempDirectory.createTempSync('flutter_cache_test_gradle_wrapper.');
when(mockCache.getArtifactDirectory('gradle_wrapper')).thenReturn(gradleWrapperDir);
fs.directory(gradleWrapperDir.childDirectory('gradle').childDirectory('wrapper'))
......
......@@ -197,7 +197,7 @@ flutter:
when(androidProject.appManifestFile).thenReturn(androidManifest);
final Directory pluginUsingJavaAndNewEmbeddingDir =
fs.systemTempDirectory.createTempSync('pluginUsingJavaAndNewEmbeddingDir.');
fs.systemTempDirectory.createTempSync('flutter_plugin_using_java_and_new_embedding_dir.');
pluginUsingJavaAndNewEmbeddingDir
.childFile('pubspec.yaml')
.writeAsStringSync('''
......@@ -217,7 +217,7 @@ flutter:
..writeAsStringSync('import io.flutter.embedding.engine.plugins.FlutterPlugin;');
final Directory pluginUsingKotlinAndNewEmbeddingDir =
fs.systemTempDirectory.createTempSync('pluginUsingKotlinAndNewEmbeddingDir.');
fs.systemTempDirectory.createTempSync('flutter_plugin_using_kotlin_and_new_embedding_dir.');
pluginUsingKotlinAndNewEmbeddingDir
.childFile('pubspec.yaml')
.writeAsStringSync('''
......@@ -237,7 +237,7 @@ flutter:
..writeAsStringSync('import io.flutter.embedding.engine.plugins.FlutterPlugin');
final Directory pluginUsingOldEmbeddingDir =
fs.systemTempDirectory.createTempSync('pluginUsingOldEmbeddingDir.');
fs.systemTempDirectory.createTempSync('flutter_plugin_using_old_embedding_dir.');
pluginUsingOldEmbeddingDir
.childFile('pubspec.yaml')
.writeAsStringSync('''
......
......@@ -306,7 +306,7 @@ void main() {
}));
test('ResidentRunner uses temp directory when there is no output dill path', () => testbed.run(() {
expect(residentRunner.artifactDirectory.path, contains('_fluttter_tool'));
expect(residentRunner.artifactDirectory.path, contains('flutter_tool.'));
final ResidentRunner otherRunner = HotRunner(
<FlutterDevice>[
......
......@@ -15,8 +15,9 @@ import '../src/common.dart';
/// underlying path to avoid issues with breakpoints/hot reload.
/// https://github.com/flutter/flutter/pull/21741
Directory createResolvedTempDirectorySync(String prefix) {
final Directory tempDir = fs.systemTempDirectory.createTempSync('flutter_$prefix');
return fs.directory(tempDir.resolveSymbolicLinksSync());
assert(prefix.endsWith('.'));
final Directory tempDirectory = fs.systemTempDirectory.createTempSync('flutter_$prefix');
return fs.directory(tempDirectory.resolveSymbolicLinksSync());
}
void writeFile(String path, String content) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment