Fix build scripts
This commit is contained in:
parent
478886ef77
commit
9a01ae51cd
16 changed files with 99 additions and 20 deletions
BIN
DataExtractionOSM/OsmAnd-core.jar
Normal file
BIN
DataExtractionOSM/OsmAnd-core.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -5,6 +5,8 @@
|
|||
|
||||
<property name="file.to.upload" value="OsmAndMapCreator-nightbuild.zip"/>
|
||||
<property name="src.dir" value="src"/>
|
||||
<property name="osmand-core.dir" location="../OsmAnd-java/"/>
|
||||
<property name="osmand-core.jar" value="OsmAnd-core.jar"/>
|
||||
<property name="src.absolute.dir" location="${src.dir}" />
|
||||
<property name="icons.dir" value="icons/resources"/>
|
||||
<property name="icons.absolute.dir" location="${icons.dir}" />
|
||||
|
@ -17,11 +19,10 @@
|
|||
<property name="srctests.dir" value="src-tests"/>
|
||||
<property name="reports.tests" value="${basedir}/test-results" />
|
||||
|
||||
<path id="ant.lib.path">
|
||||
<fileset dir="ant-lib" includes="*.jar" />
|
||||
</path>
|
||||
|
||||
<path id="build.path">
|
||||
<fileset dir="${osmand-core.dir}">
|
||||
<include name="${osmand-core.jar}"/>
|
||||
</fileset>
|
||||
<fileset dir="${lib.absolute.dir}">
|
||||
<include name="*.jar"/>
|
||||
</fileset>
|
||||
|
@ -40,6 +41,8 @@
|
|||
<include name="g_*.png"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<ant antfile="${osmand-core.dir}/build.xml" target="jar" >
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="-version" if="build.version">
|
||||
|
@ -63,9 +66,7 @@
|
|||
classpathref="build.path"
|
||||
debug="on"
|
||||
source="1.6"
|
||||
>
|
||||
<exclude name="net/osmand/plus/**"/>
|
||||
</javac>
|
||||
/>
|
||||
<javac srcdir="${srctests.dir}"
|
||||
destdir="${bintests.dir}"
|
||||
encoding="${java.encoding}"
|
||||
|
@ -79,6 +80,9 @@
|
|||
<pathelement location="${bin.absolute.dir}" />
|
||||
<pathelement location="${bintests.dir}" />
|
||||
<pathelement location="${srctests.dir}" />
|
||||
<fileset dir="${osmand-core.dir}">
|
||||
<include name="${osmand-core.jar}"/>
|
||||
</fileset>
|
||||
<fileset dir="${lib.absolute.dir}">
|
||||
<include name="*.jar" />
|
||||
</fileset>
|
||||
|
@ -101,7 +105,7 @@
|
|||
</junit>
|
||||
</target>
|
||||
|
||||
<target name="jar" depends="-copy-resources, -dirs">
|
||||
<target name="jar" depends="-copy-resources, -dirs, compile">
|
||||
<manifestclasspath property="lib.list" jarfile="OsmAndMapCreator.jar">
|
||||
<classpath refid="build.path"/>
|
||||
</manifestclasspath>
|
||||
|
@ -144,6 +148,7 @@
|
|||
<fileset dir="src/net/osmand/osm/">
|
||||
<include name="rendering_types.xml"/>
|
||||
</fileset>
|
||||
|
||||
<fileset dir=".">
|
||||
<include name="../build-scripts/regions/indexes.xml" />
|
||||
</fileset>
|
||||
|
@ -151,6 +156,11 @@
|
|||
<include name="batch.xml" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="build/lib">
|
||||
<fileset dir="${osmand-core.dir}">
|
||||
<include name="${osmand-core.jar}" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<zip destfile="build.zip">
|
||||
<fileset dir="build">
|
||||
</fileset>
|
||||
|
@ -158,13 +168,4 @@
|
|||
<delete file="OsmAndMapCreator.jar" />
|
||||
</target>
|
||||
|
||||
<taskdef name="cpd" classname="net.sourceforge.pmd.cpd.CPDTask" classpathref="ant.lib.path"/>
|
||||
|
||||
<target name="cpd" description="Search for cut-and-pasted code">
|
||||
<property name="cpd.report.xml" location="cpd.xml"/>
|
||||
<cpd minimumTokenCount="100" format="xml" outputFile="${cpd.report.xml}"
|
||||
ignoreLiterals="true" ignoreIdentifiers="true">
|
||||
<fileset dir="${src.absolute.dir}" includes="**/*.java"/>
|
||||
</cpd>
|
||||
</target>
|
||||
</project>
|
||||
|
|
BIN
DataExtractionOSM/lib/OsmAnd-core.jar
Normal file
BIN
DataExtractionOSM/lib/OsmAnd-core.jar
Normal file
Binary file not shown.
|
@ -103,13 +103,13 @@ public class RegionsRegistryConverter {
|
|||
regions.addRegions(c.convert());
|
||||
}
|
||||
|
||||
String filePath = "src/net/osmand/map/"+RegionRegistry.fileName;
|
||||
String filePath = "../OsmAnd-java/src/net/osmand/map/"+RegionRegistry.fileName;
|
||||
long t = -System.currentTimeMillis();
|
||||
FileOutputStream out = new FileOutputStream(filePath);
|
||||
OsmAndRegionInfo.newBuilder().setRegionInfo(regions)
|
||||
.build().writeTo(out);
|
||||
out.close();
|
||||
InputStream in = RegionsRegistryConverter.class.getResourceAsStream(RegionRegistry.fileName);
|
||||
InputStream in = RegionRegistry.class.getResourceAsStream(RegionRegistry.fileName);
|
||||
OsmAndRegionInfo regInfo = OsmAndRegionInfo.newBuilder().mergeFrom(in).build();
|
||||
t += System.currentTimeMillis();
|
||||
for(int j = 0; j < regInfo.getRegionInfo().getRegionsCount(); j++) {
|
2
OsmAnd-java/.gitignore
vendored
2
OsmAnd-java/.gitignore
vendored
|
@ -1 +1,3 @@
|
|||
bin
|
||||
OsmAnd-core.jar
|
||||
build
|
||||
|
|
76
OsmAnd-java/build.xml
Normal file
76
OsmAnd-java/build.xml
Normal file
|
@ -0,0 +1,76 @@
|
|||
<!-- build JAR libraty -->
|
||||
<project name="DataExtractionOSM" default="build" basedir=".">
|
||||
|
||||
<property file="local.properties" />
|
||||
|
||||
<property name="src.dir" value="src"/>
|
||||
<property name="src.absolute.dir" location="${src.dir}" />
|
||||
<property name="bin.dir" value="bin"/>
|
||||
<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" />
|
||||
|
||||
<path id="build.path">
|
||||
<fileset dir="${lib.absolute.dir}">
|
||||
<include name="*.jar"/>
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
<target name="-dirs">
|
||||
<mkdir dir="${bin.absolute.dir}"/>
|
||||
</target>
|
||||
|
||||
<target name="clean">
|
||||
<delete dir="${bin.absolute.dir}"/>
|
||||
<delete file="OsmAnd-core.jar"/>
|
||||
</target>
|
||||
|
||||
<target name="compile" depends="-dirs">
|
||||
<copy todir="${bin.absolute.dir}">
|
||||
<fileset dir="${src.absolute.dir}">
|
||||
<exclude name="**/*.java" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<javac srcdir="${src.absolute.dir}"
|
||||
|
||||
destdir="${bin.absolute.dir}"
|
||||
encoding="${java.encoding}"
|
||||
classpathref="build.path"
|
||||
debug="on"
|
||||
source="1.6"
|
||||
>
|
||||
<exclude name="net/osmand/plus/**"/>
|
||||
</javac>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="jar" depends="compile">
|
||||
<manifestclasspath property="lib.list" jarfile="OsmAnd-core.jar">
|
||||
<classpath refid="build.path"/>
|
||||
</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" />
|
||||
<attribute name="Class-Path" value="${lib.list}"/>
|
||||
</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>
|
||||
|
||||
<delete file="MANIFEST.MF" />
|
||||
</target>
|
||||
|
||||
<target name="build" depends="jar">
|
||||
</target>
|
||||
</project>
|
|
@ -22,7 +22,7 @@ public class RegionRegistry {
|
|||
try {
|
||||
long t = -System.currentTimeMillis();
|
||||
r = new RegionRegistry();
|
||||
InputStream in = RegionsRegistryConverter.class.getResourceAsStream(RegionRegistry.fileName);
|
||||
InputStream in = RegionRegistry.class.getResourceAsStream(RegionRegistry.fileName);
|
||||
OsmAndRegionInfo regInfo = OsmAndRegionInfo.newBuilder().mergeFrom(in).build();
|
||||
for(int j = 0; j < regInfo.getRegionInfo().getRegionsCount(); j++) {
|
||||
r.countries.add(RegionCountry.construct(regInfo.getRegionInfo().getRegions(j)));
|
||||
|
|
Loading…
Reference in a new issue