123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- <project default="compile_core" basedir=".">
- <property name="src" location="src"/>
- <property name="build" location="build"/>
- <property name="lib" location="lib"/>
- <property name="jar" location="core.jar"/>
- <property name="javac.source" value="1.8"/>
- <property name="javac.target" value="1.8"/>
- <target name="clean">
- <delete dir="${build}" />
- <delete file="${jar}" />
- </target>
- <target name="compile_plugins">
- <delete file="plugins.jar"/>
- <delete dir="buildplugins"/>
- <mkdir dir="buildplugins"/>
- <javac srcdir="plugins" destdir="buildplugins" debug="on" includeantruntime="false" target="${javac.target}"
- source="${javac.source}" encoding="UTF-8">
- <classpath>
- <pathelement location="core.jar"/>
- <pathelement path="${java.class.path}/"/>
- <pathelement location="${lib}/log4j-api-2.17.0.jar"/>
- <pathelement location="${lib}/log4j-core-2.17.0.jar"/>
- <pathelement location="${lib}/disruptor-3.3.5.jar"/>
- <pathelement location="${lib}/commons-lang-2.6.jar"/>
- </classpath>
- <compilerarg line="-Xlint:deprecation"/>
- </javac>
- <jar basedir="buildplugins" destfile="plugins.jar"/>
- <delete dir="buildplugins"/>
- </target>
- <target name="compile_core">
- <delete file="${jar}"/>
- <delete dir="${build}"/>
- <mkdir dir="${build}"/>
- <javac srcdir="${src}" destdir="${build}" debug="on" includeantruntime="false" target="${javac.target}"
- source="${javac.source}" encoding="UTF-8">
- <classpath>
- <pathelement location="${lib}/commons-lang3-3.12.0.jar"/>
- <pathelement location="${lib}/commons-codec-1.14.jar"/>
- <pathelement location="${lib}/commons-compress-1.18.jar"/>
- <pathelement location="${lib}/netty-all-4.1.33.Final.jar"/>
- <!--
- <pathelement location="${lib}/netty-common-4.1.107.Final.jar"/>
- <pathelement location="${lib}/netty-transport-4.1.107.Final.jar"/>
- <pathelement location="${lib}/netty-transport-native-unix-common-4.1.107.Final.jar"/>
- <pathelement location="${lib}/netty-buffer-4.1.107.Final.jar"/>
- <pathelement location="${lib}/netty-codec-4.1.107.Final.jar"/>
- <pathelement location="${lib}/netty-codec-http-4.1.107.Final.jar"/>
- <pathelement location="${lib}/netty-handler-4.1.107.Final.jar"/>
- -->
- <pathelement location="${lib}/log4j-api-2.17.0.jar"/>
- <pathelement location="${lib}/log4j-core-2.17.0.jar"/>
- <pathelement location="${lib}/log4j-iostreams-2.17.0.jar"/>
- <pathelement location="${lib}/xpp3-1.1.4c.jar"/>
- <pathelement location="${lib}/xstream-1.4.18.jar"/>
- <pathelement location="${lib}/mysql-connector-java-8.0.19.jar"/>
- <pathelement location="${lib}/sqlite-jdbc-3.34.0.jar"/>
- <pathelement location="${lib}/commons-lang-2.6.jar"/>
- <pathelement location="${lib}/guava-30.1.1-jre.jar"/>
- <pathelement location="${lib}/JDA-4.0.0_55-withDependencies.jar"/>
- <pathelement location="${lib}/emoji-java-5.1.1.jar"/>
- <pathelement location="${lib}/json-20190722.jar"/>
- <pathelement location="${lib}/gitlab4j-api-4.12.17.jar"/>
- <pathelement location="${lib}/slf4j-nop-2.0.0-alpha5.jar"/>
- <pathelement location="${lib}/disruptor-3.3.11.jar"/>
- <pathelement location="${lib}/guice-5.0.2-jar-with-dependencies.jar"/>
- </classpath>
- <compilerarg line="-Xlint:deprecation"/>
- </javac>
- <jar basedir="${build}" destfile="${jar}">
- <zipgroupfileset dir="${lib}" includes="*.jar"/>
- <manifest>
- <attribute name="Main-Class" value="com.openrsc.server.Server"/>
- </manifest>
- </jar>
- <delete dir="${build}"/>
- </target>
- <property name="confFile" value="default" />
- <property name="coloredLogging" value="false" />
- <target name="runserverzgc">
- <!-- java 17+ recommended for mature ZGC implementation -->
- <echo message="Using JVM 17+ launch arguments"/>
- <java classname="com.openrsc.server.Server" fork="true">
- <!-- usage: `ant runserver -DconfFile=preservation` to run server with config file preservation.conf -->
- <arg value="${confFile}.conf"/>
- <jvmarg line="-Xms800M -Xmx2048M -Xdiag -XX:+UseZGC -XX:NewSize=128m -DcoloredLogging=${coloredLogging}"/>
- <classpath>
- <pathelement location="${lib}/disruptor-3.3.0.jar"/>
- <pathelement location="${lib}/log4j-api-2.17.0.jar"/>
- <pathelement location="${lib}/log4j-core-2.17.0.jar"/>
- <pathelement location="${lib}/log4j-iostreams-2.17.0.jar"/>
- <pathelement location="${lib}/xpp3_min-1.1.4c.jar"/>
- <pathelement location="${lib}/xpp3-1.1.4c.jar"/>
- <pathelement location="${lib}/xstream-1.4.9.jar"/>
- <pathelement location="${lib}/mysql-connector-java-8.0.19.jar"/>
- <pathelement location="${lib}/disruptor-3.3.5.jar"/>
- <pathelement location="${lib}/commons-lang-2.6.jar"/>
- <pathelement location="${lib}/*"/>
- <pathelement location="${lib}/commons-codec-1.14.jar"/>
- <pathelement path="${jar}/"/>
- </classpath>
- </java>
- </target>
- <target name="runserver">
- <!-- java 8 compatible jvm args. Add more heap if you can. -->
- <echo message="Using JVM arguments for Java 8 minimum."/>
- <echo message="Upgrade to Java 17 or later for better garbage collection."/>
- <java classname="com.openrsc.server.Server" fork="true">
- <!-- usage: `ant runserver -DconfFile=preservation` to run server with config file preservation.conf -->
- <arg value="${confFile}.conf"/>
- <jvmarg line="-Xdiag -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:+UseBiasedLocking -XX:NewSize=64m -DcoloredLogging=${coloredLogging}"/>
- <classpath>
- <pathelement location="${lib}/disruptor-3.3.0.jar"/>
- <pathelement location="${lib}/log4j-api-2.17.0.jar"/>
- <pathelement location="${lib}/log4j-core-2.17.0.jar"/>
- <pathelement location="${lib}/log4j-iostreams-2.17.0.jar"/>
- <pathelement location="${lib}/xpp3_min-1.1.4c.jar"/>
- <pathelement location="${lib}/xpp3-1.1.4c.jar"/>
- <pathelement location="${lib}/xstream-1.4.9.jar"/>
- <pathelement location="${lib}/mysql-connector-java-8.0.19.jar"/>
- <pathelement location="${lib}/disruptor-3.3.5.jar"/>
- <pathelement location="${lib}/commons-lang-2.6.jar"/>
- <pathelement location="${lib}/*"/>
- <pathelement location="${lib}/commons-codec-1.14.jar"/>
- <pathelement path="${jar}/"/>
- </classpath>
- </java>
- </target>
- <target name="compile-and-run">
- <antcall target="compile_core"/>
- <antcall target="compile_plugins"/>
- <antcall target="runserver"/>
- </target>
- <target name="compile">
- <antcall target="compile_core"/>
- <antcall target="compile_plugins"/>
- </target>
- </project>
|