2013-04-18 23:35:02 +02:00
|
|
|
<!-- build JAR libraty -->
|
|
|
|
<project name="OsmAnd-core" default="build" basedir=".">
|
|
|
|
|
|
|
|
<property file="local.properties" />
|
|
|
|
|
2013-06-24 01:56:23 +02:00
|
|
|
<property name="src.dir" value="src" />
|
2013-04-18 23:35:02 +02:00
|
|
|
<property name="src.absolute.dir" location="${src.dir}" />
|
2013-06-24 01:56:23 +02:00
|
|
|
<property name="bin.dir" value="bin" />
|
|
|
|
<property name="bin.absolute.dir" location="${bin.dir}" />
|
|
|
|
<property name="lib.dir" value="libs" />
|
2013-04-18 23:35:02 +02:00
|
|
|
<property name="lib.absolute.dir" location="${lib.dir}" />
|
|
|
|
<property name="java.encoding" value="UTF-8" />
|
|
|
|
|
|
|
|
<path id="build.path">
|
|
|
|
<fileset dir="${lib.absolute.dir}">
|
2013-06-24 01:56:23 +02:00
|
|
|
<include name="*.jar" />
|
2013-04-18 23:35:02 +02:00
|
|
|
</fileset>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<target name="-dirs">
|
2013-06-24 01:56:23 +02:00
|
|
|
<mkdir dir="${bin.absolute.dir}" />
|
2013-04-18 23:35:02 +02:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="clean">
|
2013-06-24 01:56:23 +02:00
|
|
|
<delete dir="${bin.absolute.dir}" />
|
|
|
|
<delete file="OsmAnd-core.jar" />
|
2013-04-18 23:35:02 +02:00
|
|
|
</target>
|
2013-06-24 01:56:23 +02:00
|
|
|
|
2013-04-18 23:35:02 +02:00
|
|
|
|
2013-06-17 01:31:59 +02:00
|
|
|
<target name="copy_resources">
|
|
|
|
<copy todir="${src.absolute.dir}/net/osmand/router/">
|
2013-06-24 01:56:23 +02:00
|
|
|
<fileset dir="../../resources/routing/">
|
|
|
|
<include name="*.xml" />
|
2013-06-17 01:31:59 +02:00
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
<copy todir="${src.absolute.dir}/net/osmand/render/">
|
2013-06-24 01:56:23 +02:00
|
|
|
<fileset dir="../../resources/rendering_styles/">
|
|
|
|
<include name="*.xml" />
|
2013-06-17 01:31:59 +02:00
|
|
|
</fileset>
|
|
|
|
</copy>
|
2013-06-21 09:34:12 +02:00
|
|
|
<copy todir="${src.absolute.dir}/net/osmand/osm/">
|
2013-06-24 01:56:23 +02:00
|
|
|
<fileset dir="../../resources/obf_creation/">
|
|
|
|
<include name="rendering_types.xml" />
|
2013-06-21 09:34:12 +02:00
|
|
|
</fileset>
|
|
|
|
</copy>
|
2013-06-17 01:31:59 +02:00
|
|
|
<copy todir="${src.absolute.dir}/net/osmand/map/">
|
2013-06-24 01:56:23 +02:00
|
|
|
<fileset dir="../../resources/countries-info/">
|
|
|
|
<include name="countries.reginfo" />
|
2013-06-17 01:31:59 +02:00
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
<target name="compile" depends="-dirs,copy_resources">
|
2013-04-18 23:35:02 +02:00
|
|
|
<copy todir="${bin.absolute.dir}">
|
|
|
|
<fileset dir="${src.absolute.dir}">
|
|
|
|
<exclude name="**/*.java" />
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
2013-06-24 01:56:23 +02:00
|
|
|
<javac srcdir="${src.absolute.dir}" destdir="${bin.absolute.dir}" encoding="${java.encoding}" classpathref="build.path" debug="on" source="1.6">
|
|
|
|
<include name="**/*.java" />
|
|
|
|
<exclude name="net/osmand/plus/**" />
|
2013-04-18 23:35:02 +02:00
|
|
|
</javac>
|
2013-06-24 01:56:23 +02:00
|
|
|
|
2013-04-18 23:35:02 +02:00
|
|
|
</target>
|
2013-06-24 01:56:23 +02:00
|
|
|
|
2013-04-18 23:35:02 +02:00
|
|
|
<target name="native-libs-jar" depends="compile">
|
2013-06-24 01:56:23 +02:00
|
|
|
<exec command="bash collect_libs.sh" failonerror="true">
|
|
|
|
</exec>
|
|
|
|
<antcall target="jar" />
|
2013-04-18 23:35:02 +02:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="jar" depends="compile">
|
|
|
|
<manifestclasspath property="lib.list" jarfile="OsmAnd-core.jar">
|
2013-06-24 01:56:23 +02:00
|
|
|
<classpath refid="build.path" />
|
2013-04-18 23:35:02 +02:00
|
|
|
</manifestclasspath>
|
|
|
|
<echo>list is ${lib.list}</echo>
|
|
|
|
|
|
|
|
<delete file="OsmAnd-core.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" />
|
2013-06-24 01:56:23 +02:00
|
|
|
<attribute name="Class-Path" value="${lib.list}" />
|
2013-04-18 23:35:02 +02:00
|
|
|
</manifest>
|
|
|
|
|
|
|
|
<jar destfile="OsmAnd-core.jar" manifest="MANIFEST.MF">
|
|
|
|
<fileset dir="${bin.absolute.dir}">
|
|
|
|
<include name="**/*" />
|
|
|
|
</fileset>
|
|
|
|
<fileset dir="${src.absolute.dir}">
|
|
|
|
<include name="**/*.java" />
|
|
|
|
</fileset>
|
|
|
|
</jar>
|
2013-06-24 01:56:23 +02:00
|
|
|
|
2013-04-18 23:35:02 +02:00
|
|
|
<delete file="MANIFEST.MF" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="build" depends="jar">
|
|
|
|
</target>
|
|
|
|
</project>
|