Skip to content

Commit

Permalink
added new build.xml for extensions/gdx-setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
jtakakura committed Jan 26, 2014
1 parent cf1ece3 commit 27fd8a9
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 11 deletions.
17 changes: 6 additions & 11 deletions build.xml
Expand Up @@ -32,17 +32,12 @@
<ant antfile="build.xml" dir="extensions/gdx-setup-ui/"/>
<copy tofile="${distDir}/gdx-setup-ui.jar" file="extensions/gdx-setup-ui/gdx-setup-ui.jar"/>
</target>

<!-- new gdx setup -->
<target name="gdx-setup">
<fileset id="resourcefiles" dir="extensions/gdx-setup/src">
<exclude name="**/*.java"/>
</fileset>
<ant antfile="../../build-template.xml" dir="extensions/gdx-setup">
<property name="jar" value="gdx-setup"/>
<reference refid="resourcefiles"/>
</ant>
</target>

<!-- new gdx setup, custom target -->
<target name="gdx-setup">
<ant antfile="build.xml" dir="extensions/gdx-setup/"/>
<copy tofile="${distDir}/gdx-setup.jar" file="extensions/gdx-setup/gdx-setup.jar"/>
</target>

<!-- gdx core -->
<target name="gdx-core" depends="gdx-jnigen">
Expand Down
58 changes: 58 additions & 0 deletions extensions/gdx-setup/build.xml
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="gdx-setup" default="all" basedir=".">
<!-- ****************************************************************** -->
<!-- Definitions -->
<!-- ****************************************************************** -->

<property name="name" value="gdx-setup" />
<property name="mainClass" value="com.badlogic.gdx.setup.GdxSetup" />

<!-- ****************************************************************** -->
<!-- Build tasks -->
<!-- ****************************************************************** -->

<target name="clean">
<delete dir="bin/" />
</target>

<target name="compile" depends="clean">
<mkdir dir="bin/" />
<javac destdir="bin/" srcdir="src/" target="1.6" source="1.6" includeAntRuntime="false" />
</target>

<target name="jar" depends="compile">
<copy todir="bin/"><fileset dir="src/" excludes="**/*.java"/></copy>

<jar destfile="${name}.jar" basedir="bin/">
<manifest>
<attribute name="Main-Class" value="${mainClass}" />
</manifest>
</jar>
</target>

<target name="bundle" depends="jar">
<jar destfile="${name}-tmp.jar" filesetmanifest="skip">
<zipgroupfileset dir="." includes="${name}.jar"/>
<manifest><attribute name="Main-Class" value="${mainClass}"/></manifest>
</jar>

<zip destfile="${name}.jar">
<zipfileset src="${name}-tmp.jar" excludes="META-INF/*.txt, META-INF/maven/"/>
</zip>

<delete file="${name}-tmp.jar"/>
</target>

<!-- ****************************************************************** -->
<!-- Main task -->
<!-- ****************************************************************** -->

<target name="all" depends="bundle">
<antcall target="clean"/>
</target>

<target name="zip" depends="all">
<zip destfile="${name}-${version}.zip" basedir="." includes="${name}.jar"/>
</target>

</project>

0 comments on commit 27fd8a9

Please sign in to comment.