13 Eylül 2011 Salı

proguard ant task

proguard (http://proguard.sourceforge.net/) promises for  the following:

  • Creating more compact code, for smaller code archives, faster transfer across networks, faster loading, and smaller memory footprints.
  • Making programs and libraries harder to reverse-engineer.
  • Listing dead code, so it can be removed from the source code.
  • Retargeting and preverifying existing class files for Java 6, to take full advantage of Java 6's faster class loading.

here is code sample:
<target name="proguard" depends="jar">
<taskdef resource="proguard/ant/task.properties" classpath="${lib}/proguard-4.4.jar" />
<proguard configuration="${config}/obfuscate.pro">
<injar file="${build.dir}/prod.jar" />
<outjar file="${build.dir}/prod_obf.jar" />
<libraryjar refid="externals" />

Hiç yorum yok:

Yorum Gönder