2021-05-20 20:54:12 -04:00
|
|
|
cask "android-commandlinetools" do
|
2023-08-09 15:15:27 -07:00
|
|
|
version "10406996"
|
|
|
|
|
sha256 "6821609e885d4b68f4066751949a9211f4196ab36df9d63f7a5f9037ca64e2d6"
|
2021-05-20 20:54:12 -04:00
|
|
|
|
|
|
|
|
url "https://dl.google.com/android/repository/commandlinetools-mac-#{version}_latest.zip",
|
|
|
|
|
verified: "dl.google.com/android/repository/"
|
|
|
|
|
name "Android SDK Command-line Tools"
|
|
|
|
|
desc "Command-line tools for building and debugging Android apps"
|
|
|
|
|
homepage "https://developer.android.com/studio"
|
|
|
|
|
|
|
|
|
|
livecheck do
|
|
|
|
|
url :homepage
|
|
|
|
|
regex(%r{href=.*?/commandlinetools[._-]mac[._-](\d+)[._-]latest\.zip}i)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
conflicts_with cask: "android-sdk",
|
|
|
|
|
formula: "proguard"
|
|
|
|
|
|
|
|
|
|
android_sdk_root = "#{HOMEBREW_PREFIX}/share/android-commandlinetools"
|
2022-07-15 20:01:57 +01:00
|
|
|
android_clt_dir = "#{android_sdk_root}/cmdline-tools/latest"
|
2021-05-20 20:54:12 -04:00
|
|
|
|
|
|
|
|
binary "#{android_clt_dir}/bin/apkanalyzer"
|
|
|
|
|
binary "#{android_clt_dir}/bin/avdmanager"
|
|
|
|
|
binary "#{android_clt_dir}/bin/lint"
|
|
|
|
|
binary "#{android_clt_dir}/bin/retrace"
|
|
|
|
|
binary "#{android_clt_dir}/bin/screenshot2"
|
|
|
|
|
binary "#{android_clt_dir}/bin/sdkmanager"
|
|
|
|
|
artifact "cmdline-tools", target: android_clt_dir
|
|
|
|
|
|
|
|
|
|
zap trash: android_sdk_root
|
|
|
|
|
|
|
|
|
|
caveats do
|
|
|
|
|
depends_on_java
|
|
|
|
|
<<~EOS
|
|
|
|
|
Default Android SDK root is #{android_sdk_root}
|
|
|
|
|
EOS
|
|
|
|
|
end
|
|
|
|
|
end
|