Gradle task does not resolve outjars lazily
Java class file shrinker, optimizer, obfuscator, and preverifier
Brought to you by:
guardsquare
The gradle task is resolving injars lazily at task execution time
for outjars the resolution is done in the configuration phase.
The source code states otherwise.
if you compare line 202 of ProGuardTask.java https://sourceforge.net/p/proguard/code/ci/default/tree/src/proguard/gradle/ProGuardTask.java#l202
to the corresponding line 188 for injars the problem seems to be that the outjars line 202 should look like this:
this.outJarFiles.add(outJarFiles);
instead of resolving outJarFiles with the project.files method.
Thanks for your report. You're right, this seems to be a mistake. I'll fix it for ProGuard 4.12 beta1. It shouldn't make a difference though, since the outjar generally won't exist in either phase. Did you experience any problems because of it?
yes i create the outjar like this
outjars { jar.archivePath.toString().replace(jar.classifier, 'minified') }
to have consistent names with the same file name construction rules as the jar task does
Last edit: squiddle 2014-02-06