flutter: update channels + fix dev channel
This commit is contained in:
parent
e370711ad0
commit
8986e95dca
|
@ -9,22 +9,23 @@ in {
|
|||
stable = mkFlutter {
|
||||
pname = "flutter";
|
||||
channel = "stable";
|
||||
version = "1.12.13+hotfix.8";
|
||||
sha256Hash = "01ik4xckr3fp65sq4g0g6wy5b9i0r49l643xmbxa6z9k21sby46d";
|
||||
version = "1.12.13+hotfix.9";
|
||||
sha256Hash = "1ql3zvmmk5zk47y30lajxaam04q6vr373dayq15jv4vpc0fzif1y";
|
||||
patches = getPatches ./patches/stable;
|
||||
};
|
||||
beta = mkFlutter {
|
||||
pname = "flutter-beta";
|
||||
channel = "beta";
|
||||
version = "1.14.6";
|
||||
sha256Hash = "1a79pr741zkr39p5gc3p9x59d70vm60hpz2crgc53ysglj4ycigy";
|
||||
version = "1.15.17";
|
||||
sha256Hash = "0iil6y6y477dhjgzx54ab5m9nj0jg4xl8x4zzd9iwh8m756r7qsd";
|
||||
patches = getPatches ./patches/beta;
|
||||
};
|
||||
dev = mkFlutter {
|
||||
dev = mkFlutter rec {
|
||||
pname = "flutter-dev";
|
||||
channel = "dev";
|
||||
version = "1.15.3";
|
||||
sha256Hash = "06mawwqf7q7wdmzlyxlrlblhnnk4ckf3vp92lplippdh3d52r93i";
|
||||
patches = getPatches ./patches/dev;
|
||||
version = "1.17.0-dev.5.0";
|
||||
filename = "flutter_linux_${version}-${channel}.tar.xz";
|
||||
sha256Hash = "0ks2jf2bd42y2jsc91p33r57q7j3m94d8ihkmlxzwi53x1mwp0pk";
|
||||
patches = getPatches ./patches/beta;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{ channel, pname, version, sha256Hash, patches }:
|
||||
{ channel, pname, version, sha256Hash, patches
|
||||
, filename ? "flutter_linux_v${version}-${channel}.tar.xz" }:
|
||||
|
||||
{ bash, buildFHSUserEnv, cacert, coreutils, git, makeWrapper, runCommand, stdenv
|
||||
, fetchurl, alsaLib, dbus, expat, libpulseaudio, libuuid, libX11, libxcb
|
||||
|
@ -11,7 +12,7 @@ let
|
|||
|
||||
src = fetchurl {
|
||||
url =
|
||||
"https://storage.googleapis.com/flutter_infra/releases/${channel}/linux/flutter_linux_v${version}-${channel}.tar.xz";
|
||||
"https://storage.googleapis.com/flutter_infra/releases/${channel}/linux/${filename}";
|
||||
sha256 = sha256Hash;
|
||||
};
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ index 8e511eefd..fbc7d6ac3 100644
|
|||
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(homeDirPath, '.cache', 'flutter', '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(
|
||||
|
@ -28,7 +28,7 @@ index 79b06949f..9040ba0a8 100644
|
|||
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(homeDirPath, '.cache', 'flutter', 'artifacts', 'material_fonts'),
|
||||
+ baseDir: globals.fs.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'artifacts', 'material_fonts'),
|
||||
relativeUri: Uri(path: entryUri.pathSegments.last),
|
||||
entryUri: entryUri,
|
||||
));
|
||||
|
@ -41,14 +41,14 @@ index 715189938..5afb2a0db 100644
|
|||
}
|
||||
assert(_lock == null);
|
||||
+
|
||||
+ final Directory dir = globals.fs.directory(globals.fs.path.join(homeDirPath, '.cache', 'flutter'));
|
||||
+ final Directory dir = globals.fs.directory(globals.fs.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter'));
|
||||
+ if (!dir.existsSync()) {
|
||||
+ dir.createSync(recursive: true);
|
||||
+ os.chmod(dir, '755');
|
||||
+ 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(homeDirPath, '.cache', 'flutter', 'lockfile'));
|
||||
+ globals.fs.file(globals.fs.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'lockfile'));
|
||||
try {
|
||||
_lock = lockFile.openSync(mode: FileMode.write);
|
||||
} on FileSystemException catch (e) {
|
||||
|
@ -57,7 +57,7 @@ index 715189938..5afb2a0db 100644
|
|||
return _fileSystem.directory(_fileSystem.path.join(_rootOverride.path, 'bin', 'cache'));
|
||||
} else {
|
||||
- return _fileSystem.directory(_fileSystem.path.join(flutterRoot, 'bin', 'cache'));
|
||||
+ return _fileSystem.directory(_fileSystem.path.join(homeDirPath, '.cache', 'flutter'));
|
||||
+ return _fileSystem.directory(_fileSystem.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../beta/disable-auto-update.patch
|
|
@ -1,63 +0,0 @@
|
|||
diff --git a/dev/devicelab/lib/framework/runner.dart b/dev/devicelab/lib/framework/runner.dart
|
||||
index 8e511eefd..fbc7d6ac3 100644
|
||||
--- a/dev/devicelab/lib/framework/runner.dart
|
||||
+++ b/dev/devicelab/lib/framework/runner.dart
|
||||
@@ -126,7 +126,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 79b06949f..9040ba0a8 100644
|
||||
--- a/packages/flutter_tools/lib/src/asset.dart
|
||||
+++ b/packages/flutter_tools/lib/src/asset.dart
|
||||
@@ -6,6 +6,7 @@ import 'dart:async';
|
||||
|
||||
import 'package:yaml/yaml.dart';
|
||||
|
||||
+import 'base/common.dart';
|
||||
import 'base/context.dart';
|
||||
import 'base/file_system.dart';
|
||||
import 'base/utils.dart';
|
||||
@@ -325,7 +326,7 @@ List<_Asset> _getMaterialAssets(String fontSet) {
|
||||
for (final Map<dynamic, dynamic> font in family['fonts']) {
|
||||
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,
|
||||
));
|
||||
diff --git a/packages/flutter_tools/lib/src/cache.dart b/packages/flutter_tools/lib/src/cache.dart
|
||||
index 715189938..5afb2a0db 100644
|
||||
--- a/packages/flutter_tools/lib/src/cache.dart
|
||||
+++ b/packages/flutter_tools/lib/src/cache.dart
|
||||
@@ -189,8 +189,14 @@ class Cache {
|
||||
return;
|
||||
}
|
||||
assert(_lock == null);
|
||||
+
|
||||
+ final Directory dir = globals.fs.directory(globals.fs.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'));
|
||||
try {
|
||||
_lock = lockFile.openSync(mode: FileMode.write);
|
||||
} on FileSystemException catch (e) {
|
||||
@@ -290,7 +296,7 @@ class Cache {
|
||||
if (_rootOverride != null) {
|
||||
return _fileSystem.directory(_fileSystem.path.join(_rootOverride.path, 'bin', 'cache'));
|
||||
} else {
|
||||
- return _fileSystem.directory(_fileSystem.path.join(flutterRoot, 'bin', 'cache'));
|
||||
+ return _fileSystem.directory(_fileSystem.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter'));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue