mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 15:11:35 +00:00
Merge pull request #125488 from NANASHI0X74/bump-flutter-2.2
flutter 2.0.3 -> 2.2.1
This commit is contained in:
commit
02d88b1ff1
|
@ -4,18 +4,41 @@ let
|
|||
getPatches = dir:
|
||||
let files = builtins.attrNames (builtins.readDir dir);
|
||||
in map (f: dir + ("/" + f)) files;
|
||||
version = "2.0.3";
|
||||
version = "2.2.1";
|
||||
dartVersion = "2.13.1";
|
||||
channel = "stable";
|
||||
filename = "flutter_linux_${version}-${channel}.tar.xz";
|
||||
dartStable = dart.override {
|
||||
version = dartVersion;
|
||||
sources = {
|
||||
"${dartVersion}-x86_64-darwin" = fetchurl {
|
||||
url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${dartVersion}/sdk/dartsdk-macos-x64-release.zip";
|
||||
sha256 = "0kb6r2rmp5d0shvgyy37fmykbgww8qaj4f8k79rmqfv5lwa3izya";
|
||||
};
|
||||
"${dartVersion}-x86_64-linux" = fetchurl {
|
||||
url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${dartVersion}/sdk/dartsdk-linux-x64-release.zip";
|
||||
sha256 = "0zq8wngyrw01wjc5s6w1vz2jndms09ifiymjjixxby9k41mr6jrq";
|
||||
};
|
||||
"${dartVersion}-i686-linux" = fetchurl {
|
||||
url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${dartVersion}/sdk/dartsdk-linux-ia32-release.zip";
|
||||
sha256 = "0zv4q8xv2i08a6izpyhhnil75qhs40m5mgyvjqjsswqkwqdf7lkj";
|
||||
};
|
||||
"${dartVersion}-aarch64-linux" = fetchurl {
|
||||
url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${dartVersion}/sdk/dartsdk-linux-arm64-release.zip";
|
||||
sha256 = "0bb9jdmg5p608jmmiqibp13ydiw9avgysxlmljvgsl7wl93j6rgc";
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
mkFlutter = mkFlutter;
|
||||
stable = mkFlutter rec {
|
||||
inherit dart version;
|
||||
dart = dartStable;
|
||||
inherit version;
|
||||
pname = "flutter";
|
||||
src = fetchurl {
|
||||
url = "https://storage.googleapis.com/flutter_infra/releases/${channel}/linux/${filename}";
|
||||
sha256 = "14a63cpkp78rgymmlrppds69jsrdarg33dr43nb7s61r0xfh9icm";
|
||||
sha256 = "009pwk2casz10gibgjpz08102wxmkq9iq3994b3c2q342g6526g0";
|
||||
};
|
||||
patches = getPatches ./patches;
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/bin/internal/shared.sh b/bin/internal/shared.sh
|
||||
index c44f867746..c9eda34e26 100644
|
||||
index be9320210e..6eb50aae95 100644
|
||||
--- a/bin/internal/shared.sh
|
||||
+++ b/bin/internal/shared.sh
|
||||
@@ -218,8 +218,6 @@ function shared::execute() {
|
||||
|
@ -12,16 +12,23 @@ index c44f867746..c9eda34e26 100644
|
|||
case "$BIN_NAME" in
|
||||
flutter*)
|
||||
diff --git a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
|
||||
index 3dc7929dd1..e65d70d55b 100644
|
||||
index 550a75bc65..c98a4591cc 100644
|
||||
--- a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
|
||||
+++ b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
|
||||
@@ -246,11 +246,7 @@ class FlutterCommandRunner extends CommandRunner<void> {
|
||||
@@ -244,7 +244,6 @@ class FlutterCommandRunner extends CommandRunner<void> {
|
||||
globals.flutterUsage.suppressAnalytics = true;
|
||||
}
|
||||
|
||||
- globals.flutterVersion.ensureVersionFile();
|
||||
final bool machineFlag = topLevelResults['machine'] as bool;
|
||||
- if (topLevelResults.command?.name != 'upgrade' && topLevelResults['version-check'] as bool && !machineFlag) {
|
||||
final bool ci = await globals.botDetector.isRunningOnBot;
|
||||
final bool redirectedCompletion = !globals.stdio.hasTerminal &&
|
||||
@@ -253,10 +252,6 @@ class FlutterCommandRunner extends CommandRunner<void> {
|
||||
final bool versionCheckFlag = topLevelResults['version-check'] as bool;
|
||||
final bool explicitVersionCheckPassed = topLevelResults.wasParsed('version-check') && versionCheckFlag;
|
||||
|
||||
- if (topLevelResults.command?.name != 'upgrade' &&
|
||||
- (explicitVersionCheckPassed || (versionCheckFlag && !isMachine))) {
|
||||
- await globals.flutterVersion.checkFlutterVersionFreshness();
|
||||
- }
|
||||
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
diff --git a/packages/flutter_tools/lib/src/asset.dart b/packages/flutter_tools/lib/src/asset.dart
|
||||
index a6c59bae07..21f6c9812a 100644
|
||||
index 80fb16673f..5723f93f9f 100644
|
||||
--- a/packages/flutter_tools/lib/src/asset.dart
|
||||
+++ b/packages/flutter_tools/lib/src/asset.dart
|
||||
@@ -5,6 +5,7 @@
|
||||
@@ -7,6 +7,7 @@
|
||||
import 'package:meta/meta.dart';
|
||||
import 'package:package_config/package_config.dart';
|
||||
|
||||
+import 'base/common.dart';
|
||||
import 'base/context.dart';
|
||||
import 'base/deferred_component.dart';
|
||||
import 'base/file_system.dart';
|
||||
import 'base/logger.dart';
|
||||
@@ -14,6 +15,7 @@ import 'cache.dart';
|
||||
@@ -16,6 +17,7 @@ import 'build_info.dart';
|
||||
import 'cache.dart';
|
||||
import 'convert.dart';
|
||||
import 'dart/package_map.dart';
|
||||
import 'devfs.dart';
|
||||
+import 'globals.dart' as globals;
|
||||
import 'devfs.dart';
|
||||
import 'flutter_manifest.dart';
|
||||
import 'license_collector.dart';
|
||||
import 'project.dart';
|
||||
@@ -377,7 +379,7 @@ class ManifestAssetBundle implements AssetBundle {
|
||||
@@ -449,7 +451,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(
|
||||
|
@ -28,32 +28,40 @@ index a6c59bae07..21f6c9812a 100644
|
|||
entryUri: entryUri,
|
||||
package: null,
|
||||
diff --git a/packages/flutter_tools/lib/src/cache.dart b/packages/flutter_tools/lib/src/cache.dart
|
||||
index 11e3bf3e11..39d6fae0d1 100644
|
||||
index 152d4e75e5..1fcff7e2bd 100644
|
||||
--- a/packages/flutter_tools/lib/src/cache.dart
|
||||
+++ b/packages/flutter_tools/lib/src/cache.dart
|
||||
@@ -321,8 +321,15 @@ class Cache {
|
||||
@@ -9,6 +9,7 @@ import 'package:file/memory.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
import 'package:process/process.dart';
|
||||
|
||||
+import 'globals.dart' as globals;
|
||||
import 'base/common.dart';
|
||||
import 'base/error_handling_io.dart';
|
||||
import 'base/file_system.dart';
|
||||
@@ -298,8 +299,15 @@ class Cache {
|
||||
return;
|
||||
}
|
||||
assert(_lock == null);
|
||||
+
|
||||
+ final Directory dir = _fileSystem.directory(_fileSystem.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 =
|
||||
- _fileSystem.file(_fileSystem.path.join(flutterRoot, 'bin', 'cache', 'lockfile'));
|
||||
+ _fileSystem.file(_fileSystem.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) {
|
||||
@@ -424,7 +431,7 @@ class Cache {
|
||||
@@ -404,7 +412,7 @@ class Cache {
|
||||
if (_rootOverride != null) {
|
||||
return _fileSystem.directory(_fileSystem.path.join(_rootOverride.path, 'bin', 'cache'));
|
||||
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'));
|
||||
- return _fileSystem.directory(_fileSystem.path.join(flutterRoot!, 'bin', 'cache'));
|
||||
+ return _fileSystem.directory(_fileSystem.path.join(globals.fsUtils.homeDirPath!, '.cache', 'flutter'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue