Skip to content
Browse files

added new build.xml for extensions/gdx-setup.

  • Loading branch information...
1 parent cf1ece3 commit 27fd8a996d573571aec6ef9377f03a0f834f5d5a @jtakakura jtakakura committed Jan 26, 2014
Showing with 64 additions and 11 deletions.
  1. +6 −11 build.xml
  2. +58 −0 extensions/gdx-setup/build.xml
View
17 build.xml
@@ -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">
View
58 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.
Something went wrong with that request. Please try again.