Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

zulu21 21.0.0,21.28.85-ca (new cask) #17757

Merged
merged 1 commit into from
Sep 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions Casks/zulu21.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
cask "zulu21" do
arch arm: "aarch64", intel: "x64"
choice = on_arch_conditional arm: "arm", intel: "x86"

version "21.0.0,21.28.85-ca"
sha256 arm: "d9ce2ff2be7decf614bf77b4fc5cf119186effc82fff213e14a45bbc33793af4",
intel: "d8fc881a204400633189491f411886ee9338d6081767c1efba09b700df92fa0b"

url "https://cdn.azul.com/zulu/bin/zulu#{version.csv.second}-jdk#{version.csv.first}-macosx_#{arch}.dmg",
referer: "https://www.azul.com/downloads/zulu/zulu-mac/"
name "Azul Zulu Java Standard Edition Development Kit"
desc "OpenJDK distribution from Azul"
homepage "https://www.azul.com/downloads/"

livecheck do
url "https://api.azul.com/zulu/download/community/v1.0/bundles/latest/?jdk_version=#{version.major}&bundle_type=jdk&javafx=false&ext=dmg&os=macos&arch=#{choice}"
regex(/zulu(\d+(?:[._]\d+)*-.*?)-jdk(\d+(?:\.\d+)*)-macosx_#{arch}\.dmg/i)
strategy :page_match do |page, regex|
page.scan(regex).map { |match| "#{match[1]},#{match[0]}" }
end
end

depends_on macos: ">= :big_sur"

pkg "Double-Click to Install Azul Zulu JDK #{version.major}.pkg"

uninstall pkgutil: "com.azulsystems.zulu.#{version.major}"

zap trash: "~/Library/Saved Application State/com.azul.zulu.#{version.major}*.java.savedState"
end