flutter 1.22.4 -> 2.0.3
This commit is contained in:
@@ -1,59 +1,54 @@
|
||||
diff --git a/dev/devicelab/lib/framework/runner.dart b/dev/devicelab/lib/framework/runner.dart
|
||||
index d045c83f04..d51973020b 100644
|
||||
--- a/dev/devicelab/lib/framework/runner.dart
|
||||
+++ b/dev/devicelab/lib/framework/runner.dart
|
||||
@@ -136,7 +136,7 @@ Future<void> cleanupSystem() async {
|
||||
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);
|
||||
+ recursiveCopy(Directory(path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'artifacts', 'gradle_wrapper')), tempDir);
|
||||
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
|
||||
index 8da01315ae..bb8d61d7f2 100644
|
||||
index a6c59bae07..21f6c9812a 100644
|
||||
--- a/packages/flutter_tools/lib/src/asset.dart
|
||||
+++ b/packages/flutter_tools/lib/src/asset.dart
|
||||
@@ -8,6 +8,7 @@ import 'package:meta/meta.dart';
|
||||
@@ -5,6 +5,7 @@
|
||||
import 'package:meta/meta.dart';
|
||||
import 'package:package_config/package_config.dart';
|
||||
import 'package:yaml/yaml.dart';
|
||||
|
||||
+import 'base/common.dart';
|
||||
import 'base/context.dart';
|
||||
import 'base/file_system.dart';
|
||||
import 'base/utils.dart';
|
||||
@@ -399,7 +400,7 @@ List<_Asset> _getMaterialAssets(String fontSet) {
|
||||
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);
|
||||
result.add(_Asset(
|
||||
- baseDir: globals.fs.path.join(Cache.flutterRoot, 'bin', 'cache', 'artifacts', 'material_fonts'),
|
||||
+ baseDir: globals.fs.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'artifacts', 'material_fonts'),
|
||||
relativeUri: Uri(path: entryUri.pathSegments.last),
|
||||
entryUri: entryUri,
|
||||
package: null,
|
||||
import 'base/logger.dart';
|
||||
@@ -14,6 +15,7 @@ import 'cache.dart';
|
||||
import 'convert.dart';
|
||||
import 'dart/package_map.dart';
|
||||
import 'devfs.dart';
|
||||
+import 'globals.dart' as globals;
|
||||
import 'flutter_manifest.dart';
|
||||
import 'license_collector.dart';
|
||||
import 'project.dart';
|
||||
@@ -377,7 +379,7 @@ class ManifestAssetBundle implements AssetBundle {
|
||||
for (final Map<String, Object> font in family['fonts'] as List<Map<String, Object>>) {
|
||||
final Uri entryUri = _fileSystem.path.toUri(font['asset'] as String);
|
||||
result.add(_Asset(
|
||||
- baseDir: _fileSystem.path.join(Cache.flutterRoot, 'bin', 'cache', 'artifacts', 'material_fonts'),
|
||||
+ baseDir: _fileSystem.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'artifacts', 'material_fonts'),
|
||||
relativeUri: Uri(path: entryUri.pathSegments.last),
|
||||
entryUri: entryUri,
|
||||
package: null,
|
||||
diff --git a/packages/flutter_tools/lib/src/cache.dart b/packages/flutter_tools/lib/src/cache.dart
|
||||
index a35d8f87d0..a40027dc74 100644
|
||||
index 11e3bf3e11..39d6fae0d1 100644
|
||||
--- a/packages/flutter_tools/lib/src/cache.dart
|
||||
+++ b/packages/flutter_tools/lib/src/cache.dart
|
||||
@@ -215,8 +215,15 @@ class Cache {
|
||||
@@ -321,8 +321,15 @@ class Cache {
|
||||
return;
|
||||
}
|
||||
assert(_lock == null);
|
||||
+
|
||||
+ final Directory dir = globals.fs.directory(globals.fs.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter'));
|
||||
+ final Directory dir = _fileSystem.directory(_fileSystem.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter'));
|
||||
+ if (!dir.existsSync()) {
|
||||
+ dir.createSync(recursive: true);
|
||||
+ globals.os.chmod(dir, '755');
|
||||
+ }
|
||||
+
|
||||
final File lockFile =
|
||||
- globals.fs.file(globals.fs.path.join(flutterRoot, 'bin', 'cache', 'lockfile'));
|
||||
+ globals.fs.file(globals.fs.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'lockfile'));
|
||||
- _fileSystem.file(_fileSystem.path.join(flutterRoot, 'bin', 'cache', 'lockfile'));
|
||||
+ _fileSystem.file(_fileSystem.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'lockfile'));
|
||||
try {
|
||||
_lock = lockFile.openSync(mode: FileMode.write);
|
||||
} on FileSystemException catch (e) {
|
||||
@@ -319,7 +326,7 @@ class Cache {
|
||||
@@ -424,7 +431,7 @@ class Cache {
|
||||
if (_rootOverride != null) {
|
||||
return _fileSystem.directory(_fileSystem.path.join(_rootOverride.path, 'bin', 'cache'));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user