Take local.properties into account when checking for Android SDK

This commit is contained in:
Ilya Matveev
2018-06-08 16:37:12 +03:00
committed by ilmat192
parent d72db9226b
commit 54a9969f64
2 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ buildscript {
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'com.android.tools.build:gradle:3.1.3'
}
}
+8 -1
View File
@@ -2,7 +2,14 @@ include ':common'
include ':jvm'
include ':ios'
if (System.getenv('ANDROID_HOME') != null) {
def localProperties = new Properties()
def localPropertiesFile = file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader { localProperties.load(it) }
}
// Don't create Android tasks if a user has no Android SDK.
if (localProperties.containsKey("sdk.dir") || System.getenv('ANDROID_HOME') != null) {
include ':android'
}