diff --git a/OsmAnd-java/src/net/osmand/render/RenderingRuleProperty.java b/OsmAnd-java/src/net/osmand/render/RenderingRuleProperty.java
index 275e55eed9..09af86b0f1 100644
--- a/OsmAnd-java/src/net/osmand/render/RenderingRuleProperty.java
+++ b/OsmAnd-java/src/net/osmand/render/RenderingRuleProperty.java
@@ -166,7 +166,7 @@ public class RenderingRuleProperty {
try {
return parseColor(value);
} catch (RuntimeException e) {
- log.error("Rendering parse " + e.getMessage());
+ log.error("Rendering parse " + e.getMessage() + " in " + attrName);
}
return -1;
} else if(type == FLOAT_TYPE){
@@ -178,7 +178,7 @@ public class RenderingRuleProperty {
}
return 0;
} catch (NumberFormatException e) {
- log.error("Rendering parse " + value);
+ log.error("Rendering parse " + value + " in " + attrName);
}
return -1;
} else {
@@ -198,7 +198,7 @@ public class RenderingRuleProperty {
}
return Float.parseFloat(value);
} catch (NumberFormatException e) {
- log.error("Rendering parse " + value);
+ log.error("Rendering parse " + value + " in " + attrName);
}
return -1;
} else {
diff --git a/OsmAnd/.gitignore b/OsmAnd/.gitignore
index 30635a48b2..557fe3b444 100644
--- a/OsmAnd/.gitignore
+++ b/OsmAnd/.gitignore
@@ -31,3 +31,8 @@ assets/OsmAndCore_ResourcesBundle/
# Output
/build
+
+# Project-specific
+/helpAssets
+/voiceAssets
+/resourcesSrc
diff --git a/OsmAnd/assets/bundled_assets.xml b/OsmAnd/assets/bundled_assets.xml
old mode 100755
new mode 100644
diff --git a/OsmAnd/assets/help/style.css b/OsmAnd/assets/help/style.css
index 6b930f6502..3fad902219 100644
--- a/OsmAnd/assets/help/style.css
+++ b/OsmAnd/assets/help/style.css
@@ -5,4 +5,3 @@
li { text-align:justify;"}
img { max-width: 75%; width: auto; height: auto; }
p.img {text-align: center}
-
diff --git a/OsmAnd/assets/style.css b/OsmAnd/assets/style.css
index 6b930f6502..3fad902219 100644
--- a/OsmAnd/assets/style.css
+++ b/OsmAnd/assets/style.css
@@ -5,4 +5,3 @@
li { text-align:justify;"}
img { max-width: 75%; width: auto; height: auto; }
p.img {text-align: center}
-
diff --git a/OsmAnd/build.gradle b/OsmAnd/build.gradle
index 215ecf6859..af93522f65 100644
--- a/OsmAnd/build.gradle
+++ b/OsmAnd/build.gradle
@@ -1,16 +1,50 @@
apply plugin: 'com.android.application'
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
+ signingConfigs {
+ development {
+ storeFile file("../keystores/debug.keystore")
+ storePassword "android"
+ keyAlias "androiddebugkey"
+ keyPassword "android"
+ }
+
+ publishing {
+ storeFile file("osmand_key")
+ storePassword System.getenv("PWD")
+ keyAlias "androiddebugkey"
+ keyPassword System.getenv("PWD")
+ }
+ }
+
defaultConfig {
- minSdkVersion 7
+ minSdkVersion 9
targetSdkVersion 21
+
+ versionCode System.getenv("APK_NUMBER_VERSION") ?: versionCode
+ versionName System.getenv("APK_VERSION") ?: versionName
}
lintOptions {
+ lintConfig file("lint.xml")
abortOnError false
+ warningsAsErrors false
}
// This is from OsmAndCore_android.aar - for some reason it's not inherited
@@ -25,64 +59,196 @@ android {
sourceSets {
main {
- manifest {
- srcFile "AndroidManifest.xml"
- }
- jni {
- srcDirs = []
- }
- jniLibs {
- srcDirs = ["libs"]
- }
- aidl {
- srcDirs = ["src"]
- }
- java {
- srcDirs = [
+ manifest.srcFile "AndroidManifest.xml"
+ jni.srcDirs = []
+ jniLibs.srcDirs = ["libs"]
+ aidl.srcDirs = ["src"]
+ java.srcDirs = [
"src",
- fileTree(dir: "../OsmAnd-java/src", exclude: "**/PlatformUtil.java")]
- }
- resources {
- srcDirs = ["src", "../OsmAnd-java/src"]
- }
- renderscript {
- srcDirs = ["src"]
- }
- res {
- srcDirs = ["res"]
- }
- assets {
- srcDirs = ["assets"]
- }
+ fileTree(dir: "../OsmAnd-java/src", exclude: "**/PlatformUtil.java"),
+ "resourcesSrc"
+ ]
+ resources.srcDirs = [
+ "src",
+ "../OsmAnd-java/src",
+ "resourcesSrc"
+ ]
+ renderscript.srcDirs = ["src"]
+ res.srcDirs = [
+ "res",
+ "../../resources/rendering_styles/style-icons/"
+ ]
+ assets.srcDirs = [
+ "assets",
+ "voiceAssets",
+ "helpAssets"
+ ]
}
}
+ flavorDimensions "version", "distribution", "abi"
productFlavors {
+ // ABI
x86 {
+ flavorDimension "abi"
ndk {
abiFilter "x86"
}
}
mips {
+ flavorDimension "abi"
ndk {
abiFilter "mips"
}
}
armv7 {
+ flavorDimension "abi"
ndk {
abiFilter "armeabi-v7a"
}
}
armv5 {
+ flavorDimension "abi"
ndk {
abiFilter "armeabi"
}
}
- fat
+ fat {
+ flavorDimension "abi"
+ }
+
+ // Version
+ free {
+ flavorDimension "version"
+ applicationId "net.osmand"
+ }
+ paid {
+ flavorDimension "version"
+ applicationId "net.osmand.plus"
+ }
+ /*
+ sherpafy {
+ flavorDimension "version"
+ applicationId "net.osmand.sherpafy"
+ }
+ */
+
+ // Distribution
+ googleplay {
+ flavorDimension "distribution"
+ }
+ /*
+ amazon {
+ flavorDimension "distribution"
+ }
+ */
+ }
+
+ buildTypes {
+ debug {
+ signingConfig signingConfigs.development
+ }
+ nativeDebug {
+ signingConfig signingConfigs.development
+ }
+ release {
+ signingConfig signingConfigs.publishing
+ }
+ }
+}
+
+task collectVoiceAssets(type: Sync) {
+ from "../../resources"
+ into "voiceAssets"
+ include "specialphrases/**"
+ include "voice/**/*.p"
+}
+
+task collectRoutingResources(type: Sync) {
+ from "../../resources/routing"
+ into "resourcesSrc/net/osmand/router"
+ include "*.xml"
+}
+
+task collectRenderingStyles(type: Sync) {
+ from "../../resources/rendering_styles"
+ into "resourcesSrc/net/osmand/render"
+ include "*.xml"
+}
+
+task collectRegionsInfo(type: Copy) {
+ from "../../resources/countries-info"
+ into "resourcesSrc/net/osmand/map"
+ include "regions.ocbf"
+}
+
+task collectHelpContents(type: Sync) {
+ from "../../help"
+ into "helpAssets/help"
+ include "*.html"
+ include "images/**/*.png"
+}
+
+task collectMiscResources(type: Copy) {
+ from("../../../resources/obf_creation") {
+ include "rendering_types.xml"
+ }
+ from("../../../resources/poi") {
+ include "poi_types.xml"
+ }
+
+ into "resourcesSrc/net/osmand/osm"
+}
+
+task collectExternalResources << {}
+collectExternalResources.dependsOn collectVoiceAssets,
+ collectRoutingResources,
+ collectRenderingStyles,
+ collectRegionsInfo,
+ collectHelpContents,
+ collectMiscResources
+tasks.withType(JavaCompile) {
+ compileTask -> compileTask.dependsOn << collectExternalResources
+}
+
+// Legacy core build
+import org.apache.tools.ant.taskdefs.condition.Os
+task buildOsmAndCore(type: Exec) {
+ description "Build Legacy OsmAndCore"
+
+ if (!Os.isFamily(Os.FAMILY_WINDOWS)) {
+ commandLine "bash", file("./old-ndk-build.sh").getAbsolutePath()
+ } else {
+ commandLine "cmd", "/c", "echo", "Not supported"
+ }
+}
+task cleanupDuplicatesInCore(type: Delete) {
+ dependsOn buildOsmAndCore
+
+ delete "libs/armeabi/libgnustl_shared.so"
+ delete "libs/armeabi-v7a/libgnustl_shared.so"
+ delete "libs/mips/libgnustl_shared.so"
+ delete "libs/x86/libgnustl_shared.so"
+}
+tasks.withType(JavaCompile) {
+ compileTask -> compileTask.dependsOn << [buildOsmAndCore, cleanupDuplicatesInCore]
+}
+
+repositories {
+ ivy {
+ name = "OsmAndBinariesIvy"
+ url = "http://builder.osmand.net:81"
+ layout "pattern" , {
+ artifact "ivy/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
+ }
}
}
dependencies {
+ compile fileTree(dir: "libs", include: ["*.jar"], exclude: ["QtAndroid-bundled.jar", "QtAndroidAccessibility-bundled.jar"])
compile "com.actionbarsherlock:actionbarsherlock:4.4.0@aar"
- compile fileTree(dir: "libs", include: ["*.jar"])
+ compile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar"
+ debugCompile "net.osmand:OsmAndCore_androidNativeRelease:0.1-SNAPSHOT@aar"
+ nativeDebugCompile "net.osmand:OsmAndCore_androidNativeDebug:0.1-SNAPSHOT@aar"
+ releaseCompile "net.osmand:OsmAndCore_androidNativeRelease:0.1-SNAPSHOT@aar"
}
diff --git a/OsmAnd/build.xml b/OsmAnd/build.xml
index ab01735b5e..6463fca2f9 100644
--- a/OsmAnd/build.xml
+++ b/OsmAnd/build.xml
@@ -18,13 +18,15 @@
-
+ dest="libs/OsmAndCore_wrapper.jar" usetimestamp="true"/>
+
+
-
+
diff --git a/OsmAnd/libs/QtAndroid-bundled.jar b/OsmAnd/libs/QtAndroid-bundled.jar
index 8b46053ead..c776448cee 100644
Binary files a/OsmAnd/libs/QtAndroid-bundled.jar and b/OsmAnd/libs/QtAndroid-bundled.jar differ
diff --git a/OsmAnd/libs/QtAndroidAccessibility-bundled.jar b/OsmAnd/libs/QtAndroidAccessibility-bundled.jar
index 5ab3135dd5..e563bd2ad5 100644
Binary files a/OsmAnd/libs/QtAndroidAccessibility-bundled.jar and b/OsmAnd/libs/QtAndroidAccessibility-bundled.jar differ
diff --git a/OsmAnd/res/drawable-hdpi/map_layers_black.png b/OsmAnd/res/drawable-hdpi/map_layers_black.png
old mode 100755
new mode 100644
diff --git a/OsmAnd/res/drawable-hdpi/warnings_pedestrian.png b/OsmAnd/res/drawable-hdpi/warnings_pedestrian.png
new file mode 100644
index 0000000000..6e5ab33167
Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/warnings_pedestrian.png differ
diff --git a/OsmAnd/res/drawable-hdpi/warnings_railways.png b/OsmAnd/res/drawable-hdpi/warnings_railways.png
new file mode 100644
index 0000000000..6e5ab33167
Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/warnings_railways.png differ
diff --git a/OsmAnd/res/drawable-large/map_layers_black.png b/OsmAnd/res/drawable-large/map_layers_black.png
old mode 100755
new mode 100644
diff --git a/OsmAnd/res/drawable-large/warnings_pedestrian.png b/OsmAnd/res/drawable-large/warnings_pedestrian.png
new file mode 100644
index 0000000000..6e5ab33167
Binary files /dev/null and b/OsmAnd/res/drawable-large/warnings_pedestrian.png differ
diff --git a/OsmAnd/res/drawable-large/warnings_railways.png b/OsmAnd/res/drawable-large/warnings_railways.png
new file mode 100644
index 0000000000..6e5ab33167
Binary files /dev/null and b/OsmAnd/res/drawable-large/warnings_railways.png differ
diff --git a/OsmAnd/res/drawable-large/widget_layer.png b/OsmAnd/res/drawable-large/widget_layer.png
old mode 100755
new mode 100644
diff --git a/OsmAnd/res/drawable-xhdpi/map_layers_black.png b/OsmAnd/res/drawable-xhdpi/map_layers_black.png
old mode 100755
new mode 100644
diff --git a/OsmAnd/res/layout-land/dash_search_fragment.xml b/OsmAnd/res/layout-land/dash_search_fragment.xml
index 27a14f2e74..eaa2a6fc42 100644
--- a/OsmAnd/res/layout-land/dash_search_fragment.xml
+++ b/OsmAnd/res/layout-land/dash_search_fragment.xml
@@ -3,7 +3,6 @@
android:id="@+id/search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginBottom="4dp"
android:background="@drawable/bg_cardui"
android:orientation="vertical" >
diff --git a/OsmAnd/res/layout-large-land/dashboard.xml b/OsmAnd/res/layout-large-land/dashboard.xml
index 569f52b4c6..1e48cbdff9 100644
--- a/OsmAnd/res/layout-large-land/dashboard.xml
+++ b/OsmAnd/res/layout-large-land/dashboard.xml
@@ -8,7 +8,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- android:padding="6dp" >
+ android:padding="@dimen/dashPadding" >
-
-
-
@@ -63,15 +58,24 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
+
+
@@ -84,7 +88,7 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone"
- android:padding="6dp"
+ android:padding="@dimen/dashPadding"
android:baselineAligned="false">
+ android:textSize="@dimen/dashAboutTextSize" />
diff --git a/OsmAnd/res/layout-large/dashboard.xml b/OsmAnd/res/layout-large/dashboard.xml
deleted file mode 100644
index 93d694967e..0000000000
--- a/OsmAnd/res/layout-large/dashboard.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/OsmAnd/res/layout/dash_audio_video_notes_plugin.xml b/OsmAnd/res/layout/dash_audio_video_notes_plugin.xml
index dd9f77aa07..926b742694 100644
--- a/OsmAnd/res/layout/dash_audio_video_notes_plugin.xml
+++ b/OsmAnd/res/layout/dash_audio_video_notes_plugin.xml
@@ -3,13 +3,12 @@
+ android:layout_height="@dimen/dashHeaderHeight">
diff --git a/OsmAnd/res/layout/dash_download_maps_fragment.xml b/OsmAnd/res/layout/dash_download_maps_fragment.xml
index ffd74770ee..d20219834d 100644
--- a/OsmAnd/res/layout/dash_download_maps_fragment.xml
+++ b/OsmAnd/res/layout/dash_download_maps_fragment.xml
@@ -7,7 +7,7 @@
android:layout_height="wrap_content">
+ android:layout_height="@dimen/dashHeaderHeight">