From b7e3eb2056718f8b06f8e049edd0b8828082399d Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Wed, 21 Jan 2015 02:58:28 +0100 Subject: [PATCH] Update gradle --- OsmAnd/AndroidManifest-free.xml | 11 +++++ OsmAnd/build.gradle | 80 ++++++++++++--------------------- 2 files changed, 40 insertions(+), 51 deletions(-) create mode 100644 OsmAnd/AndroidManifest-free.xml diff --git a/OsmAnd/AndroidManifest-free.xml b/OsmAnd/AndroidManifest-free.xml new file mode 100644 index 0000000000..78feabaa29 --- /dev/null +++ b/OsmAnd/AndroidManifest-free.xml @@ -0,0 +1,11 @@ + + + + + + + \ No newline at end of file diff --git a/OsmAnd/build.gradle b/OsmAnd/build.gradle index de807baea9..b322ab28a5 100644 --- a/OsmAnd/build.gradle +++ b/OsmAnd/build.gradle @@ -1,45 +1,28 @@ apply plugin: 'com.android.application' -// 1. fix_apostrophe_issues -// -// -// -// -// -// -// -// -// -// -// -// +// +1. AndroidManifest.xml (+versionCode/APK_NUMBER_VERSION, +package, +android:process, +icon) - -// 2. AndroidManifest.xml (versionCode, package, android:process) -// - -// 3. sherpafy -// -// -// icon - -// 4. Filter fonts -// -// -// -// -// -// - -// 5. no_translate.xml (versionFeatures, app.edition, build.version ) +// 2. no_translate.xml (versionFeatures, app.edition, build.version ) // // // // // +// 3. Filter fonts +// +// +// +// +// +// +// 4. fix_apostrophe_issues (replace match="[^=]([^\\])'" replace="\1\\\\'") res/**/strings.xml +// 5. sherpafy/free/paid +// +// + android { compileSdkVersion 21 buildToolsVersion "21.1.2" @@ -64,8 +47,8 @@ android { minSdkVersion 9 targetSdkVersion 21 - versionCode System.getenv("APK_NUMBER_VERSION") ?: versionCode - versionName System.getenv("APK_VERSION") ?: versionName + versionCode System.getenv("APK_NUMBER_VERSION").toInteger( ) ?: System.getenv("APK_NUMBER_VERSION").toInteger() + versionName System.getenv("APK_VERSION") ?: System.getenv("APK_VERSION") } lintOptions { @@ -110,9 +93,12 @@ android { "helpAssets" ] } + free { + manifest.srcFile "AndroidManifest-free.xml" + } } - flavorDimensions "version", "distribution", "abi" + flavorDimensions "version", "abi" productFlavors { // ABI armv7 { @@ -148,7 +134,7 @@ android { flavorDimension "version" applicationId "net.osmand" } - paid { + full { flavorDimension "version" applicationId "net.osmand.plus" } @@ -159,19 +145,6 @@ android { } */ - // Distribution - night { - flavorDimension "distribution" - } - /* - googleplay { - flavorDimension "distribution" - } - - amazon { - flavorDimension "distribution" - } - */ } buildTypes { @@ -181,9 +154,14 @@ android { nativeDebug { signingConfig signingConfigs.development } + legacyDebug { + signingConfig signingConfigs.development + } release { signingConfig signingConfigs.publishing } + + } } @@ -282,10 +260,10 @@ repositories { } dependencies { - compile fileTree(dir: "libs", include: ["*.jar"], exclude: ["QtAndroid-bundled.jar", "QtAndroidAccessibility-bundled.jar"]) + compile fileTree(dir: "libs", include: ["*.jar"], exclude: ["QtAndroid-bundled.jar", "QtAndroidAccessibility-bundled.jar", "android-support*.jar", "OsmAndCore_wrapper.jar"]) compile 'com.android.support:appcompat-v7:21.0.3' - compile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar" - debugCompile "net.osmand:OsmAndCore_androidNativeRelease:0.1-SNAPSHOT@aar" + debugCompile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar" + legacyDebugCompile fileTree(dir: "libs", include: ["OsmAndCore_wrapper.jar"]) nativeDebugCompile "net.osmand:OsmAndCore_androidNativeDebug:0.1-SNAPSHOT@aar" releaseCompile "net.osmand:OsmAndCore_androidNativeRelease:0.1-SNAPSHOT@aar" }