Skip to content

Commit

Permalink
Migrated to Java 17
Browse files Browse the repository at this point in the history
  • Loading branch information
rmraya committed Nov 22, 2021
1 parent 9f5b67b commit 8c7f028
Showing 1 changed file with 52 additions and 52 deletions.
104 changes: 52 additions & 52 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,98 +1,98 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="dist" name="TMXServer">
<property name="target" value="11"/>
<property name="source" value="11"/>
<property name="build.compiler" value="javac10+"/>
<property name="target" value="17" />
<property name="source" value="17" />
<property name="build.compiler" value="javac10+" />
<path id="TMXServer.classpath">
<pathelement location="jars/dtd.jar"/>
<pathelement location="jars/json.jar"/>
<pathelement location="jars/jsoup.jar"/>
<pathelement location="jars/mapdb.jar"/>
<pathelement location="jars/openxliff.jar"/>
<pathelement location="jars/tmxvalidator.jar"/>
<pathelement location="jars/h2-1.4.200.jar"/>
<pathelement location="jars/dtd.jar" />
<pathelement location="jars/json.jar" />
<pathelement location="jars/jsoup.jar" />
<pathelement location="jars/mapdb.jar" />
<pathelement location="jars/openxliff.jar" />
<pathelement location="jars/tmxvalidator.jar" />
<pathelement location="jars/h2-1.4.200.jar" />
</path>
<condition property="isWindows">
<os family="windows"/>
<condition property="isWindows">
<os family="windows" />
</condition>
<target name="init">
<mkdir dir="out"/>
<mkdir dir="out" />
<copy includeemptydirs="false" todir="out">
<fileset dir="src">
<exclude name="**/*.java"/>
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="out" failonerror="false"/>
<delete dir="out" failonerror="false" />
</target>
<target name="distclean">
<delete dir="dist" failonerror="false"/>
<delete dir="bin" failonerror="false"/>
<delete dir="conf" failonerror="false"/>
<delete dir="include" failonerror="false"/>
<delete dir="legal" failonerror="false"/>
<delete dir="lib" failonerror="false"/>
<delete file="release"/>
<delete dir="dist" failonerror="false" />
<delete dir="bin" failonerror="false" />
<delete dir="conf" failonerror="false" />
<delete dir="include" failonerror="false" />
<delete dir="legal" failonerror="false" />
<delete dir="lib" failonerror="false" />
<delete file="release" />
</target>
<target name="compile" depends="clean,init">
<description>Build jar file</description>
<delete file="jars/tmxserver.jar"/>
<javac srcdir="src" destdir="out" classpathref="TMXServer.classpath" modulepathref="TMXServer.classpath" includeAntRuntime="false"/>
<jar destfile="jars/tmxserver.jar" basedir="out"/>
<delete file="jars/tmxserver.jar" />
<javac srcdir="src" destdir="out" classpathref="TMXServer.classpath" modulepathref="TMXServer.classpath" includeAntRuntime="false" />
<jar destfile="jars/tmxserver.jar" basedir="out" />
</target>
<target name="link" depends="distclean,compile">
<description>Build Java binaries</description>
<link destDir="dist" modulepath="jars:${java.home}/jmods">
<module name="tmxserver"/>
<module name="tmxserver" />
</link>
<delete file="dist/lib/jrt-fs.jar"/>
<delete file="dist/lib/jrt-fs.jar" />
</target>
<target name="copyWindows" if="isWindows">
<description>Move java binaries to work folder</description>
<move todir=".\bin">
<fileset dir="dist\bin"/>
<fileset dir="dist\bin" />
</move>
<move todir=".\conf">
<fileset dir="dist\conf"/>
<move todir=".\conf">
<fileset dir="dist\conf" />
</move>
<move todir=".\include">
<fileset dir="dist\include"/>
<move todir=".\include">
<fileset dir="dist\include" />
</move>
<move todir=".\legal">
<fileset dir="dist\legal"/>
<move todir=".\legal">
<fileset dir="dist\legal" />
</move>
<move todir=".\lib">
<fileset dir="dist\lib"/>
<move todir=".\lib">
<fileset dir="dist\lib" />
</move>
<move file="dist\release" todir="."/>
<delete dir="dist" failonerror="false"/>
<move file="dist\release" todir="." />
<delete dir="dist" failonerror="false" />
<delete file=".\jars\tmxserver.jar" />
<copy file=".\jars\h2-1.4.200.jar" todir="lib"/>
<copy file=".\jars\h2-1.4.200.jar" todir="lib" />
</target>
<target name="copyUnix" unless="isWindows">
<description>Move java binaries to work folder</description>
<move todir="./bin">
<fileset dir="dist/bin"/>
<fileset dir="dist/bin" />
</move>
<move todir="./conf">
<fileset dir="dist/conf"/>
<move todir="./conf">
<fileset dir="dist/conf" />
</move>
<move todir="./include">
<fileset dir="dist/include"/>
<move todir="./include">
<fileset dir="dist/include" />
</move>
<move todir="./legal">
<fileset dir="dist/legal"/>
<move todir="./legal">
<fileset dir="dist/legal" />
</move>
<move todir="./lib">
<fileset dir="dist/lib"/>
<move todir="./lib">
<fileset dir="dist/lib" />
</move>
<move file="dist/release" todir="."/>
<delete dir="dist" failonerror="false"/>
<move file="dist/release" todir="." />
<delete dir="dist" failonerror="false" />
<delete file="./jars/tmxserver.jar" />
<copy file="./jars/h2-1.4.200.jar" todir="lib"/>
<copy file="./jars/h2-1.4.200.jar" todir="lib" />
</target>
<target name="dist" depends="link,copyWindows,copyUnix">
<description>Prepare distribution</description>
</target>
</project>
</project>

0 comments on commit 8c7f028

Please sign in to comment.