rusefi-1/java_tools/configuration_definition/build.xml

63 lines
2.6 KiB
XML

<project default="jar">
<property name="javac.source" value="1.8"/>
<property name="javac.target" value="1.8"/>
<property name="console_path" value="../../java_console"/>
<target name="clean">
<delete dir="build"/>
</target>
<target name="antlr">
<echo message="Invoking grammar generator..."/>
<java jar="lib/antlr-4.5-complete.jar" args="-o src/main/java/com/rusefi/generated RusefiConfigGrammar.g4" fork="true" failonerror="true" />
</target>
<target name="compile" depends="antlr">
<mkdir dir="build/classes"/>
<javac
source="${javac.source}"
debug="true"
target="${javac.target}"
destdir="build/classes"
classpath="${console_path}/lib/jsr305-2.0.1.jar:lib/junit.jar:../../java_console/lib/annotations.jar:lib/snakeyaml.jar:lib/antlr-4.5-complete.jar">
<src path="src/main/java"/>
<src path="${console_path}/autoupdate/src/main/java"/>
<src path="${console_path}/inifile/src/main/java"/>
<src path="${console_path}/logging/src/main/java"/>
<src path="${console_path}/logging-api/src/main/java"/>
<src path="${console_path}/models/src/main/java"/>
<src path="${console_path}/shared_io/src/main/java"/>
<src path="../enum_to_string/src/main/java"/>
</javac>
<junit fork="no"
maxmemory="512m"
printsummary="yes"
haltonfailure="yes">
<jvmarg value="-ea"/>
<jvmarg value="-XX:+HeapDumpOnOutOfMemoryError"/>
<formatter type="brief"/>
<classpath path="build/classes:lib/junit.jar:lib/annotations.jar:lib/snakeyaml.jar:lib/antlr-4.5-complete.jar"/>
<batchtest todir="build">
<fileset dir="src/main/java" includes="**/test/**/*Test.java"/>
<fileset dir="../enum_to_string/src/main/java" includes="**/test/**/*Test.java"/>
</batchtest>
</junit>
</target>
<target name="jar" depends="compile">
<mkdir dir="build/jar"/>
<jar destfile="../ConfigDefinition.jar" basedir="build/classes">
<manifest>
<attribute name="Main-Class" value="com.rusefi.ConfigDefinition"/>
</manifest>
<zipfileset dir="build/classes" includes="**/*.class"/>
<zipfileset src="lib/snakeyaml.jar" includes="**/*.class"/>
<zipfileset src="lib/antlr-4.5-complete.jar" includes="**/*.class"/>
</jar>
</target>
</project>