2016-05-31 15:17:59 +00:00
|
|
|
class Jadx < Formula
|
|
|
|
desc "Dex to Java decompiler"
|
|
|
|
homepage "https://github.com/skylot/jadx"
|
2016-12-06 05:13:42 +00:00
|
|
|
url "https://github.com/skylot/jadx/releases/download/v0.6.1/jadx-0.6.1.zip"
|
|
|
|
sha256 "75a9c01f07f434f42831fc71053e933e3a6e92692731fb0e2347234171a49e49"
|
2016-05-31 15:17:59 +00:00
|
|
|
|
|
|
|
head do
|
|
|
|
url "https://github.com/skylot/jadx.git"
|
2016-09-24 15:45:48 +00:00
|
|
|
depends_on :java => "1.8+"
|
2016-05-31 15:17:59 +00:00
|
|
|
depends_on "gradle" => :build
|
|
|
|
end
|
|
|
|
|
|
|
|
bottle :unneeded
|
|
|
|
|
2016-09-24 15:45:48 +00:00
|
|
|
depends_on :java => "1.6+"
|
2016-05-31 15:17:59 +00:00
|
|
|
|
|
|
|
resource "sample.apk" do
|
2016-09-24 15:45:48 +00:00
|
|
|
url "https://github.com/downloads/stephanenicolas/RoboDemo/robodemo-sample-1.0.1.apk", :using => :nounzip
|
2016-05-31 15:17:59 +00:00
|
|
|
sha256 "bf3ec04631339538c8edb97ebbd5262c3962c5873a2df9022385156c775eb81f"
|
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
if build.head?
|
|
|
|
system "gradle", "clean", "dist"
|
|
|
|
libexec.install Dir["build/jadx/*"]
|
|
|
|
else
|
|
|
|
libexec.install Dir["*"]
|
|
|
|
end
|
|
|
|
bin.install_symlink libexec/"bin/jadx"
|
|
|
|
bin.install_symlink libexec/"bin/jadx-gui"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
resource("sample.apk").stage do
|
|
|
|
system "#{bin}/jadx", "-d", "out", "robodemo-sample-1.0.1.apk"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|