# Template file for 'Apktool'
pkgname=Apktool
version=3.0.1
revision=1
hostmakedepends="openjdk11 gradle"
depends="virtual?java-runtime"
short_desc="Tool for reverse engineering Android apk files"
maintainer="Bnyro <bnyro@tutanota.com>"
license="Apache-2.0"
homepage="https://apktool.org"
changelog="https://github.com/iBotPeaches/Apktool/releases"
distfiles="https://github.com/iBotPeaches/Apktool/archive/refs/tags/v${version}.tar.gz"
checksum=5bdb4316f9d9aaf07874901860b1938bdd8f850a76d4e35777f4483beea8a63d

do_build() {
	# test task disabled, see https://github.com/iBotPeaches/Apktool/issues/3901
	gradle --no-daemon build shadowJar --exclude-task test
}

do_install() {
	vmkdir usr/share/Apktool

	vinstall brut.apktool/apktool-cli/build/libs/apktool-cli.jar 644 usr/share/Apktool Apktool.jar
	vbin ${FILESDIR}/Apktool
}
