I decided I might just be looking at a bug here. So I upgraded (I was using
0.9, now using the latest release from the website).
There is improvement, the obfuscation for project B now gets run, but I
think what is missing here again, the remaining problem, is caused by a lack
of understanding on my part.
When I build the lot, from the root directory, using the settings file:
include "A", "B"
and look at the libs created for each project, it is fine.
However, my distribution zip is now wrong, including a non-obfuscated .jar
of project B (which doesn't even exist in the output libs for project B
!!!).
How does this task dist thing work?
I understood, from your last email, that I should only use your suggested
modified dist task if going for option 2 (as discussed).
Therefore, i've left it as it was for now:
task dist(type: Zip) { // as per
http://www.gradle.org/tutorial_java_projects.html
dependsOn jar
into('libs') {
from jar.archivePath
from configurations.compile
exclude '*ZKM*.jar', '*junit*.jar'
}
}
But it seems to be creating its own unobfuscated jar ....
The jar I want is generated already, and named correctly .... by the main
jar task of Project B. Why does it not just pick it up?