homebrew-core/Formula/bundletool.rb
Igor Kapkov a8c8ed4a53 bundletool 0.10.1
Closes #41914.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
2019-07-13 14:20:35 +02:00

33 lines
1 KiB
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.10.1/bundletool-all-0.10.1.jar"
sha256 "ac0e18bb5f59f693b7dc3ebcb44560f24ad94aeb188f7015346081ed56cb0e3c"
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
------------
Feature modules:
Feature module: base
File: dex/classes.dex
EOS
assert_equal expected, shell_output("#{bin}/bundletool validate --bundle sample.aab")
end
end
end