diff options
-rw-r--r-- | .circleci/config.yml | 103 | ||||
-rwxr-xr-x | CMakeLists.txt | 39 | ||||
-rw-r--r-- | build.gradle | 23 | ||||
-rwxr-xr-x | cmake/version.cmake | 2 | ||||
-rw-r--r-- | gradle/wrapper/gradle-wrapper.jar | bin | 0 -> 53636 bytes | |||
-rw-r--r-- | gradle/wrapper/gradle-wrapper.properties | 6 | ||||
-rw-r--r-- | gradlew | 160 | ||||
-rw-r--r-- | gradlew.bat | 90 | ||||
-rw-r--r-- | navit/android/AndroidManifest.xml | 45 | ||||
-rw-r--r-- | navit/android/CMakeLists.txt | 4 | ||||
-rw-r--r-- | navit/android/build.gradle | 53 | ||||
-rw-r--r-- | navit/android/libs/android-support-v4.jar | bin | 1364299 -> 0 bytes | |||
-rw-r--r-- | settings.gradle | 1 |
13 files changed, 473 insertions, 53 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index 827dd6f52..991ebefdc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,6 +9,9 @@ jobs: steps: - checkout - run: + name: Id + command: sudo cat /etc/*release + - run: name: Setup requirements command: | bash ci/setup_common_requirements.sh @@ -37,45 +40,80 @@ jobs: command: bash ci/update_doxygen.sh - store_artifacts: path: /root/project/doc - build_android_arm: + build_android: + working_directory: ~/code docker: - - image: navit/android + - image: circleci/android:api-27-alpha + environment: + JVM_OPTS: -Xmx3200m + GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"' steps: - checkout - run: - name: Build for Android ARM - command: | - bash ci/build_android.sh + name: Id + command: sudo cat /etc/*release - run: - name: configure ssh git - command: mkdir -p ~/.ssh/ && ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts - - add_ssh_keys: - fingerprints: - - "16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48" - - run: - name: Update beta channel on PlayStore - command: bash ci/publish.sh - - store_artifacts: - path: android-arm/navit/android/bin + name: Install cmake gettext libsaxonb-java librsvg2-bin + command: | + sudo apt-get install cmake gettext libsaxonb-java librsvg2-bin + cmake ./ -Dsvg2png_scaling:STRING=-1,24,32,48,64,96,128 -Dsvg2png_scaling_nav:STRING=-1,24,32,48,64,96,128 -Dsvg2png_scaling_flag:STRING=-1,24,32,64,96 - run: - name: Update Navit-Download-Center + name: Process icons command: | - bash ci/update_download_center.sh - build_android_x86: - docker: - - image: navit/android - steps: - - checkout + cd navit/icons + make + sudo ls -la + mkdir ../android/res/drawable-nodpi + rename 'y/A-Z/a-z/' * + cp *.png ../android/res/drawable-nodpi + cd ../../ - run: - name: Build for Android X86 + name: Process translations command: | - bash ci/build_android_x86.sh - - store_artifacts: - path: android-x86/navit/android/bin + cd po + make + sudo ls -la + mkdir ../navit/android/res/raw + rename 'y/A-Z/a-z/' * + cp *.mo ../navit/android/res/raw + cd ../ - run: - name: Update Navit-Download-Center + name: Move xml's command: | - bash ci/update_download_center.sh + cd navit + saxonb-xslt -s:navit_shipped.xml -xsl:xslt/android.xslt -o:navitldpi.xml OSD_SIZE=1 ICON_SMALL=24 ICON_MEDIUM=32 ICON_BIG=48 + saxonb-xslt -s:navit_shipped.xml -xsl:xslt/android.xslt -o:navitmdpi.xml OSD_SIZE=1.33 ICON_SMALL=32 ICON_MEDIUM=48 ICON_BIG=64 + saxonb-xslt -s:navit_shipped.xml -xsl:xslt/android.xslt -o:navithdpi.xml OSD_SIZE=2 ICON_SMALL=48 ICON_MEDIUM=64 ICON_BIG=96 + saxonb-xslt -s:navit_shipped.xml -xsl:xslt/android.xslt -o:navitxhdpi.xml OSD_SIZE=2.67 ICON_SMALL=64 ICON_MEDIUM=96 ICON_BIG=128 + saxonb-xslt -s:navit_shipped.xml -xsl:xslt/android.xslt -o:navitxxhdpi.xml OSD_SIZE=4 ICON_SMALL=96 ICON_MEDIUM=128 ICON_BIG=192 + saxonb-xslt -s:navit_shipped.xml -xsl:xslt/android.xslt -o:navitxxxhdpi.xml OSD_SIZE=5.33 ICON_SMALL=128 ICON_MEDIUM=192 ICON_BIG=256 + sudo ls -la + mv *dpi.xml android/res/raw + cd ../ + - run: + name: Chmod permissions + command: sudo chmod +x ./gradlew + - run: + name: Download Dependencies + command: ./gradlew -v +# command: ./gradlew androidDependencies + - run: + name: Install ndk + command: sdkmanager ndk-bundle + - run: + name: Build + command: ./gradlew assembleDebug + - run: + name: Run Tests + command: ./gradlew tasks --all + - store_artifacts: + path: navit/android/build/outputs/apk + destination: apk + - store_artifacts: + path: navit/android/build/outputs/logs + destination: logs + - store_test_results: + path: navit/android/build/test-results build_win32: <<: *defaults steps: @@ -170,8 +208,7 @@ workflows: build_all: jobs: - build_linux - - build_android_arm - - build_android_x86 + - build_android - build_win32 - build_wince - build_tomtom_minimal @@ -179,8 +216,7 @@ workflows: - run_doxygen: requires: - build_linux - - build_android_arm - - build_android_x86 + - build_android - build_win32 - build_wince - build_tomtom_minimal @@ -191,8 +227,7 @@ workflows: - merge_trunk_in_master: requires: - build_linux - - build_android_arm - - build_android_x86 + - build_android - build_win32 - build_wince - build_tomtom_minimal diff --git a/CMakeLists.txt b/CMakeLists.txt index f4ce4cc97..03a2fd004 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -682,27 +682,34 @@ if (HAS_IFADDRS) endif(HAS_IFADDRS) if(ANDROID) - find_program(ANDROID_LOCATION NAMES android android.bat) - find_program(ANT_LOCATION NAMES ant) - if (NOT ANT_LOCATION) - message_error("Could not find ant. Please install ant and add it to the search path.") - else() - execute_process(COMMAND ${ANT_LOCATION} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cmake RESULT_VARIABLE ANT_VERSION_OK OUTPUT_QUIET ERROR_QUIET) - if(ANT_VERSION_OK GREATER 0) - message(WARNING "Old ant version detected. If you need crash reporter, update to at least ant 1.8") + message(STATUS "Using generator "${CMAKE_GENERATOR}) + if (NOT ${CMAKE_GENERATOR} STREQUAL Ninja) + find_program(ANDROID_LOCATION NAMES android android.bat) + find_program(ANT_LOCATION NAMES ant) + if (NOT ANT_LOCATION) + message_error("Could not find ant. Please install ant and add it to the search path.") + else() + execute_process(COMMAND ${ANT_LOCATION} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cmake RESULT_VARIABLE ANT_VERSION_OK OUTPUT_QUIET ERROR_QUIET) + if(ANT_VERSION_OK GREATER 0) + message(WARNING "Old ant version detected. If you need crash reporter, update to at least ant 1.8") + endif() endif() - endif() - if (NOT ANDROID_LOCATION) - message_error( "Could not find 'Android SDK and AVD Manager'. Please install the android sdk and add the <android-sdk>/tools directory to the search path.") - endif() - set(XSLTS "android;${XSLTS}" CACHE STRING "define a semicolon seperated list of XSLTs to process") + if (NOT ANDROID_LOCATION) + message_error( "Could not find 'Android SDK and AVD Manager'. Please install the android sdk and add the <android-sdk>/tools directory to the search path.") + endif() + set(XSLTS "android;${XSLTS}" CACHE STRING "define a semicolon seperated list of XSLTs to process") + endif (NOT ${CMAKE_GENERATOR} STREQUAL Ninja) list(APPEND NAVIT_LIBS log) set(HAVE_API_ANDROID 1) set_with_reason(speech/cmdline "Android detected" FALSE) set_with_reason(graphics/null "Android detected" FALSE) - set_with_reason(graphics/android "Android detected, NDK:${ANDROID_NDK_API_VERSION}, API:${ANDROID_API_VERSION}" TRUE) - set_with_reason(speech/android "Android detected, NDK:${ANDROID_NDK_API_VERSION}, API:${ANDROID_API_VERSION}" TRUE) - set_with_reason(vehicle/android "Android detected, NDK:${ANDROID_NDK_API_VERSION}, API:${ANDROID_API_VERSION}" TRUE) + set_with_reason(graphics/android "Android detected" TRUE) + set_with_reason(speech/android "Android detected" TRUE) + set_with_reason(vehicle/android "Android detected" TRUE) + set_with_reason(vehicle/file "Android detected" FALSE) + set_with_reason(map/filter "Android detected" FALSE) + set_with_reason(USE_NATIVE_LANGUAGE_SUPPORT "Android detected" TRUE) +# set_with_reason(plugin/pedestrian "Android detected" TRUE) set(SHARED_LIBNAVIT TRUE) add_feature(XPM2PNG "Android detected" TRUE) diff --git a/build.gradle b/build.gradle new file mode 100644 index 000000000..1ea4bd055 --- /dev/null +++ b/build.gradle @@ -0,0 +1,23 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.0' + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + jcenter() + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/cmake/version.cmake b/cmake/version.cmake index e87806c54..0dd520a45 100755 --- a/cmake/version.cmake +++ b/cmake/version.cmake @@ -47,7 +47,7 @@ EXECUTE_PROCESS( ERROR_STRIP_TRAILING_WHITESPACE ) if(NOT DATE_CONVERT_ERROR) - string(REGEX MATCH "[0-9]+" VERSION_CODE ${DATE_CONVERT_OUTPUT}) + string(REGEX MATCH "[0-9]+" VERSION_CODE "${DATE_CONVERT_OUTPUT}") else(NOT DATE_CONVERT_ERROR) message(FATAL_ERROR "Date convert not working\nError message:\n${DATE_CONVERT_ERROR}") endif(NOT DATE_CONVERT_ERROR) diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar Binary files differnew file mode 100644 index 000000000..13372aef5 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..cb189a155 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Fri Mar 03 10:50:57 CET 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
diff --git a/gradlew b/gradlew new file mode 100644 index 000000000..9d82f7891 --- /dev/null +++ b/gradlew @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# 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 +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# 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 + +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" ] ; 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 + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 000000000..aec99730b --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,90 @@ +@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
+
+@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=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@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 Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_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=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+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/navit/android/AndroidManifest.xml b/navit/android/AndroidManifest.xml new file mode 100644 index 000000000..5080ec52b --- /dev/null +++ b/navit/android/AndroidManifest.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="org.navitproject.navit" + android:installLocation="auto"> + <uses-feature android:name="android.hardware.location.network" android:required="false"/> + <uses-feature android:name="android.hardware.touchscreen" android:required="false"/> + <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:resizeable="true" android:anyDensity="true"/> + <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> + <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> + <uses-permission android:name="android.permission.WAKE_LOCK" /> + <uses-permission android:name="android.permission.INTERNET" /> + <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> + <application android:label="@string/app_name" + android:icon="@drawable/icon" + android:name=".NavitAppConfig" + android:theme="@style/NavitBaseTheme"> + <activity android:name="Navit" + android:label="@string/app_name" + android:configChanges="locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|fontScale|screenSize" + android:theme="@style/NavitTheme"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + <intent-filter> + <action android:name="android.intent.action.VIEW" /> + <category android:name="android.intent.category.DEFAULT" /> + <data android:scheme="google.navigation" /> + </intent-filter> + </activity> + <activity android:name=".NavitAddressSearchActivity" + android:configChanges="orientation|screenSize|keyboardHidden"> + </activity> + <activity android:name=".NavitDownloadSelectMapActivity"></activity> + <!-- <activity android:name=".NavitAddressResultListActivity"></activity> --> + <activity + android:name="FileBrowserActivity" + android:label="File browser" + android:configChanges="orientation|keyboardHidden"> + <intent-filter> + <action android:name="ua.com.vassiliev.androidfilebrowser.SELECT_DIRECTORY_ACTION"></action> + </intent-filter> + </activity> + </application> +</manifest> diff --git a/navit/android/CMakeLists.txt b/navit/android/CMakeLists.txt index 6a9b9c92f..e91c94d7b 100644 --- a/navit/android/CMakeLists.txt +++ b/navit/android/CMakeLists.txt @@ -1,4 +1,4 @@ -if (ANDROID) +if (ANDROID AND NOT ${CMAKE_GENERATOR} STREQUAL Ninja) FILE(GLOB SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*/*/*/*") @@ -83,4 +83,4 @@ if (ANDROID) add_dependencies(apkg android_resources) add_dependencies(apkg-release android_resources) -endif(ANDROID) +endif(ANDROID AND NOT ${CMAKE_GENERATOR} STREQUAL Ninja) diff --git a/navit/android/build.gradle b/navit/android/build.gradle new file mode 100644 index 000000000..60b6516e9 --- /dev/null +++ b/navit/android/build.gradle @@ -0,0 +1,53 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 27 + buildToolsVersion "27.0.3" + defaultConfig { + applicationId "org.navitproject.navit" + minSdkVersion 9 + targetSdkVersion 27 + versionCode 1 + versionName "1.0" + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + ndk { // because mips was a problem with ndk 14 + // and no need for, 'x86_64' and , 'armeabi' and , 'arm64-v8a' + abiFilters 'x86', 'armeabi-v7a' + } + externalNativeBuild { + cmake { + arguments '-DUSE_PLUGINS=n', '-DBUILD_MAPTOOL=n', '-DXSL_PROCESSING=n', '-DSAMPLE_MAP=n' + } + } + // https://github.com/googlesamples/android-ndk/blob/master/native-media/app/build.gradle + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } + sourceSets { + main { + manifest.srcFile "AndroidManifest.xml" + java.srcDirs = ["src"] + resources.srcDirs = ["src"] + renderscript.srcDirs = ["src"] + res.srcDirs = ["res"] + } + } + externalNativeBuild { + cmake { + path '../../CMakeLists.txt' + } + } +} + +dependencies { + compile fileTree(include: ['*.jar'], dir: 'libs') + androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { + exclude group: 'com.android.support', module: 'support-annotations' + }) + testCompile 'junit:junit:4.12' + compile 'ch.acra:acra:4.9.2' +} diff --git a/navit/android/libs/android-support-v4.jar b/navit/android/libs/android-support-v4.jar Binary files differdeleted file mode 100644 index aa0b1a5cc..000000000 --- a/navit/android/libs/android-support-v4.jar +++ /dev/null diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 000000000..5cac9edd2 --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +include 'navit:android' |