I'm working on an android plugin for unity and need to generate a jar file. To do so I followed the steps at https://stackoverflow.com/a/20446513/3742608 , set my build variant to release, rebuild the project and executed makeJar. However, my project does have the folder gradle uses only in another folder 'intermediates':
I changed some things to the following, but it doesn't matter, the jar file is not generated.
task clearJar(type: Delete) {
delete 'build/libs/myCompiledLibrary.jar'
}
task makeJar(type: Copy) {
from('build/intermediates/bundles/release/')
into('build/libs/')
include('classes.jar')
rename ('classes.jar', 'myCompiledLibrary.jar')
}
The bundles/release directory is empty, as are its underlying directories. The code also doesn't work if I reference classes/release instead of bundles/release.
Anyone an idea why the jar file is not generated?
P.S. the classes.jar in the directory libs is not generated by gradle, but just the classes.jar provided by Unity