Skip to content

Instantly share code, notes, and snippets.

@kibotu
Created June 26, 2015 16:40
Show Gist options
  • Save kibotu/aa90f7d748284a2ef666 to your computer and use it in GitHub Desktop.
Save kibotu/aa90f7d748284a2ef666 to your computer and use it in GitHub Desktop.
android install obb
task installObb() << {
description = "Install all OBB packages"
def stdout = new ByteArrayOutputStream()
def obbFile = "main." + getVersionCode() + "." + getApplicationId() + ".obb"
def source = "../" + obbFile + ".zip"
def destination = "/sdcard/Android/obb/" + getApplicationId() + "/" + obbFile
println("adb push " + source + " " + destination)
exec {
executable android.getAdbExe().toString()
args = ['push', source.toString(), destination.toString()]
standardOutput = stdout;
}
def result = stdout.toString().trim();
println(result)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment