Added ANT file for jenkins

This commit is contained in:
Ziver Koc 2016-02-27 02:17:14 +01:00
parent c528f81fd5
commit b5b38f9128
12 changed files with 96 additions and 13 deletions

1
.gitignore vendored Executable file
View file

@ -0,0 +1 @@
/build/

View file

@ -8,19 +8,6 @@
</content> </content>
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" /> <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library name="libs">
<CLASSES>
<root url="file://$MODULE_DIR$/libs" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://$MODULE_DIR$/libs" />
</SOURCES>
<jarDirectory url="file://$MODULE_DIR$/libs" recursive="false" />
<jarDirectory url="file://$MODULE_DIR$/libs" recursive="false" type="SOURCES" />
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST"> <orderEntry type="module-library" scope="TEST">
<library name="JUnit4"> <library name="JUnit4">
<CLASSES> <CLASSES>
@ -31,5 +18,18 @@
<SOURCES /> <SOURCES />
</library> </library>
</orderEntry> </orderEntry>
<orderEntry type="module-library">
<library name="lib">
<CLASSES>
<root url="file://$MODULE_DIR$/lib" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://$MODULE_DIR$/lib" />
</SOURCES>
<jarDirectory url="file://$MODULE_DIR$/lib" recursive="false" />
<jarDirectory url="file://$MODULE_DIR$/lib" recursive="false" type="SOURCES" />
</library>
</orderEntry>
</component> </component>
</module> </module>

82
build.xml Executable file
View file

@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="Zutil" >
<!-- ________________________ PROPERTIES AND SETTINGS ________________________ -->
<!--common properties-->
<property name="gitRoot" value="." />
<property name="srcDir" value="${gitRoot}/src" />
<property name="testDir" value="${gitRoot}/test" />
<property name="libDir" value="${gitRoot}/lib" />
<property name="buildRoot" value="${gitRoot}/build" />
<property name="buildDir" value="${buildRoot}/production" />
<property name="buildTestDir" value="${buildRoot}/test" />
<property name="releaseDir" value="${buildRoot}/release" />
<property name="reportsDir" value="${buildRoot}/reports" />
<!--define standard arduments for javac-->
<presetdef name="javac">
<javac includeantruntime="false" />
</presetdef>
<!-- ________________________ CLASSPATHS ________________________ -->
<!--classpath included when building-->
<path id="classpath.build">
<fileset dir="${libDir}">
<include name="**/*.jar"/>
</fileset>
<pathelement location="${buildDir}" />
</path>
<path id="classpath.test">
<pathelement location="${buildTestDir}" />
<path refid="classpath.build"/>
</path>
<!-- ________________________ EXECUTION TARGETS ________________________ -->
<target name="test" depends="build-test">
<mkdir dir="${reportsDir}" />
<junit printsummary="yes" haltonfailure="false">
<classpath refid="classpath.test" />
<formatter type="xml" /> <!-- to file -->
<batchtest todir="${reportsDir}">
<fileset dir="${buildTestDir}" includes="**/*Test*.class" />
</batchtest>
</junit>
</target>
<!-- ________________________ BUILD TARGETS ________________________ -->
<!--clean all build paths-->
<target name="clean">
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${buildRoot}" includes="**/*"/>
</delete>
</target>
<!--build product code-->
<target name="release" depends="build">
<jar destfile="${releaseDir}/Zutil.jar" basedir="${buildDir}" />
</target>
<target name="build">
<mkdir dir="${buildDir}" />
<javac srcdir="${srcDir}" destdir="${buildDir}" debug="yes" debugLevel="lines,vars,source">
<classpath refid="classpath.build" />
<include name="**/*.java" />
</javac>
</target>
<target name="build-test" depends="build">
<mkdir dir="${buildTestDir}" />
<javac srcdir="${testDir}" destdir="${buildTestDir}" debug="yes" debugLevel="lines,vars,source">
<classpath refid="classpath.build" />
<classpath refid="classpath.test" />
<include name="**/*.java" />
</javac>
</target>
</project>

BIN
lib/hamcrest-core-1.3.jar Executable file

Binary file not shown.

BIN
lib/junit-4.12.jar Executable file

Binary file not shown.