2011-05-07 22:56:11 +02:00
|
|
|
<!-- build JAR libraty -->
|
|
|
|
<project name="DataExtractionOSM" default="build" basedir=".">
|
|
|
|
|
|
|
|
<property file="local.properties" />
|
|
|
|
|
|
|
|
<property name="file.to.upload" value="OsmAndMapCreator-nightbuild.zip"/>
|
|
|
|
<property name="src.dir" value="src"/>
|
2012-12-12 00:04:06 +01:00
|
|
|
<property name="osmand-core.dir" location="../OsmAnd-java/"/>
|
|
|
|
<property name="osmand-core.jar" value="OsmAnd-core.jar"/>
|
2011-05-07 22:56:11 +02:00
|
|
|
<property name="src.absolute.dir" location="${src.dir}" />
|
2012-05-12 09:38:03 +02:00
|
|
|
<property name="icons.dir" value="icons/resources"/>
|
|
|
|
<property name="icons.absolute.dir" location="${icons.dir}" />
|
2011-05-07 22:56:11 +02:00
|
|
|
<property name="bin.dir" value="bin"/>
|
2012-07-15 04:52:24 +02:00
|
|
|
<property name="bintests.dir" value="bin-tests"/>
|
2011-05-07 22:56:11 +02:00
|
|
|
<property name="bin.absolute.dir" location="${bin.dir}" />
|
|
|
|
<property name="lib.dir" value="lib"/>
|
|
|
|
<property name="lib.absolute.dir" location="${lib.dir}" />
|
|
|
|
<property name="java.encoding" value="UTF-8" />
|
2012-07-15 04:52:24 +02:00
|
|
|
<property name="srctests.dir" value="src-tests"/>
|
|
|
|
<property name="reports.tests" value="${basedir}/test-results" />
|
2011-05-07 22:56:11 +02:00
|
|
|
|
|
|
|
<path id="build.path">
|
2012-12-12 00:04:06 +01:00
|
|
|
<fileset dir="${osmand-core.dir}">
|
|
|
|
<include name="${osmand-core.jar}"/>
|
|
|
|
</fileset>
|
2011-05-07 22:56:11 +02:00
|
|
|
<fileset dir="${lib.absolute.dir}">
|
|
|
|
<include name="*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<target name="-dirs">
|
2012-07-09 01:09:05 +02:00
|
|
|
<mkdir dir="${bin.absolute.dir}"/>
|
2012-07-15 04:52:24 +02:00
|
|
|
<mkdir dir="${bintests.dir}"/>
|
2011-05-07 22:56:11 +02:00
|
|
|
</target>
|
2012-07-09 01:09:05 +02:00
|
|
|
|
2012-05-12 09:38:03 +02:00
|
|
|
<target name="-copy-resources">
|
2012-07-09 01:09:05 +02:00
|
|
|
<mkdir dir="${icons.absolute.dir}"/>
|
2012-05-12 09:38:03 +02:00
|
|
|
<copy todir="${icons.absolute.dir}">
|
|
|
|
<fileset dir="../OsmAnd/res/drawable-mdpi/">
|
|
|
|
<include name="h_*.png"/>
|
|
|
|
<include name="g_*.png"/>
|
2012-07-09 01:09:05 +02:00
|
|
|
</fileset>
|
2012-05-12 09:38:03 +02:00
|
|
|
</copy>
|
2012-12-12 00:04:06 +01:00
|
|
|
<ant antfile="${osmand-core.dir}/build.xml" target="jar" >
|
|
|
|
</ant>
|
2012-05-12 09:38:03 +02:00
|
|
|
</target>
|
2011-05-07 22:56:11 +02:00
|
|
|
|
2011-12-29 22:00:20 +01:00
|
|
|
<target name="-version" if="build.version">
|
2012-07-09 01:09:05 +02:00
|
|
|
<replace file="src/net/osmand/MapCreatorVersion.java" token="String APP_DESCRIPTION" value="String APP_DESCRIPTION="${build.version}";//"/>
|
2011-12-29 22:00:20 +01:00
|
|
|
</target>
|
|
|
|
|
2011-05-07 22:56:11 +02:00
|
|
|
<target name="clean">
|
2012-07-09 01:09:05 +02:00
|
|
|
<delete dir="${bin.absolute.dir}"/>
|
2011-05-07 22:56:11 +02:00
|
|
|
</target>
|
|
|
|
|
2012-05-12 09:38:03 +02:00
|
|
|
<target name="compile" depends="-copy-resources,-dirs,-version">
|
2012-07-09 01:09:05 +02:00
|
|
|
<copy todir="${bin.absolute.dir}">
|
|
|
|
<fileset dir="${src.absolute.dir}">
|
|
|
|
<exclude name="**/*.java" />
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
2012-12-03 23:48:59 +01:00
|
|
|
<javac srcdir="${src.absolute.dir}"
|
|
|
|
|
2011-05-07 22:56:11 +02:00
|
|
|
destdir="${bin.absolute.dir}"
|
|
|
|
encoding="${java.encoding}"
|
|
|
|
classpathref="build.path"
|
|
|
|
debug="on"
|
|
|
|
source="1.6"
|
2012-12-12 00:04:06 +01:00
|
|
|
/>
|
2012-07-15 04:52:24 +02:00
|
|
|
<javac srcdir="${srctests.dir}"
|
|
|
|
destdir="${bintests.dir}"
|
|
|
|
encoding="${java.encoding}"
|
|
|
|
classpathref="test.classpath"
|
|
|
|
debug="on"
|
|
|
|
source="1.6"
|
2011-05-07 22:56:11 +02:00
|
|
|
/>
|
|
|
|
</target>
|
|
|
|
|
2012-07-09 01:09:05 +02:00
|
|
|
<path id="test.classpath">
|
|
|
|
<pathelement location="${bin.absolute.dir}" />
|
2012-07-15 04:52:24 +02:00
|
|
|
<pathelement location="${bintests.dir}" />
|
2012-07-15 05:34:51 +02:00
|
|
|
<pathelement location="${srctests.dir}" />
|
2012-12-12 00:04:06 +01:00
|
|
|
<fileset dir="${osmand-core.dir}">
|
|
|
|
<include name="${osmand-core.jar}"/>
|
|
|
|
</fileset>
|
2012-07-09 01:09:05 +02:00
|
|
|
<fileset dir="${lib.absolute.dir}">
|
|
|
|
<include name="*.jar" />
|
|
|
|
</fileset>
|
|
|
|
</path>
|
|
|
|
|
2012-07-15 04:52:24 +02:00
|
|
|
<target name="junits" depends="compile">
|
2012-07-09 01:16:44 +02:00
|
|
|
<junit fork="false">
|
2012-07-09 01:09:05 +02:00
|
|
|
<sysproperty key="basedir" value="${basedir}"/>
|
2012-07-09 01:16:44 +02:00
|
|
|
<!-- <sysproperty key="OBF_DIR" value="${obfdir}"/> -->
|
2012-07-09 01:09:05 +02:00
|
|
|
<classpath refid="test.classpath"/>
|
|
|
|
<formatter type="xml" />
|
2012-07-15 04:52:24 +02:00
|
|
|
<!-- test name="net.osmand.router.test.JUnitRouteTest" todir="${basedir}/test-results" /-->
|
|
|
|
<batchtest fork="false" todir="${reports.tests}" >
|
|
|
|
<fileset dir="${srctests.dir}" >
|
|
|
|
<include name="**/*Test*.java" />
|
|
|
|
<exclude name="**/AllTests.java" />
|
|
|
|
<exclude name="**/*Suite*.java" />
|
|
|
|
</fileset>
|
|
|
|
</batchtest>
|
2012-07-09 01:09:05 +02:00
|
|
|
</junit>
|
|
|
|
</target>
|
|
|
|
|
2012-12-12 00:04:06 +01:00
|
|
|
<target name="jar" depends="-copy-resources, -dirs, compile">
|
2011-05-07 22:56:11 +02:00
|
|
|
<manifestclasspath property="lib.list" jarfile="OsmAndMapCreator.jar">
|
|
|
|
<classpath refid="build.path"/>
|
|
|
|
</manifestclasspath>
|
|
|
|
<echo>list is ${lib.list}</echo>
|
|
|
|
|
|
|
|
<delete file="OsmAndMapCreator.jar" />
|
|
|
|
<delete file="MANIFEST.MF" />
|
|
|
|
<manifest file="MANIFEST.MF">
|
|
|
|
<attribute name="Built-By" value="${user.name}" />
|
|
|
|
<attribute name="Main-Class" value="net.osmand.swing.OsmExtractionUI" />
|
|
|
|
<attribute name="Class-Path" value="${lib.list}"/>
|
|
|
|
</manifest>
|
|
|
|
|
|
|
|
<jar destfile="OsmAndMapCreator.jar" manifest="MANIFEST.MF">
|
|
|
|
<fileset dir="${bin.absolute.dir}">
|
|
|
|
<include name="**/*" />
|
|
|
|
</fileset>
|
2012-06-18 20:09:29 +02:00
|
|
|
<fileset dir="${icons.absolute.dir}/..">
|
2012-06-18 20:03:44 +02:00
|
|
|
<include name="**/*" />
|
|
|
|
</fileset>
|
2011-05-07 22:56:11 +02:00
|
|
|
<fileset dir="${src.absolute.dir}">
|
|
|
|
<include name="**/*.java" />
|
|
|
|
</fileset>
|
|
|
|
</jar>
|
|
|
|
|
|
|
|
<delete file="MANIFEST.MF" />
|
|
|
|
</target>
|
|
|
|
|
2012-07-15 04:52:24 +02:00
|
|
|
<target name="build" depends="jar, junits">
|
2011-05-07 22:56:11 +02:00
|
|
|
<delete dir="build"/>
|
|
|
|
<copy todir="build">
|
|
|
|
<fileset dir=".">
|
|
|
|
<include name="OsmAndMapCreator.jar"/>
|
|
|
|
<include name="lib/**"/>
|
|
|
|
<include name="logging.properties"/>
|
2012-07-06 00:35:39 +02:00
|
|
|
<include name="*.bat"/>
|
|
|
|
<include name="*.sh"/>
|
2011-05-07 22:56:11 +02:00
|
|
|
<exclude name="lib/h2*"/>
|
|
|
|
</fileset>
|
|
|
|
<fileset dir="src/net/osmand/osm/">
|
|
|
|
<include name="rendering_types.xml"/>
|
|
|
|
</fileset>
|
2012-12-12 00:04:06 +01:00
|
|
|
|
2011-05-07 22:56:11 +02:00
|
|
|
<fileset dir=".">
|
2012-01-04 21:05:31 +01:00
|
|
|
<include name="../build-scripts/regions/indexes.xml" />
|
2011-05-07 22:56:11 +02:00
|
|
|
</fileset>
|
|
|
|
<fileset dir="src/net/osmand/data/index">
|
|
|
|
<include name="batch.xml" />
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
2012-12-12 00:04:06 +01:00
|
|
|
<copy todir="build/lib">
|
|
|
|
<fileset dir="${osmand-core.dir}">
|
|
|
|
<include name="${osmand-core.jar}" />
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
2011-05-07 22:56:11 +02:00
|
|
|
<zip destfile="build.zip">
|
|
|
|
<fileset dir="build">
|
|
|
|
</fileset>
|
|
|
|
</zip>
|
|
|
|
<delete file="OsmAndMapCreator.jar" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
</project>
|