2020-04-24 23:36:52 +00:00
|
|
|
diff --git a/dev/devicelab/lib/framework/runner.dart b/dev/devicelab/lib/framework/runner.dart
|
2020-11-03 02:18:15 +00:00
|
|
|
index d045c83f04..d51973020b 100644
|
2020-04-24 23:36:52 +00:00
|
|
|
--- a/dev/devicelab/lib/framework/runner.dart
|
|
|
|
+++ b/dev/devicelab/lib/framework/runner.dart
|
2020-11-03 02:18:15 +00:00
|
|
|
@@ -136,7 +136,7 @@ Future<void> cleanupSystem() async {
|
2020-04-24 23:36:52 +00:00
|
|
|
print('\nTelling Gradle to shut down (JAVA_HOME=$javaHome)');
|
|
|
|
final String gradlewBinaryName = Platform.isWindows ? 'gradlew.bat' : 'gradlew';
|
|
|
|
final Directory tempDir = Directory.systemTemp.createTempSync('flutter_devicelab_shutdown_gradle.');
|
|
|
|
- recursiveCopy(Directory(path.join(flutterDirectory.path, 'bin', 'cache', 'artifacts', 'gradle_wrapper')), tempDir);
|
2020-08-20 17:08:02 +00:00
|
|
|
+ recursiveCopy(Directory(path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'artifacts', 'gradle_wrapper')), tempDir);
|
2020-04-24 23:36:52 +00:00
|
|
|
copy(File(path.join(path.join(flutterDirectory.path, 'packages', 'flutter_tools'), 'templates', 'app', 'android.tmpl', 'gradle', 'wrapper', 'gradle-wrapper.properties')), Directory(path.join(tempDir.path, 'gradle', 'wrapper')));
|
|
|
|
if (!Platform.isWindows) {
|
|
|
|
await exec(
|
|
|
|
diff --git a/packages/flutter_tools/lib/src/asset.dart b/packages/flutter_tools/lib/src/asset.dart
|
2020-11-03 02:18:15 +00:00
|
|
|
index 8da01315ae..bb8d61d7f2 100644
|
2020-04-24 23:36:52 +00:00
|
|
|
--- a/packages/flutter_tools/lib/src/asset.dart
|
|
|
|
+++ b/packages/flutter_tools/lib/src/asset.dart
|
2020-08-20 17:08:02 +00:00
|
|
|
@@ -8,6 +8,7 @@ import 'package:meta/meta.dart';
|
|
|
|
import 'package:package_config/package_config.dart';
|
2020-04-24 23:36:52 +00:00
|
|
|
import 'package:yaml/yaml.dart';
|
|
|
|
|
|
|
|
+import 'base/common.dart';
|
|
|
|
import 'base/context.dart';
|
|
|
|
import 'base/file_system.dart';
|
2020-08-20 17:08:02 +00:00
|
|
|
import 'base/utils.dart';
|
2020-11-03 02:18:15 +00:00
|
|
|
@@ -399,7 +400,7 @@ List<_Asset> _getMaterialAssets(String fontSet) {
|
2020-08-20 17:08:02 +00:00
|
|
|
for (final Map<dynamic, dynamic> font in (family['fonts'] as List<dynamic>).cast<Map<dynamic, dynamic>>()) {
|
|
|
|
final Uri entryUri = globals.fs.path.toUri(font['asset'] as String);
|
2020-04-24 23:36:52 +00:00
|
|
|
result.add(_Asset(
|
2020-08-20 17:08:02 +00:00
|
|
|
- baseDir: globals.fs.path.join(Cache.flutterRoot, 'bin', 'cache', 'artifacts', 'material_fonts'),
|
2020-11-03 02:18:15 +00:00
|
|
|
+ baseDir: globals.fs.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'artifacts', 'material_fonts'),
|
2020-04-24 23:36:52 +00:00
|
|
|
relativeUri: Uri(path: entryUri.pathSegments.last),
|
|
|
|
entryUri: entryUri,
|
2020-08-20 17:08:02 +00:00
|
|
|
package: null,
|
2020-04-24 23:36:52 +00:00
|
|
|
diff --git a/packages/flutter_tools/lib/src/cache.dart b/packages/flutter_tools/lib/src/cache.dart
|
2020-11-03 02:18:15 +00:00
|
|
|
index a35d8f87d0..a40027dc74 100644
|
2020-04-24 23:36:52 +00:00
|
|
|
--- a/packages/flutter_tools/lib/src/cache.dart
|
|
|
|
+++ b/packages/flutter_tools/lib/src/cache.dart
|
2020-11-03 02:18:15 +00:00
|
|
|
@@ -215,8 +215,15 @@ class Cache {
|
2020-04-24 23:36:52 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
assert(_lock == null);
|
|
|
|
+
|
2020-08-20 17:08:02 +00:00
|
|
|
+ final Directory dir = globals.fs.directory(globals.fs.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter'));
|
2020-04-24 23:36:52 +00:00
|
|
|
+ if (!dir.existsSync()) {
|
|
|
|
+ dir.createSync(recursive: true);
|
2020-08-20 17:08:02 +00:00
|
|
|
+ globals.os.chmod(dir, '755');
|
2020-04-24 23:36:52 +00:00
|
|
|
+ }
|
2020-08-20 17:08:02 +00:00
|
|
|
+
|
2020-04-24 23:36:52 +00:00
|
|
|
final File lockFile =
|
2020-08-20 17:08:02 +00:00
|
|
|
- globals.fs.file(globals.fs.path.join(flutterRoot, 'bin', 'cache', 'lockfile'));
|
|
|
|
+ globals.fs.file(globals.fs.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'lockfile'));
|
2020-04-24 23:36:52 +00:00
|
|
|
try {
|
|
|
|
_lock = lockFile.openSync(mode: FileMode.write);
|
|
|
|
} on FileSystemException catch (e) {
|
2020-11-03 02:18:15 +00:00
|
|
|
@@ -319,7 +326,7 @@ class Cache {
|
2020-04-24 23:36:52 +00:00
|
|
|
if (_rootOverride != null) {
|
2020-08-20 17:08:02 +00:00
|
|
|
return _fileSystem.directory(_fileSystem.path.join(_rootOverride.path, 'bin', 'cache'));
|
2020-04-24 23:36:52 +00:00
|
|
|
} else {
|
2020-08-20 17:08:02 +00:00
|
|
|
- return _fileSystem.directory(_fileSystem.path.join(flutterRoot, 'bin', 'cache'));
|
|
|
|
+ return _fileSystem.directory(_fileSystem.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter'));
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|