homebrew-core/Formula/bundletool.rb
Igor Kapkov ea95e7fd81 bundletool 0.7.2
Closes #34931.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
2018-12-09 22:51:30 +13:00

33 lines
1,021 B
Ruby

class Bundletool < Formula
desc "Command-line tool to manipulate Android App Bundles"
homepage "https://github.com/google/bundletool"
url "https://github.com/google/bundletool/releases/download/0.7.2/bundletool-all-0.7.2.jar"
sha256 "9d98a1497281388539f5a774ed0843c1d541f7b1bc5d0664d21a0eeaf4a00f19"
bottle :unneeded
depends_on :java => "1.8+"
resource "bundle" do
url "https://gist.githubusercontent.com/raw/ca85ede7ac072a44f48c658be55ff0d3/sample.aab"
sha256 "aac71ad62e1f20dd19b80eba5da5cb5e589df40922f288fb6a4b37a62eba27ef"
end
def install
libexec.install "bundletool-all-#{version}.jar"
bin.write_jar_script libexec/"bundletool-all-#{version}.jar", "bundletool"
end
test do
resource("bundle").stage do
expected = <<~EOS
App Bundle information
------------
Modules:
Module: base
File: dex/classes.dex
EOS
assert_equal expected, shell_output("#{bin}/bundletool validate --bundle sample.aab")
end
end
end