forked from github/cordova-android
Merge branch 'master' into 4.0.x
This commit is contained in:
commit
4c1efe7ad4
@ -84,9 +84,13 @@ int compareVersions(String a, String b) {
|
|||||||
|
|
||||||
String getAndroidSdkDir() {
|
String getAndroidSdkDir() {
|
||||||
def rootDir = project.rootDir
|
def rootDir = project.rootDir
|
||||||
|
def androidSdkDir = null
|
||||||
|
String envVar = System.getenv("ANDROID_HOME")
|
||||||
def localProperties = new File(rootDir, 'local.properties')
|
def localProperties = new File(rootDir, 'local.properties')
|
||||||
def androidSdkDir = ""
|
String systemProperty = System.getProperty("android.home")
|
||||||
if (localProperties.exists()) {
|
if (envVar != null) {
|
||||||
|
androidSdkDir = envVar
|
||||||
|
} else if (localProperties.exists()) {
|
||||||
Properties properties = new Properties()
|
Properties properties = new Properties()
|
||||||
localProperties.withInputStream { instr ->
|
localProperties.withInputStream { instr ->
|
||||||
properties.load(instr)
|
properties.load(instr)
|
||||||
@ -98,23 +102,16 @@ String getAndroidSdkDir() {
|
|||||||
sdkDirProp = properties.getProperty('android.dir')
|
sdkDirProp = properties.getProperty('android.dir')
|
||||||
if (sdkDirProp != null) {
|
if (sdkDirProp != null) {
|
||||||
androidSdkDir = (new File(rootDir, sdkDirProp)).getAbsolutePath()
|
androidSdkDir = (new File(rootDir, sdkDirProp)).getAbsolutePath()
|
||||||
} else {
|
|
||||||
throw new RuntimeException(
|
|
||||||
"No sdk.dir property defined in local.properties file.")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
String envVar = System.getenv("ANDROID_HOME")
|
|
||||||
if (envVar != null) {
|
|
||||||
androidSdkDir = envVar
|
|
||||||
} else {
|
|
||||||
String property = System.getProperty("android.home")
|
|
||||||
if (property != null) {
|
|
||||||
androidSdkDir = property
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
println androidSdkDir
|
if (androidSdkDir == null && systemProperty != null) {
|
||||||
|
androidSdkDir = systemProperty
|
||||||
|
}
|
||||||
|
if (androidSdkDir == null) {
|
||||||
|
throw new RuntimeException(
|
||||||
|
"Unable to determine Android SDK directory.")
|
||||||
|
}
|
||||||
androidSdkDir
|
androidSdkDir
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
framework/assets/www/cordova.js
vendored
4
framework/assets/www/cordova.js
vendored
@ -1,5 +1,5 @@
|
|||||||
// Platform: android
|
// Platform: android
|
||||||
// 3.7.0-dev-8f41e8d
|
// 3.7.0-dev-1258511
|
||||||
/*
|
/*
|
||||||
Licensed to the Apache Software Foundation (ASF) under one
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
or more contributor license agreements. See the NOTICE file
|
or more contributor license agreements. See the NOTICE file
|
||||||
@ -19,7 +19,7 @@
|
|||||||
under the License.
|
under the License.
|
||||||
*/
|
*/
|
||||||
;(function() {
|
;(function() {
|
||||||
var CORDOVA_JS_BUILD_LABEL = '3.7.0-dev-8f41e8d';
|
var CORDOVA_JS_BUILD_LABEL = '3.7.0-dev-1258511';
|
||||||
// file: src/scripts/require.js
|
// file: src/scripts/require.js
|
||||||
|
|
||||||
/*jshint -W079 */
|
/*jshint -W079 */
|
||||||
|
Loading…
Reference in New Issue
Block a user