b64a6091eb
Closes #48712. Signed-off-by: Rui Chen <chenrui333@gmail.com>
31 lines
1.1 KiB
Ruby
31 lines
1.1 KiB
Ruby
class Proguard < Formula
|
|
desc "Java class file shrinker, optimizer, and obfuscator"
|
|
homepage "https://proguard.sourceforge.io/"
|
|
url "https://downloads.sourceforge.net/project/proguard/proguard/6.2/proguard6.2.2.tar.gz"
|
|
sha256 "e38c56f2e96809686e1584f21d4f95ed2433ff1a80406174d44e52c27b36fadd"
|
|
|
|
bottle :unneeded
|
|
|
|
def install
|
|
libexec.install "lib/proguard.jar"
|
|
libexec.install "lib/proguardgui.jar"
|
|
libexec.install "lib/retrace.jar"
|
|
bin.write_jar_script libexec/"proguard.jar", "proguard"
|
|
bin.write_jar_script libexec/"proguardgui.jar", "proguardgui"
|
|
bin.write_jar_script libexec/"retrace.jar", "retrace"
|
|
end
|
|
|
|
test do
|
|
expect = <<~EOS
|
|
ProGuard, version #{version}
|
|
Usage: java proguard.ProGuard [options ...]
|
|
EOS
|
|
assert_equal expect, shell_output("#{bin}/proguard", 1)
|
|
|
|
expect = <<~EOS
|
|
Picked up _JAVA_OPTIONS: #{ENV["_JAVA_OPTIONS"]}
|
|
Usage: java proguard.retrace.ReTrace [-regex <regex>] [-verbose] <mapping_file> [<stacktrace_file>]
|
|
EOS
|
|
assert_equal expect, pipe_output("#{bin}/retrace 2>&1")
|
|
end
|
|
end
|