Merge branch 'master' of ssh://github.com/osmandapp/Osmand into CoordinateInputImprovements

This commit is contained in:
Chumva 2018-06-18 10:32:33 +03:00
commit e084af9936
370 changed files with 3566 additions and 9667 deletions

View file

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="test/java"/>
<classpathentry kind="src" path="test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="libs/bsh-core-2.0b4.jar"/>
<classpathentry kind="lib" path="libs/bzip2-20090327.jar"/>
<classpathentry kind="lib" path="libs/commons-logging-1.1.1.jar"/>
<classpathentry kind="lib" path="libs/json-20090211.jar"/>
<classpathentry kind="lib" path="libs/junidecode-0.1.jar"/>
<classpathentry kind="lib" path="libs/kxml2-2.3.0.jar"/>
<classpathentry kind="lib" path="libs/tuprolog.jar"/>
<classpathentry kind="lib" path="libs/icu4j-49_1_patched.jar"/>
<classpathentry kind="lib" path="libs/gnu-trove-osmand.jar"/>
<classpathentry kind="lib" path="test/libs/gson-2.6.2.jar"/>
<classpathentry kind="lib" path="test/libs/hamcrest-core-1.3.jar"/>
<classpathentry kind="lib" path="test/libs/junit-4.12.jar"/>
<classpathentry kind="lib" path="libs/jts-core-1.14.0.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -1,11 +1,10 @@
bin
c-src
OsmAnd-core.jar
protobuf-src/com
OsmAnd-core-android.jar
build
src/net/osmand/core/jni/*
result.*
.settings
.project
.classpath
# Android Studio
/.idea
*.iml

View file

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>OsmAnd-java</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<variableList>
<variable>
<name>OSMAND_TRUNK</name>
<value>$%7BPARENT-1-PROJECT_LOC%7D</value>
</variable>
</variableList>
</projectDescription>

View file

@ -1,12 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7

View file

@ -1,36 +1,92 @@
apply plugin: 'java'
apply plugin: 'application'
mainClassName = "net.osmand.util.GeoPointParserUtil"
compileJava.options.encoding = 'UTF-8'
configurations {
android
}
tasks.withType(JavaCompile) {
sourceCompatibility = "1.7"
targetCompatibility = "1.7"
}
sourceSets {
main {
java {
srcDirs = ["src"]
}
task collectRoutingResources(type: Sync) {
from "../../resources/routing"
into "src/main/resources/net/osmand/router"
include "*.xml"
}
task collectMiscResources(type: Copy) {
into "src/main/resources/net/osmand/osm"
from("../../resources/obf_creation") {
include "rendering_types.xml"
}
from("../../resources/poi") {
include "poi_types.xml"
}
}
configurations {
android
task collectRenderingStylesResources(type: Sync) {
from "../../resources/rendering_styles"
into "src/main/resources/net/osmand/render"
include "*.xml"
}
task collectRegionsInfoResources(type: Copy) {
from "../../resources/countries-info"
into "src/main/resources/net/osmand/map"
include "regions.ocbf"
}
task collectTestResources(type: Copy) {
from "../../resources/test-resources"
into "src/test/resources/"
include "*"
}
task collectExternalResources {
dependsOn collectRoutingResources,
collectRenderingStylesResources,
collectRegionsInfoResources,
collectTestResources,
collectMiscResources
}
task androidJar(type: Jar) {
dependsOn collectExternalResources, build
appendix = "android"
from sourceSets.main.output
exclude("**/PlatformUtil.*")
from (sourceSets.main.java.outputDir) {
exclude("**/PlatformUtil.*")
}
from sourceSets.main.resources
}
compileJava {
dependsOn collectExternalResources
}
artifacts {
android androidJar
}
dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
testImplementation 'junit:junit:4.12'
testImplementation 'com.google.code.gson:gson:2.8.2'
testImplementation 'org.hamcrest:hamcrest-core:1.3'
implementation group: 'commons-logging', name: 'commons-logging', version: '1.2'
implementation group: 'org.json', name: 'json', version: '20171018'
implementation 'it.unibo.alice.tuprolog:tuprolog:3.2.1'
implementation 'org.beanshell:bsh-core:2.0b4'
implementation 'org.apache.commons:commons-compress:1.17'
implementation 'com.moparisthebest:junidecode:0.1.1'
implementation 'com.vividsolutions:jts-core:1.14.0'
implementation 'net.sf.kxml:kxml2:2.1.8'
implementation fileTree(dir: "libs", include: ["*.jar"])
}

View file

@ -1,184 +0,0 @@
<!-- build JAR libraty -->
<project name="OsmAnd-core" default="build" basedir=".">
<property file="local.properties" />
<property name="src.dir" value="src" />
<property name="src.absolute.dir" location="${src.dir}" />
<property name="protobuf.src" location="protobuf-src" />
<property name="bin.dir" value="bin" />
<property name="bin.absolute.dir" location="${bin.dir}" />
<property name="lib.dir" value="libs" />
<property name="lib.absolute.dir" location="${lib.dir}" />
<property name="unit.dir" value="test/java" />
<property name="unit.absolute.dir" location="${unit.dir}" />
<property name="test.lib.dir" value="test/libs" />
<property name="test.lib.absolute.dir" location="${test.lib.dir}" />
<property name="reports.tests" value="test-results" />
<property name="srctests.dir" value="test/java"/>
<property name="java.encoding" value="UTF-8" />
<path id="build.path">
<fileset dir="${lib.absolute.dir}">
<include name="*.jar" />
</fileset>
</path>
<path id="test-lib.path">
<fileset dir="${test.lib.absolute.dir}">
<include name="*.jar" />
</fileset>
</path>
<path id="unit.test.path">
<path refid="build.path"/>
<pathelement path="test/java"/>
</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="compileUnitTests" depends="compile">
<javac srcdir="test/" destdir="${bin.absolute.dir}">
<classpath>
<path refid="build.path"/>
<path refid="test-lib.path" />
</classpath>
</javac>
<copy todir="${bin.absolute.dir}">
<fileset dir="test/resources">
<include name="**/*" />
</fileset>
</copy>
</target>
<target name="junits" >
<junit printsummary="yes" showoutput="yes">
<classpath>
<pathelement path="bin"/>
<path refid="build.path"/>
<path refid="test-lib.path" />
</classpath>
<formatter type="xml" />
<batchtest fork="false" todir="${reports.tests}" >
<fileset dir="${srctests.dir}" >
<include name="**/*Test.java" />
<exclude name="**/AllTests.java" />
<exclude name="**/*Suite*.java" />
</fileset>
</batchtest>
</junit>
</target>
<target name="copy_resources">
<copy todir="${src.absolute.dir}/net/osmand/router/">
<fileset dir="../../resources/routing/">
<include name="*.xml" />
</fileset>
</copy>
<copy todir="${src.absolute.dir}/net/osmand/render/">
<fileset dir="../../resources/rendering_styles/">
<include name="*.xml" />
</fileset>
</copy>
<copy todir="${src.absolute.dir}/net/osmand/osm/">
<fileset dir="../../resources/obf_creation/">
<include name="rendering_types.xml" />
</fileset>
<fileset dir="../../resources/poi/">
<include name="poi_types.xml" />
</fileset>
</copy>
<copy todir="${src.absolute.dir}/net/osmand/map/">
<fileset dir="../../resources/countries-info/">
<include name="countries.reginfo" />
<include name="regions.ocbf" />
</fileset>
</copy>
</target>
<target name="patch-protobuf">
<copy file="${protobuf.src}/com/google/protobuf/CodedInputStream.java"
tofile="${protobuf.src}/com/google/protobuf/CodedInputStreamRAF.java" overwrite="yes">
</copy>
<copy todir="${src.absolute.dir}">
<fileset dir="${protobuf.src}"/>
</copy>
<patch patchfile="protobuf.patch" dir=".."/>
</target>
<target name="compile" depends="-dirs,copy_resources">
<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.7">
<include name="**/*.java" />
<exclude name="net/osmand/plus/**" />
</javac>
</target>
<target name="native-libs-jar" depends="compile">
<exec command="bash collect_libs.sh" failonerror="true">
</exec>
<antcall target="jar" />
</target>
<target name="native-legacy-libs-jar" depends="compile">
<exec command="bash collect_legacy_libs.sh" failonerror="true">
</exec>
<antcall target="jar" />
</target>
<target name="jar" depends="compile, compileUnitTests">
<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>
<fileset dir="${unit.absolute.dir}">
<include name="**/*.java" />
</fileset>
</jar>
<jar destfile="OsmAnd-core-android.jar" manifest="MANIFEST.MF">
<fileset dir="${bin.absolute.dir}">
<include name="**/*.class" />
<exclude name="**/PlatformUtil*"/>
</fileset>
<fileset dir="${src.absolute.dir}">
<include name="**/*.java" />
<exclude name="**/PlatformUtil*"/>
</fileset>
</jar>
<delete file="MANIFEST.MF" />
</target>
<target name="build" depends="jar">
</target>
</project>

View file

@ -14,7 +14,8 @@ fi
function copyLibs {
if [ -d "$CORE_LOC/binaries/$1/$2" ]; then
echo "Copy binaries $1 $2";
cp "$CORE_LOC"/binaries/$1/$2/Release/libosmand.so bin/osmand-$1-$3.lib
mkdir -p "$SCRIPT_LOC"/src/main/resources/
cp "$CORE_LOC"/binaries/$1/$2/Release/libosmand.so "$SCRIPT_LOC"/src/main/resources/osmand-$1-$3.lib
fi
}

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.

View file

@ -1,10 +0,0 @@
#!/bin/bash
if [ ! -d bin ];
then
echo "Building OsmAnd-java...";
ant build
fi
echo "Starting tests..."
ant junits
echo "Results can be found in result.txt file."

Some files were not shown because too many files have changed in this diff Show more