mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-07 23:03:11 +08:00
CB-8976: Removing the auto-version for non-Crosswalk applications
This commit is contained in:
parent
fe906dabda
commit
dc579417fe
@ -86,6 +86,7 @@ ext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// PLUGIN GRADLE EXTENSIONS START
|
// PLUGIN GRADLE EXTENSIONS START
|
||||||
|
apply from: "cordova-plugin-crosswalk-webview/app-xwalk.gradle"
|
||||||
// PLUGIN GRADLE EXTENSIONS END
|
// PLUGIN GRADLE EXTENSIONS END
|
||||||
|
|
||||||
def hasBuildExtras = file('build-extras.gradle').exists()
|
def hasBuildExtras = file('build-extras.gradle').exists()
|
||||||
@ -162,7 +163,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
versionCode cdvVersionCode ?: Integer.parseInt("" + privateHelpers.extractIntFromManifest("versionCode") + "0")
|
versionCode cdvVersionCode ?: Integer.parseInt("" + privateHelpers.extractIntFromManifest("versionCode"))
|
||||||
applicationId privateHelpers.extractStringFromManifest("package")
|
applicationId privateHelpers.extractStringFromManifest("package")
|
||||||
|
|
||||||
if (cdvMinSdkVersion != null) {
|
if (cdvMinSdkVersion != null) {
|
||||||
@ -180,13 +181,13 @@ android {
|
|||||||
if (Boolean.valueOf(cdvBuildMultipleApks)) {
|
if (Boolean.valueOf(cdvBuildMultipleApks)) {
|
||||||
productFlavors {
|
productFlavors {
|
||||||
armv7 {
|
armv7 {
|
||||||
versionCode defaultConfig.versionCode + 2
|
versionCode defaultConfig.versionCode*10 + 2
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters "armeabi-v7a", ""
|
abiFilters "armeabi-v7a", ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
x86 {
|
x86 {
|
||||||
versionCode defaultConfig.versionCode + 4
|
versionCode defaultConfig.versionCode*10 + 4
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters "x86", ""
|
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")
|
def minSdkVersion = cdvMinSdkVersion ?: privateHelpers.extractIntFromManifest("minSdkVersion")
|
||||||
// Vary versionCode by the two most common API levels:
|
// Vary versionCode by the two most common API levels:
|
||||||
// 14 is ICS, which is the lowest API level for many apps.
|
// 14 is ICS, which is the lowest API level for many apps.
|
||||||
@ -208,6 +214,7 @@ android {
|
|||||||
defaultConfig.versionCode += 8
|
defaultConfig.versionCode += 8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_6
|
sourceCompatibility JavaVersion.VERSION_1_6
|
||||||
@ -239,6 +246,8 @@ android {
|
|||||||
dependencies {
|
dependencies {
|
||||||
compile fileTree(dir: 'libs', include: '*.jar')
|
compile fileTree(dir: 'libs', include: '*.jar')
|
||||||
// SUB-PROJECT DEPENDENCIES START
|
// SUB-PROJECT DEPENDENCIES START
|
||||||
|
debugCompile project(path: "CordovaLib", configuration: "debug")
|
||||||
|
releaseCompile project(path: "CordovaLib", configuration: "release")
|
||||||
// SUB-PROJECT DEPENDENCIES END
|
// SUB-PROJECT DEPENDENCIES END
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user