cask "android-studio-preview@canary" do arch arm: "mac_arm", intel: "mac" version "2024.3.1.2" sha256 arm: "d2c779ffb1b43b33ffb869ba51795fad3183ece08514e7cab7ce384a20cbf24f", intel: "c45ad6623e322e1976a592fd196c1371533aa5c8d10fbd1dbda61951f5c82fca" url "https://redirector.gvt1.com/edgedl/android/studio/install/#{version}/android-studio-#{version}-#{arch}.dmg", verified: "redirector.gvt1.com/edgedl/android/studio/install/" name "Android Studio Preview (Canary)" desc "Tools for building Android applications" homepage "https://developer.android.com/studio/preview/" livecheck do url :homepage regex(%r{href=.*?/android[._-]studio[._-]v?(\d+(?:\.\d+)+)[._-]#{arch}\.dmg}i) end auto_updates true depends_on macos: ">= :high_sierra" app "Android Studio Preview.app", target: "Android Studio Preview Canary.app" binary "#{appdir}/Android Studio Preview Canary.app/Contents/MacOS/studio", target: "studio-canary" zap trash: [ "~/.android", "~/Library/Android/sdk", "~/Library/Application Support/Google/AndroidStudioPreview#{version.major_minor}", "~/Library/Caches/Google/AndroidStudioPreview#{version.major_minor}", "~/Library/Logs/Google/AndroidStudioPreview#{version.major_minor}", "~/Library/Preferences/com.android.Emulator.plist", "~/Library/Preferences/com.google.android.studio-EAP.plist", "~/Library/Saved Application State/com.google.android.studio-EAP.savedState", ], rmdir: [ "~/AndroidStudioProjects", "~/Library/Android", ] end