Commit cf968da2 authored by ekuleshov's avatar ekuleshov
Browse files

allow to disable class shrinking

parent dc4018e7
...@@ -28,12 +28,13 @@ ...@@ -28,12 +28,13 @@
! THE POSSIBILITY OF SUCH DAMAGE. ! THE POSSIBILITY OF SUCH DAMAGE.
--> -->
<project name="ASM" default="compile"> <project name="ASM" default="shrink">
<!-- ==================================== --> <!-- ==================================== -->
<!-- ======== PROPERTY DEFINITION ======= --> <!-- ======== PROPERTY DEFINITION ======= -->
<!-- ==================================== --> <!-- ==================================== -->
<property file="${user.home}/asm-build.properties"/>
<property file="build.config"/> <property file="build.config"/>
<property file="build.properties"/> <property file="build.properties"/>
...@@ -115,6 +116,16 @@ ...@@ -115,6 +116,16 @@
<src path="${src}"/> <src path="${src}"/>
<include name="**/*.java"/> <include name="**/*.java"/>
</javac> </javac>
</target>
<target name="shrink.check">
<condition property="product.shrink">
<not><isset property="product.noshrink"/></not>
</condition>
</target>
<target name="shrink" depends="compile,shrink.check" if="product.shrink">
<echo message="Shrinking"/>
<java classname="org.objectweb.asm.optimizer.Shrinker"> <java classname="org.objectweb.asm.optimizer.Shrinker">
<classpath> <classpath>
<pathelement location="${out.build}/tmp"/> <pathelement location="${out.build}/tmp"/>
...@@ -124,7 +135,7 @@ ...@@ -124,7 +135,7 @@
<arg value="${out.build}"/> <arg value="${out.build}"/>
</java> </java>
</target> </target>
<!-- =================================== --> <!-- =================================== -->
<!-- ========== TEST ========== --> <!-- ========== TEST ========== -->
<!-- =================================== --> <!-- =================================== -->
...@@ -144,7 +155,7 @@ ...@@ -144,7 +155,7 @@
<mkdir dir="${out.dist.lib}"/> <mkdir dir="${out.dist.lib}"/>
</target> </target>
<target name="jar" depends="dist.init,compile"> <target name="jar" depends="dist.init,compile,shrink">
<tstamp> <tstamp>
<format property="product.build.time" pattern="yyyyMMdd.HHmmss"/> <format property="product.build.time" pattern="yyyyMMdd.HHmmss"/>
</tstamp> </tstamp>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment