diff --git a/.gitignore b/.gitignore index 30edb7f..4a9b72a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,22 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/gradle.xml +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx misc/segments4 misc/customprofiles -target/ *.BAK .classpath .project -*.class *.iml - -.idea/* !/.idea/runConfigurations diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..681f41a --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,116 @@ + + + + + + + +
+ + + + xmlns:android + + ^$ + + + +
+
+ + + + xmlns:.* + + ^$ + + + BY_NAME + +
+
+ + + + .*:id + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + .*:name + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + name + + ^$ + + + +
+
+ + + + style + + ^$ + + + +
+
+ + + + .* + + ^$ + + + BY_NAME + +
+
+ + + + .* + + http://schemas.android.com/apk/res/android + + + ANDROID_ATTRIBUTE_ORDER + +
+
+ + + + .* + + .* + + + BY_NAME + +
+
+
+
+
+
\ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..82fb904 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/brouter-codec/.gitignore b/brouter-codec/.gitignore new file mode 100644 index 0000000..84c048a --- /dev/null +++ b/brouter-codec/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/brouter-codec/build.gradle b/brouter-codec/build.gradle new file mode 100644 index 0000000..f055667 --- /dev/null +++ b/brouter-codec/build.gradle @@ -0,0 +1,7 @@ +plugins { + id 'java-library' +} + +dependencies { + implementation project(':brouter-util') +} diff --git a/brouter-codec/pom.xml b/brouter-codec/pom.xml deleted file mode 100644 index 13dd8e7..0000000 --- a/brouter-codec/pom.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - 4.0.0 - - org.btools - brouter - 1.6.1 - ../pom.xml - - brouter-codec - jar - - - - org.btools - brouter-util - ${project.version} - - - junit - junit - test - - - diff --git a/brouter-codec/src/main/AndroidManifest.xml b/brouter-codec/src/main/AndroidManifest.xml new file mode 100644 index 0000000..152508c --- /dev/null +++ b/brouter-codec/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/brouter-core/.gitignore b/brouter-core/.gitignore new file mode 100644 index 0000000..84c048a --- /dev/null +++ b/brouter-core/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/brouter-core/build.gradle b/brouter-core/build.gradle new file mode 100644 index 0000000..597056a --- /dev/null +++ b/brouter-core/build.gradle @@ -0,0 +1,12 @@ +plugins { + id 'java-library' +} + +dependencies { + + implementation project(':brouter-mapaccess') + implementation project(':brouter-util') + implementation project(':brouter-expressions') + implementation project(':brouter-codec') + +} diff --git a/brouter-core/pom.xml b/brouter-core/pom.xml deleted file mode 100644 index 16fe6ac..0000000 --- a/brouter-core/pom.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - 4.0.0 - - org.btools - brouter - 1.6.1 - ../pom.xml - - brouter-core - jar - - - - org.btools - brouter-util - ${project.version} - - - org.btools - brouter-codec - ${project.version} - - - org.btools - brouter-mapaccess - ${project.version} - - - org.btools - brouter-expressions - ${project.version} - - - junit - junit - test - - - diff --git a/brouter-core/src/main/AndroidManifest.xml b/brouter-core/src/main/AndroidManifest.xml new file mode 100644 index 0000000..04180cf --- /dev/null +++ b/brouter-core/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/brouter-expressions/.gitignore b/brouter-expressions/.gitignore new file mode 100644 index 0000000..84c048a --- /dev/null +++ b/brouter-expressions/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/brouter-expressions/build.gradle b/brouter-expressions/build.gradle new file mode 100644 index 0000000..839a17d --- /dev/null +++ b/brouter-expressions/build.gradle @@ -0,0 +1,8 @@ +plugins { + id 'java-library' +} + +dependencies { + implementation project(':brouter-util') + implementation project(':brouter-codec') +} diff --git a/brouter-expressions/pom.xml b/brouter-expressions/pom.xml deleted file mode 100644 index dfb35d2..0000000 --- a/brouter-expressions/pom.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - 4.0.0 - - org.btools - brouter - 1.6.1 - ../pom.xml - - brouter-expressions - jar - - - - org.btools - brouter-util - ${project.version} - - - org.btools - brouter-codec - ${project.version} - - - junit - junit - test - - - diff --git a/brouter-expressions/src/main/AndroidManifest.xml b/brouter-expressions/src/main/AndroidManifest.xml new file mode 100644 index 0000000..9110ced --- /dev/null +++ b/brouter-expressions/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/brouter-map-creator/.gitignore b/brouter-map-creator/.gitignore new file mode 100644 index 0000000..84c048a --- /dev/null +++ b/brouter-map-creator/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/brouter-map-creator/build.gradle b/brouter-map-creator/build.gradle new file mode 100644 index 0000000..1bbc73f --- /dev/null +++ b/brouter-map-creator/build.gradle @@ -0,0 +1,16 @@ +plugins { + id 'application' +} + +application { + // Gradles 'application' plugin requires one main class; since we have multiple ones, just specify + // one of them, since the applications won't be run from gradle anyways. + mainClassName = 'btools.mapcreator.PosUnifier' +} + +dependencies { + implementation project(':brouter-util') + implementation project(':brouter-codec') + implementation project(':brouter-expressions') + implementation('junit:junit:4.13') +} diff --git a/brouter-map-creator/pom.xml b/brouter-map-creator/pom.xml deleted file mode 100644 index 32a0df5..0000000 --- a/brouter-map-creator/pom.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - 4.0.0 - - org.btools - brouter - 1.6.1 - ../pom.xml - - brouter-map-creator - jar - - - - org.btools - brouter-util - ${project.version} - - - org.btools - brouter-codec - ${project.version} - - - org.btools - brouter-expressions - ${project.version} - - - org.btools - brouter-mapaccess - ${project.version} - - - junit - junit - test - - - diff --git a/brouter-mapaccess/.gitignore b/brouter-mapaccess/.gitignore new file mode 100644 index 0000000..84c048a --- /dev/null +++ b/brouter-mapaccess/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/brouter-mapaccess/build.gradle b/brouter-mapaccess/build.gradle new file mode 100644 index 0000000..eb89b10 --- /dev/null +++ b/brouter-mapaccess/build.gradle @@ -0,0 +1,10 @@ +plugins { + id 'java-library' +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation project(':brouter-util') + implementation project(':brouter-codec') + implementation project(':brouter-expressions') +} diff --git a/brouter-mapaccess/pom.xml b/brouter-mapaccess/pom.xml deleted file mode 100644 index c48fddc..0000000 --- a/brouter-mapaccess/pom.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - 4.0.0 - - org.btools - brouter - 1.6.1 - ../pom.xml - - brouter-mapaccess - jar - - - - org.btools - brouter-util - ${project.version} - - - org.btools - brouter-codec - ${project.version} - - - org.btools - brouter-expressions - ${project.version} - - - diff --git a/brouter-mapaccess/src/main/AndroidManifest.xml b/brouter-mapaccess/src/main/AndroidManifest.xml new file mode 100644 index 0000000..46f6fa6 --- /dev/null +++ b/brouter-mapaccess/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/brouter-routing-app/.gitignore b/brouter-routing-app/.gitignore index e8e450b..84c048a 100644 --- a/brouter-routing-app/.gitignore +++ b/brouter-routing-app/.gitignore @@ -1 +1 @@ -gen/ +/build/ diff --git a/brouter-routing-app/AndroidManifest.xml b/brouter-routing-app/AndroidManifest.xml deleted file mode 100644 index 498d175..0000000 --- a/brouter-routing-app/AndroidManifest.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/brouter-routing-app/build.gradle b/brouter-routing-app/build.gradle new file mode 100644 index 0000000..9af45ba --- /dev/null +++ b/brouter-routing-app/build.gradle @@ -0,0 +1,34 @@ +plugins { + id 'com.android.application' +} + +android { + compileSdkVersion 29 + + defaultConfig { + applicationId "btools.routingapp" + minSdkVersion 10 + targetSdkVersion 29 + versionCode 41 + versionName "1.6.1" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + + implementation project(':brouter-mapaccess') + implementation project(':brouter-core') + implementation project(':brouter-expressions') + implementation project(':brouter-util') +} diff --git a/brouter-routing-app/classpath b/brouter-routing-app/classpath deleted file mode 100644 index a662f00..0000000 --- a/brouter-routing-app/classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/brouter-routing-app/pom.xml b/brouter-routing-app/pom.xml deleted file mode 100644 index aaf1328..0000000 --- a/brouter-routing-app/pom.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - 4.0.0 - - org.btools - brouter - 1.6.1 - ../pom.xml - - brouter-routing-app - apk - - - - release - - - - performRelease - true - - - - - - - - com.google.android - android - 4.1.1.4 - provided - - - org.btools - brouter-core - ${project.version} - - - - - - - - org.apache.maven.plugins - maven-jarsigner-plugin - - - signing - - sign - verify - - package - true - - true - - - ${project.build.directory}/${project.artifactId}.apk - - \sign\mystore - myalias - mypasswd - mypasswd - true - - - - - - - com.jayway.maven.plugins.android.generation2 - android-maven-plugin - - true - - true - - false - - - true - ${project.build.directory}/${project.artifactId}.apk - ${project.build.directory}/${project.artifactId}-signed-aligned.apk - - - - - - alignApk - package - - zipalign - - - - - - - - - diff --git a/brouter-routing-app/proguard-rules.pro b/brouter-routing-app/proguard-rules.pro new file mode 100644 index 0000000..f1b4245 --- /dev/null +++ b/brouter-routing-app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/brouter-routing-app/project b/brouter-routing-app/project deleted file mode 100644 index 951383c..0000000 --- a/brouter-routing-app/project +++ /dev/null @@ -1,33 +0,0 @@ - - - AccelerometerPlay - - - - - - com.android.ide.eclipse.adt.ResourceManagerBuilder - - - - - com.android.ide.eclipse.adt.PreCompilerBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.android.ide.eclipse.adt.ApkBuilder - - - - - - com.android.ide.eclipse.adt.AndroidNature - org.eclipse.jdt.core.javanature - - diff --git a/brouter-routing-app/project.properties b/brouter-routing-app/project.properties deleted file mode 100644 index 29e368b..0000000 --- a/brouter-routing-app/project.properties +++ /dev/null @@ -1,11 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system use, -# "ant.properties", and override values to adapt the script to your -# project structure. - -# Project target. -target=android-28 diff --git a/brouter-routing-app/src/main/AndroidManifest.xml b/brouter-routing-app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..9c5a766 --- /dev/null +++ b/brouter-routing-app/src/main/AndroidManifest.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/brouter-routing-app/src/main/java/btools/routingapp/IBRouterService.aidl b/brouter-routing-app/src/main/aidl/btools/routingapp/IBRouterService.aidl similarity index 100% rename from brouter-routing-app/src/main/java/btools/routingapp/IBRouterService.aidl rename to brouter-routing-app/src/main/aidl/btools/routingapp/IBRouterService.aidl diff --git a/brouter-routing-app/assets/modes.zip b/brouter-routing-app/src/main/assets/modes.zip similarity index 100% rename from brouter-routing-app/assets/modes.zip rename to brouter-routing-app/src/main/assets/modes.zip diff --git a/brouter-routing-app/assets/profiles2.zip b/brouter-routing-app/src/main/assets/profiles2.zip similarity index 100% rename from brouter-routing-app/assets/profiles2.zip rename to brouter-routing-app/src/main/assets/profiles2.zip diff --git a/brouter-routing-app/assets/readmes.zip b/brouter-routing-app/src/main/assets/readmes.zip similarity index 100% rename from brouter-routing-app/assets/readmes.zip rename to brouter-routing-app/src/main/assets/readmes.zip diff --git a/brouter-routing-app/assets/segments4.zip b/brouter-routing-app/src/main/assets/segments4.zip similarity index 100% rename from brouter-routing-app/assets/segments4.zip rename to brouter-routing-app/src/main/assets/segments4.zip diff --git a/brouter-routing-app/assets/world.png b/brouter-routing-app/src/main/assets/world.png similarity index 100% rename from brouter-routing-app/assets/world.png rename to brouter-routing-app/src/main/assets/world.png diff --git a/brouter-routing-app/res/drawable-hdpi/icon.png b/brouter-routing-app/src/main/res/drawable-hdpi/icon.png similarity index 100% rename from brouter-routing-app/res/drawable-hdpi/icon.png rename to brouter-routing-app/src/main/res/drawable-hdpi/icon.png diff --git a/brouter-routing-app/res/drawable-ldpi/icon.png b/brouter-routing-app/src/main/res/drawable-ldpi/icon.png similarity index 100% rename from brouter-routing-app/res/drawable-ldpi/icon.png rename to brouter-routing-app/src/main/res/drawable-ldpi/icon.png diff --git a/brouter-routing-app/res/drawable-mdpi/icon.png b/brouter-routing-app/src/main/res/drawable-mdpi/icon.png similarity index 100% rename from brouter-routing-app/res/drawable-mdpi/icon.png rename to brouter-routing-app/src/main/res/drawable-mdpi/icon.png diff --git a/brouter-routing-app/res/layout/main.xml b/brouter-routing-app/src/main/res/layout/main.xml similarity index 100% rename from brouter-routing-app/res/layout/main.xml rename to brouter-routing-app/src/main/res/layout/main.xml diff --git a/brouter-routing-app/res/values/strings.xml b/brouter-routing-app/src/main/res/values/strings.xml similarity index 100% rename from brouter-routing-app/res/values/strings.xml rename to brouter-routing-app/src/main/res/values/strings.xml diff --git a/brouter-server/.gitignore b/brouter-server/.gitignore new file mode 100644 index 0000000..84c048a --- /dev/null +++ b/brouter-server/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/brouter-server/build.gradle b/brouter-server/build.gradle new file mode 100644 index 0000000..6c4d867 --- /dev/null +++ b/brouter-server/build.gradle @@ -0,0 +1,20 @@ +plugins { + id 'application' +} + +application { + mainClassName = 'btools.server.BRouter' + + jar { + manifest { + attributes "Main-Class": "$mainClassName" + } + } +} + +dependencies { + implementation('junit:junit:4.13') + implementation project(':brouter-util') + implementation project(':brouter-core') + implementation project(':brouter-mapaccess') +} diff --git a/brouter-server/pom.xml b/brouter-server/pom.xml deleted file mode 100644 index d5f3a06..0000000 --- a/brouter-server/pom.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - 4.0.0 - - org.btools - brouter - 1.6.1 - ../pom.xml - - brouter-server - jar - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - jar-with-dependencies - - - - true - btools.server.BRouter - - - - - - make-assembly - package - - single - - - - - - - - - - org.btools - brouter-core - ${project.version} - - - org.btools - brouter-map-creator - ${project.version} - - - junit - junit - test - - - diff --git a/brouter-util/.gitignore b/brouter-util/.gitignore new file mode 100644 index 0000000..84c048a --- /dev/null +++ b/brouter-util/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/brouter-util/build.gradle b/brouter-util/build.gradle new file mode 100644 index 0000000..4b22331 --- /dev/null +++ b/brouter-util/build.gradle @@ -0,0 +1,7 @@ +plugins { + id 'java-library' +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) +} diff --git a/brouter-util/src/main/AndroidManifest.xml b/brouter-util/src/main/AndroidManifest.xml new file mode 100644 index 0000000..d28b2cc --- /dev/null +++ b/brouter-util/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..a88f623 --- /dev/null +++ b/build.gradle @@ -0,0 +1,29 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + + repositories { + google() + jcenter() + + } + dependencies { + classpath 'com.android.tools.build:gradle:3.6.3' + + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + google() + jcenter() + + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..199d16e --- /dev/null +++ b/gradle.properties @@ -0,0 +1,20 @@ +# Project-wide Gradle settings. +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx1536m +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Automatically convert third-party libraries to use AndroidX +android.enableJetifier=true + diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..f6b961f Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..782faa3 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Sat May 23 17:32:11 CEST 2020 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..cccdd3d --- /dev/null +++ b/gradlew @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..e95643d --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,84 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/pom.xml b/pom.xml deleted file mode 100644 index d805140..0000000 --- a/pom.xml +++ /dev/null @@ -1,166 +0,0 @@ - - - 4.0.0 - org.btools - brouter - 1.6.1 - pom - http://brouter.de/brouter/ - brouter - configurable OSM offline router with elevation awareness, Java + Android - - - brouter-util - brouter-codec - brouter-expressions - brouter-mapaccess - brouter-core - brouter-map-creator - brouter-server - brouter-routing-app - - - - - arndt.brenschede - Arndt Brenschede - Arndt.Brenschede@web.de - - - norbert.truchsess - Norbert Truchsess - norbert.truchsess@t-online.de - - - - - UTF-8 - UTF-8 - 1.6 - - - - - - - com.jayway.maven.plugins.android.generation2 - android-maven-plugin - 3.6.0 - true - - gen - gen - true - - 28 - - - - -Xmn16m - -Xms256m - -Xmx512m - - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 2.4 - - - jar-with-dependencies - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - ${targetJdk} - ${targetJdk} - -Xlint:unchecked - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.9 - - false - brensche.de/brouter]]> - true - protected - false - - - - - org.apache.maven.plugins - maven-resources-plugin - 2.6 - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - attach-javadoc - package - - jar - - - - - - - org.apache.maven.plugins - maven-source-plugin - - - attach-sources - package - - jar-no-fork - - - - - - - - - - - junit - junit - 4.12 - test - - - - - - - github - GitHub brouter Apache Maven Packages - https://maven.pkg.github.com/${env.GITHUB_REPOSITORY} - - - diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..604b15f --- /dev/null +++ b/settings.gradle @@ -0,0 +1,2 @@ +rootProject.name='brouter' +include ':brouter-routing-app', ':brouter-mapaccess', ':brouter-core', ':brouter-util', ':brouter-expressions', ':brouter-codec', ':brouter-map-creator', ':brouter-server' \ No newline at end of file