mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-15 08:58:58 +03:00
flutter: 3.19.4 -> 3.22.0
This commit is contained in:
parent
311cd0a3d8
commit
5a9c5be31d
@ -141,7 +141,9 @@ let
|
||||
homepage = "https://flutter.dev";
|
||||
license = licenses.bsd3;
|
||||
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||
maintainers = with maintainers; [ babariviere ericdallo FlafyDev hacker1024 ];
|
||||
maintainers = teams.flutter.members ++ (with maintainers; [
|
||||
babariviere ericdallo
|
||||
]);
|
||||
};
|
||||
};
|
||||
in
|
||||
|
1007
pkgs/development/compilers/flutter/versions/3_22/data.json
Normal file
1007
pkgs/development/compilers/flutter/versions/3_22/data.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,13 @@
|
||||
diff --git a/bin/internal/shared.sh b/bin/internal/shared.sh
|
||||
index 75d9d3013e..657ad3cb78 100644
|
||||
--- a/bin/internal/shared.sh
|
||||
+++ b/bin/internal/shared.sh
|
||||
@@ -245,7 +245,7 @@ function shared::execute() {
|
||||
# and will corrupt each others' downloads.
|
||||
#
|
||||
# SHARED_NAME itself is prepared by the caller script.
|
||||
- upgrade_flutter 7< "$SHARED_NAME"
|
||||
+ # upgrade_flutter 7< "$SHARED_NAME"
|
||||
|
||||
BIN_NAME="$(basename "$PROG_NAME")"
|
||||
case "$BIN_NAME" in
|
@ -0,0 +1,44 @@
|
||||
This patch introduces an intermediate Gradle build step to alter the behavior
|
||||
of flutter_tools' Gradle project, specifically moving the creation of `build`
|
||||
and `.gradle` directories from within the Nix Store to somewhere in `$HOME/.cache/flutter/nix-flutter-tools-gradle/$engineShortRev`.
|
||||
|
||||
Without this patch, flutter_tools' Gradle project tries to generate `build` and `.gradle`
|
||||
directories within the Nix Store. Resulting in read-only errors when trying to build a
|
||||
Flutter Android app at runtime.
|
||||
|
||||
This patch takes advantage of the fact settings.gradle takes priority over settings.gradle.kts to build the intermediate Gradle project
|
||||
when a Flutter app runs `includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")`
|
||||
|
||||
`rootProject.buildFileName = "/dev/null"` so that the intermediate project doesn't use `build.gradle.kts` that's in the same directory.
|
||||
|
||||
The intermediate project makes a `settings.gradle` file in `$HOME/.cache/flutter/nix-flutter-tools-gradle/<short engine rev>/` and `includeBuild`s it.
|
||||
This Gradle project will build the actual `packages/flutter_tools/gradle` project by setting
|
||||
`rootProject.projectDir = new File("$settingsDir")` and `apply from: new File("$settingsDir/settings.gradle.kts")`.
|
||||
|
||||
Now the `.gradle` will be built in `$HOME/.cache/flutter/nix-flutter-tools-gradle/<short engine rev>/`, but `build` doesn't.
|
||||
To move `build` to `$HOME/.cache/flutter/nix-flutter-tools-gradle/<short engine rev>/` as well, we need to set `buildDirectory`.
|
||||
diff --git a/packages/flutter_tools/gradle/settings.gradle b/packages/flutter_tools/gradle/settings.gradle
|
||||
new file mode 100644
|
||||
index 0000000000..b2485c94b4
|
||||
--- /dev/null
|
||||
+++ b/packages/flutter_tools/gradle/settings.gradle
|
||||
@@ -0,0 +1,19 @@
|
||||
+rootProject.buildFileName = "/dev/null"
|
||||
+
|
||||
+def engineShortRev = (new File("$settingsDir/../../../bin/internal/engine.version")).text.take(10)
|
||||
+def dir = new File("$System.env.HOME/.cache/flutter/nix-flutter-tools-gradle/$engineShortRev")
|
||||
+dir.mkdirs()
|
||||
+def file = new File(dir, "settings.gradle")
|
||||
+
|
||||
+file.text = """
|
||||
+rootProject.projectDir = new File("$settingsDir")
|
||||
+apply from: new File("$settingsDir/settings.gradle.kts")
|
||||
+
|
||||
+gradle.allprojects { project ->
|
||||
+ project.beforeEvaluate {
|
||||
+ project.layout.buildDirectory = new File("$dir/build")
|
||||
+ }
|
||||
+}
|
||||
+"""
|
||||
+
|
||||
+includeBuild(dir)
|
@ -15461,6 +15461,7 @@ with pkgs;
|
||||
|
||||
flutterPackages = recurseIntoAttrs (callPackage ../development/compilers/flutter { });
|
||||
flutter = flutterPackages.stable;
|
||||
flutter322 = flutterPackages.v3_22;
|
||||
flutter319 = flutterPackages.v3_19;
|
||||
flutter316 = flutterPackages.v3_16;
|
||||
flutter313 = flutterPackages.v3_13;
|
||||
|
Loading…
Reference in New Issue
Block a user