[DEV] update ant build with module dependency pattern

This commit is contained in:
Edouard DUPIN 2020-09-08 00:35:38 +02:00
parent ebfe2bb57a
commit 81f89c4667
2 changed files with 10 additions and 1 deletions

View File

@ -21,6 +21,7 @@
<property name="result.dir" location="./out/ant/" /> <property name="result.dir" location="./out/ant/" />
<property name="result.jar.dir" location="${result.dir}/package" /> <property name="result.jar.dir" location="${result.dir}/package" />
<property name="result.dependency.dir" location="${result.dir}/dependency" />
<property name="result.javadoc.dir" location="${result.dir}/javadoc" /> <property name="result.javadoc.dir" location="${result.dir}/javadoc" />
<property name="result.juint.dir" location="${result.dir}/junit" /> <property name="result.juint.dir" location="${result.dir}/junit" />
<property name="result.classes.lib.dir" location="${result.dir}/classes-lib" /> <property name="result.classes.lib.dir" location="${result.dir}/classes-lib" />
@ -88,6 +89,9 @@ wget https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core
<pathelement location="${basedir}/hamcrest-core-1.3.jar"/> <pathelement location="${basedir}/hamcrest-core-1.3.jar"/>
--> -->
</path> </path>
<path id="dependency.modulepath">
<pathelement location="${result.dependency.dir}"/>
</path>
<path id="library.classpath"> <path id="library.classpath">
<pathelement location="${result.classes.lib.dir}"/> <pathelement location="${result.classes.lib.dir}"/>
</path> </path>
@ -123,6 +127,7 @@ wget https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core
<target name="init"> <target name="init">
<mkdir dir="${result.classes.lib.dir}"/> <mkdir dir="${result.classes.lib.dir}"/>
<mkdir dir="${result.classes.test.dir}"/> <mkdir dir="${result.classes.test.dir}"/>
<mkdir dir="${result.dependency.dir}"/>
<copy includeemptydirs="false" todir="${result.classes.lib.dir}"> <copy includeemptydirs="false" todir="${result.classes.lib.dir}">
<fileset dir="${source.lib.dir}"> <fileset dir="${source.lib.dir}">
<exclude name="**/*.launch"/> <exclude name="**/*.launch"/>
@ -148,12 +153,13 @@ wget https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core
<classpath refid="library.classpath"/> <classpath refid="library.classpath"/>
</javac> </javac>
</target> </target>
<target depends="init" name="build-test"> <target depends="build-lib" name="build-test">
<echo message="${ant.project.name}: ${ant.file}"/> <echo message="${ant.project.name}: ${ant.file}"/>
<javac debug="true" debuglevel="${debuglevel}" destdir="${result.classes.test.dir}" includeantruntime="false" source="${source}" target="${target}"> <javac debug="true" debuglevel="${debuglevel}" destdir="${result.classes.test.dir}" includeantruntime="false" source="${source}" target="${target}">
<src path="${source.test.dir}"/> <src path="${source.test.dir}"/>
<include name="**/*.java"/> <include name="**/*.java"/>
<classpath refid="test.classpath"/> <classpath refid="test.classpath"/>
<modulepath refid="dependency.modulepath"/>
</javac> </javac>
</target> </target>
@ -172,6 +178,7 @@ wget https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core
<test name="test.scenarium.logger.TestBasicLog" todir="${result.juint.dir}"/> <test name="test.scenarium.logger.TestBasicLog" todir="${result.juint.dir}"/>
<jvmarg line="-ea"/> <jvmarg line="-ea"/>
<classpath refid="test.classpath"/> <classpath refid="test.classpath"/>
<modulepath refid="dependency.modulepath"/>
</junit> </junit>
</jacoco:coverage> </jacoco:coverage>
</target> </target>
@ -185,6 +192,7 @@ wget https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core
version="true" version="true"
use="true" use="true"
windowtitle="Scenarium library API: ${ant.project.name}"> windowtitle="Scenarium library API: ${ant.project.name}">
<modulepath refid="dependency.modulepath"/>
<fileset dir="${source.lib.dir}" defaultexcludes="yes"> <fileset dir="${source.lib.dir}" defaultexcludes="yes">
<include name="io/scenarium/**"/> <include name="io/scenarium/**"/>

1
version.txt Normal file
View File

@ -0,0 +1 @@
0.1.0