diff --git a/bin/templates/project/build.gradle b/bin/templates/project/build.gradle index 65d5a905..ee9aa19d 100644 --- a/bin/templates/project/build.gradle +++ b/bin/templates/project/build.gradle @@ -86,6 +86,7 @@ ext { } // PLUGIN GRADLE EXTENSIONS START +apply from: "cordova-plugin-crosswalk-webview/app-xwalk.gradle" // PLUGIN GRADLE EXTENSIONS END def hasBuildExtras = file('build-extras.gradle').exists() @@ -162,7 +163,7 @@ android { } defaultConfig { - versionCode cdvVersionCode ?: Integer.parseInt("" + privateHelpers.extractIntFromManifest("versionCode") + "0") + versionCode cdvVersionCode ?: Integer.parseInt("" + privateHelpers.extractIntFromManifest("versionCode")) applicationId privateHelpers.extractStringFromManifest("package") if (cdvMinSdkVersion != null) { @@ -180,13 +181,13 @@ android { if (Boolean.valueOf(cdvBuildMultipleApks)) { productFlavors { armv7 { - versionCode defaultConfig.versionCode + 2 + versionCode defaultConfig.versionCode*10 + 2 ndk { abiFilters "armeabi-v7a", "" } } x86 { - versionCode defaultConfig.versionCode + 4 + versionCode defaultConfig.versionCode*10 + 4 ndk { abiFilters "x86", "" } @@ -197,7 +198,12 @@ android { } } } - } else if (!cdvVersionCode) { + } + /* + + ELSE NOTHING! DON'T MESS WITH THE VERSION CODE IF YOU DON'T HAVE TO! + + else if (!cdvVersionCode) { def minSdkVersion = cdvMinSdkVersion ?: privateHelpers.extractIntFromManifest("minSdkVersion") // Vary versionCode by the two most common API levels: // 14 is ICS, which is the lowest API level for many apps. @@ -208,6 +214,7 @@ android { defaultConfig.versionCode += 8 } } + */ compileOptions { sourceCompatibility JavaVersion.VERSION_1_6 @@ -239,6 +246,8 @@ android { dependencies { compile fileTree(dir: 'libs', include: '*.jar') // SUB-PROJECT DEPENDENCIES START + debugCompile project(path: "CordovaLib", configuration: "debug") + releaseCompile project(path: "CordovaLib", configuration: "release") // SUB-PROJECT DEPENDENCIES END }