homebrew-cask/Casks/a/android-studio-preview@beta.rb

40 lines
1.6 KiB
Ruby

cask "android-studio-preview@beta" do
arch arm: "mac_arm", intel: "mac"
version "2024.1.1.10"
sha256 arm: "696601684e31c2515a3c8e3e6c6589c8585669b4d3351f7c876b01d87d90029c",
intel: "ebef064c767bf471e48c6e0b257c60fcb5c34d5a9d1441e06f829b649ee0f598"
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 (Beta)"
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(.*\n*\s*.*)(Beta|RC)}i)
end
auto_updates true
depends_on macos: ">= :high_sierra"
app "Android Studio.app", target: "Android Studio Preview Beta.app"
binary "#{appdir}/Android Studio Preview Beta.app/Contents/MacOS/studio", target: "studio-beta"
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