diff --git a/OsmAnd/build.gradle b/OsmAnd/build.gradle index fcf5a8548e..ee12f17dec 100644 --- a/OsmAnd/build.gradle +++ b/OsmAnd/build.gradle @@ -39,8 +39,7 @@ android { defaultConfig { minSdkVersion System.getenv("MIN_SDK_VERSION") ? System.getenv("MIN_SDK_VERSION").toInteger() : 14 - targetSdkVersion 21 - + targetSdkVersion 23 versionCode System.getenv("APK_NUMBER_VERSION") ? System.getenv("APK_NUMBER_VERSION").toInteger() : versionCode //versionName already assigned in code //versionName System.getenv("APK_VERSION")? System.getenv("APK_VERSION").toString(): versionName @@ -184,6 +183,24 @@ task updateNoTranslate(type: Copy) { into 'res/values/' } +task validateTranslate { + println "Validating translations" + + new java.io.File("res").eachFileRecurse groovy.io.FileType.FILES, { + if(it.name == "strings.xml" || it.name == "phrases.xml") { + it.eachLine { line -> + if( line.contains("\$ s") || line.contains("\$ d") || line.contains("\$ f") || + line.contains(" \$s") || line.contains(" \$d") || line.contains(" \$f") || + line.contains("1\$ ") || line.contains("2\$ ") || line.contains("3\$ ") || + (line.contains("% \$") || line.contains("% 1") || + line.contains("% 2") || line.contains("% 3") )) { + throw new GradleException("Incorrect translation " + it.getAbsolutePath() + " " + line); + } + } + } + } +} + task collectVoiceAssets(type: Sync) { from "../../resources/voice" into "assets/voice" @@ -265,7 +282,8 @@ collectExternalResources.dependsOn collectVoiceAssets, collectRegionsInfoResources, collectMiscResources, copyStyleIcons, - updateNoTranslate + updateNoTranslate, + validateTranslate // tasks.whenTaskAdded { task -> // if (task.name.startsWith("generate") && task.name.endsWith("Resources")) { // task.dependsOn collectExternalResources @@ -321,10 +339,10 @@ repositories { } dependencies { - compile project(path: ":OsmAnd-java", configuration: "android") - compile project(":eclipse-compile:design") - compile project(":eclipse-compile:cardview") -// compile project(":eclipse-compile:recyclerview") + compile project(path: ':OsmAnd-java', configuration: 'android') + compile project(':eclipse-compile:design') + compile project(':eclipse-compile:cardview') + // compile project(":eclipse-compile:recyclerview") compile fileTree( dir: "libs", include: ["*.jar"], @@ -342,5 +360,5 @@ dependencies { qtcoredebugCompile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar" qtcoreCompile "net.osmand:OsmAndCore_androidNativeRelease:0.1-SNAPSHOT@aar" qtcoreCompile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar" - + compile files('libs/android-support-multidex.jar') } diff --git a/OsmAnd/libs/android-support-multidex.jar b/OsmAnd/libs/android-support-multidex.jar new file mode 100644 index 0000000000..67b0aa74e9 Binary files /dev/null and b/OsmAnd/libs/android-support-multidex.jar differ diff --git a/OsmAnd/no_translate.xml b/OsmAnd/no_translate.xml index f3881b496b..beaaa856b3 100644 --- a/OsmAnd/no_translate.xml +++ b/OsmAnd/no_translate.xml @@ -1,7 +1,7 @@ OsmAnd~ - 2.2.0 + 2.3.0