724ee652f1
hair-pulling and ball-ache. We now have Maven call out to an Ivy-based Ant task to do the Proguard build (with Ivy maintaining a parallel copy of the dependencies, unfortunately). It's a twisty maze of passages, but it gets the Proguard build done during the right Maven phase so that all of its magical building, version number changing, SVN commits, etc. can happen as usual during the publishing process.
61 lines
2.8 KiB
XML
61 lines
2.8 KiB
XML
<?xml version="1.0"?>
|
|
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="getdown" basedir=".">
|
|
<property name="app.name" value="getdown"/>
|
|
|
|
<!-- downloads ivy if necessary and sets everything up -->
|
|
<property name="ivy.vers" value="2.1.0-rc2" />
|
|
<property name="ivy.jar.dir" value="${user.home}/.ant/lib" />
|
|
<condition property="ivy.exists"><available file="${ivy.jar.dir}/ivy.jar"/></condition>
|
|
<target name="-download-ivy" unless="ivy.exists">
|
|
<mkdir dir="${ivy.jar.dir}"/>
|
|
<get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.vers}/ivy-${ivy.vers}.jar"
|
|
dest="${ivy.jar.dir}/ivy.jar" usetimestamp="true"/>
|
|
</target>
|
|
<target name="-init-ivy" depends="-download-ivy">
|
|
<path id="ivy.lib.path"><fileset dir="${ivy.jar.dir}" includes="*.jar"/></path>
|
|
<taskdef resource="org/apache/ivy/ant/antlib.xml"
|
|
uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
|
|
<ivy:cachepath pathid="compile.classpath" conf="compile" log="download-only"/>
|
|
</target>
|
|
|
|
<target name="proguard" depends="-init-ivy">
|
|
<!-- Ivy is awesome and will fill the location of all of our dependencies into properties -->
|
|
<property name="cache.dir" value="${user.home}/.ivy2/cache"/>
|
|
<ivy:artifactproperty
|
|
name="[artifact]"
|
|
value="${cache.dir}/[organization]/[module]/[type]s/[artifact]-[revision].[ext]"/>
|
|
|
|
<!-- fucking Proguard, fucking Mac OS X -->
|
|
<mkdir dir="target"/>
|
|
<copy file="${java.home}/../Classes/classes.jar" tofile="target/runtime.jar"
|
|
failonerror="false"/>
|
|
<copy file="${java.home}/lib/rt.jar" tofile="target/runtime.jar" failonerror="false"/>
|
|
|
|
<taskdef resource="proguard/ant/task.properties" classpath="${proguard}"/>
|
|
<proguard>
|
|
<injar path="target/getdown-${maven.version}.jar" filter="!**/tools/DigesterTask*"/>
|
|
<injar path="lib/jRegistryKey.jar" filter="!META-INF/**"/>
|
|
<injar path="${samskivert}" filter="!META-INF/**,!**/Log4JLogger*,
|
|
!**/*.java,com/samskivert/Log.class,**/samskivert/io/**,**/samskivert/swing/**,
|
|
**/samskivert/text/**,**/samskivert/util/**"/>
|
|
<injar path="${commons-codec}" filter="!META-INF/**"/>
|
|
<outjar path="target/getdown-pro-${maven.version}.jar"/>
|
|
<libraryjar name="target/runtime.jar"/>
|
|
<keep name="ca.beq.util.win32.registry.**"/>
|
|
<keep name="com.threerings.getdown.launcher.Getdown">
|
|
<method access="static" name="main"/>
|
|
</keep>
|
|
<keep name="com.threerings.getdown.launcher.GetdownApp">
|
|
<method access="static" name="main"/>
|
|
</keep>
|
|
<keep name="com.threerings.getdown.launcher.GetdownApplet"/>
|
|
<keep name="*" extends="javax.swing.JApplet">
|
|
<method name="*"/>
|
|
</keep>
|
|
<keep name="com.threerings.getdown.launcher.GetdownAppletConfig"/>
|
|
</proguard>
|
|
|
|
<delete file="target/runtime.jar"/>
|
|
</target>
|
|
</project>
|