Commit 6f86c9de authored by Adrian Kosmaczewski's avatar Adrian Kosmaczewski

Restored ant build

parent 4c5c2f02
= Java
== Maven
This application is written with Java 14 preview features, and can be built using the `mvn package` command. To run it, use the `java -jar --enable-preview target/conway-1.0-SNAPSHOT.jar`.
== Ant
To build with `ant`,[download and install] Junit 4 in the `lib` folder, and run the `ant package` command. Then run the application by using the `java --enable-preview -jar out/conway.jar`.
== Tests
The Java application can be tested by running `mvn test` at the root of the folder.
If built with `ant`, use the `ant test` command.
<?xml version="1.0"?>
<project name="Conway" default="package">
<property name="src.dir" value="src"/>
<property name="build.dir" value="out"/>
<property name="lib.dir" value="lib"/>
<target name="clean">
<echo>Cleaning output</echo>
<delete dir="${build.dir}" />
<target name="test" depends="package">
<echo>Executing unit tests</echo>
<junit printsummary="on" haltonfailure="yes" fork="true">
<jvmarg line="--enable-preview"/>
<path location="${build.dir}/conway.jar"/>
<pathelement location="${lib.dir}/junit-4.13.1.jar"/>
<pathelement location="${lib.dir}/hamcrest-core-1.3.jar"/>
<formatter type="brief" usefile="false" />
<fileset dir="${build.dir}" includes="ma/akos/Conway/Tests.class" />
<target name="build">
<echo>Building application</echo>
<mkdir dir="${build.dir}"/>
<javac destdir="${build.dir}">
<pathelement location="${lib.dir}/junit-4.13.1.jar"/>
<compilerarg value="--enable-preview" />
<compilerarg value="--source=15" />
<src path="${src.dir}"/>
<target name="package" depends="build">
<echo>Packaging application</echo>
<jar destfile="${build.dir}/conway.jar"
<attribute name="Main-Class" value="Main"/>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment