Issue
Here is my Ant snippet:
<target name="-post-jar">
<taskdef name="yguard" classname="com.yworks.yguard.YGuardTask" classpath="${javac.classpath}"/>
<yguard>
<inoutpair in="${dist.dir}/Valuemaze.jar" out="${dist.dir}/Valuemaze_obf.jar"/>
</yguard>
<copy file="${dist.dir}/Valuemaze.jar" tofile="${dist.dir}/Valuemaze_test.jar"/>
</target>
Classpath is ok, target runs as the second task (copy) works properly. So paths are ok.
yguard task does nothing. No any message, warning nor error is provided. Cannot configure any debug logging, yguard seems to have none.
What can be wrong?
Solution
It forced me to dig into yGuard sources.
And the answer is:
<target name="-post-jar">
<taskdef name="yguard" classname="com.yworks.yguard.YGuardTask" classpath="${javac.classpath}"/>
<yguard>
<inoutpair in="${dist.dir}/Valuemaze.jar" out="${dist.dir}/Valuemaze_obf.jar"/>
<rename mainclass="mypackage.myclass"/>
</yguard>
</target>
You have to add subtask to make it working. Why does not docs specify this? Because it doesn't. Why there is no single example for newbies in docs? Because it isn't. Why there is no debug information about task missing? Because so.
Leaving here for other begginers.
Answered By - ePortfel
Answer Checked By - Mildred Charles (JavaFixing Admin)