So I have a custom_rules.xml file Im trying to rebuild in gradle. so far I have no problem figuring everything else out but the last part Im trying to accomplish is running a special apk signing tool for widevine drm on the unsigned apk that I generate with my gradle build process. Ive been looking online and in the gradle documentation all day but I have yet to find how to run an executable jar file from gradle. I know I have to create a task but thats about it. Any help would be much appreciated.
PS. Ive read a lot of the gradle documentation so please spare me any read the docs responses
EDIT:
this is what my task looks like at the moment and it compiles but Im not sure its actually doing anything
task (runApkSigTool , dependsOn: 'android', type: JavaExec) {
classpath files('apksigtool.jar')
main 'com.widevine.tools.android.apksigtool.ApkSigTool'
args[0] = apkLocation
args[1] = 'private_key.der'
args[2] = 'my.crt'
}
Im not sure if I have to use it like a method in the android section of my build.gradle file or what.