cask "intellij-idea-ce" do arch arm: "-aarch64" version "2024.3,243.21565.193" sha256 arm: "568e0a3a1d623627411abed770ce20c2a9906331335e4576c72f019a1e992267", intel: "9162a57c3f39c2f54b9ab86f41ae25de839e749c1708e674deef59c40c4f577f" url "https://download.jetbrains.com/idea/ideaIC-#{version.csv.first}#{arch}.dmg" name "IntelliJ IDEA Community Edition" name "IntelliJ IDEA CE" desc "IDE for Java development - community edition" homepage "https://www.jetbrains.com/idea/" livecheck do url "https://data.services.jetbrains.com/products/releases?code=IIC&latest=true&type=release" strategy :json do |json| json["IIC"]&.map do |release| version = release["version"] build = release["build"] next if version.blank? || build.blank? "#{version},#{build}" end end end auto_updates true depends_on macos: ">= :high_sierra" app "IntelliJ IDEA CE.app" binary "#{appdir}/IntelliJ IDEA CE.app/Contents/MacOS/idea", target: "idea-ce" zap trash: [ "~/Library/Application Support/JetBrains/IdeaIC#{version.major_minor}", "~/Library/Caches/JetBrains/IdeaIC#{version.major_minor}", "~/Library/Logs/JetBrains/IdeaIC#{version.major_minor}", "~/Library/Preferences/com.jetbrains.intellij.ce.plist", "~/Library/Saved Application State/com.jetbrains.intellij.ce.savedState", ] end