|
1 | 1 | cask "flutter" do |
2 | | - arch arm: "_arm64" |
| 2 | + version "3.38.1" |
| 3 | + sha256 :no_check |
3 | 4 |
|
4 | | - version "3.38.0" |
5 | | - sha256 arm: "f3ddfeca3d44efd3de49ae293238c7c80b967a1d17529abae744c5ad9b5c2c5e", |
6 | | - intel: "d60297964c1079c29fb5a62fb9eccd249da45fddb7df15f6914b37af723dbacf" |
7 | | - |
8 | | - url "https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos#{arch}_#{version}-stable.zip", |
9 | | - verified: "storage.googleapis.com/flutter_infra_release/releases/stable/macos/" |
| 5 | + url "https://github.com/flutter/flutter.git", |
| 6 | + branch: "stable", |
| 7 | + verified: "github.com/flutter/" |
10 | 8 | name "Flutter SDK" |
11 | | - desc "UI toolkit for building applications for mobile, web and desktop" |
| 9 | + desc "UI toolkit for building applications for mobile, web, and desktop" |
12 | 10 | homepage "https://flutter.dev/" |
13 | 11 |
|
| 12 | + on_macos do |
| 13 | + depends_on arch: [:arm64, :intel] |
| 14 | + end |
| 15 | + |
| 16 | + on_linux do |
| 17 | + depends_on arch: [:x86_64, :arm64] |
| 18 | + end |
| 19 | + |
14 | 20 | livecheck do |
15 | | - url "https://storage.googleapis.com/flutter_infra_release/releases/releases_macos.json" |
16 | | - strategy :json do |json| |
17 | | - json["releases"]&.map do |release| |
18 | | - next if release["channel"] != "stable" |
19 | | - |
20 | | - release["version"] |
21 | | - end |
22 | | - end |
| 21 | + url "https://github.com/flutter/flutter.git" |
| 22 | + regex(/^v?(\d+(?:\.\d+)+)$/i) |
23 | 23 | end |
24 | 24 |
|
25 | 25 | auto_updates true |
26 | 26 |
|
27 | | - suite "flutter", target: "#{HOMEBREW_PREFIX}/share/flutter" |
28 | | - binary "flutter/bin/dart" |
29 | | - binary "flutter/bin/flutter" |
| 27 | + binary "bin/flutter" |
| 28 | + binary "bin/dart" |
| 29 | + artifact ".", target: "#{HOMEBREW_PREFIX}/share/flutter" |
| 30 | + |
| 31 | + postflight do |
| 32 | + system_command "#{HOMEBREW_PREFIX}/share/flutter/bin/flutter", |
| 33 | + args: ["precache"], |
| 34 | + print_stdout: true |
| 35 | + end |
30 | 36 |
|
31 | 37 | zap trash: "~/.flutter" |
32 | 38 | end |
0 commit comments