Files
getdown/build-proguard.xml
T
Michael Bayne 6f1a6ce78d Sorted out a way to get Maven to reference a local jar file without rendering
the pom file hosed for transitive dependencies.
2010-11-18 15:54:42 +00:00

94 lines
4.3 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"/>
<injar path="lib/jregistrykey/jregistrykey/1.0/jregistrykey-1.0..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"/>
<libraryjar name="${ant}"/>
<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.data.Resource">
<constructor/><method name="*"/><field access="public" name="*"/>
</keep>
<keep name="com.threerings.getdown.net.Downloader">
<constructor/><method name="*"/><field access="public" name="*"/>
</keep>
<keep name="com.threerings.getdown.net.Downloader$Observer">
<constructor/><method name="*"/><field access="public" name="*"/>
</keep>
<keep name="com.threerings.getdown.net.HTTPDownloader">
<constructor/><method name="*"/><field access="public" name="*"/>
</keep>
<keep name="com.threerings.getdown.tools.Differ">
<method access="static" name="main"/>
</keep>
<keep name="com.threerings.getdown.tools.Patcher">
<method access="static" name="main"/>
</keep>
<keep name="com.threerings.getdown.tools.Digester">
<method access="static" name="main"/>
</keep>
<keep name="com.threerings.getdown.tools.AppletParamSigner">
<method access="static" name="main"/>
</keep>
<keep name="com.threerings.getdown.launcher.GetdownApplet">
<constructor/><method name="*"/><field access="public" name="*"/>
</keep>
<keep name="com.threerings.getdown.tools.DigesterTask">
<constructor/><method name="*"/><field access="public" name="*"/>
</keep>
<keep name="com.threerings.getdown.util.LaunchUtil">
<constructor/><method name="*"/><field access="public" name="*"/>
</keep>
<keep name="ca.beq.util.win32.registry.**">
<constructor/><method name="*"/><field access="public" name="*"/>
</keep>
</proguard>
<delete file="target/runtime.jar"/>
<move file="target/getdown-pro-${maven.version}.jar"
tofile="target/getdown-${maven.version}.jar" overwrite="true"/>
</target>
</project>