cask "microsoft-openjdk@11" do arch arm: "aarch64", intel: "x64" version "11.0.25" sha256 arm: "b4d084598a7cda5f822078e2f7a2512a76d565743cbf6a3c5e819afaffa36bc1", intel: "e581ca82f517cbb046301adbcbb08be7b00e4581ee8fc53b2197a6ee2b9b9b4e" url "https://aka.ms/download-jdk/microsoft-jdk-#{version}-macOS-#{arch}.pkg", verified: "aka.ms/download-jdk/" name "Microsoft Build of OpenJDK" desc "OpenJDK distribution from Microsoft" homepage "https://microsoft.com/openjdk" livecheck do url "https://docs.microsoft.com/java/openjdk/download" regex(%r{href=.*?/microsoft[._-]jdk[._-]v?(11(?:\.\d+)+)[._-]macOS[._-]#{arch}\.pkg}i) end pkg "microsoft-jdk-#{version}-macOS-#{arch}.pkg" uninstall pkgutil: "com.microsoft.#{version.major}.jdk" zap trash: [ "~/Library/Preferences/net.java.openjdk.java.plist", "~/Library/Saved Application State/net.java.openjdk.java.savedState", ] end