File tree Expand file tree Collapse file tree 3 files changed +18
-17
lines changed Expand file tree Collapse file tree 3 files changed +18
-17
lines changed Original file line number Diff line number Diff line change 1
1
plugins {
2
- id(" com.android.library" )
3
- id(" kotlin-android" )
2
+ id(" kotlin" )
4
3
id(" com.yelp.codegen.plugin" )
5
4
id(" io.gitlab.arturbosch.detekt" )
6
5
id(" kotlin-kapt" )
7
6
}
8
7
9
- android {
10
- compileSdkVersion = 28
11
- defaultConfig {
12
- minSdkVersion 21
13
- targetSdkVersion 28
14
- versionCode = 1
15
- versionName = " 1.0"
16
- }
17
- }
18
-
19
8
dependencies {
20
9
// Kotlin
21
10
implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.70"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -17,10 +17,24 @@ pluginManagement {
17
17
}
18
18
}
19
19
20
- include(
21
- " :samples:junit-tests" ,
20
+ include(" :samples:junit-tests" )
21
+
22
+ if (isAndroidSDKConfigured()) {
23
+ include(
22
24
" :samples:kotlin-android" ,
23
25
" :samples:kotlin-coroutines" ,
24
- " :samples:groovy-android" )
26
+ " :samples:groovy-android"
27
+ )
28
+ }
25
29
26
30
includeBuild(" gradle-plugin" )
31
+
32
+ fun isAndroidSDKConfigured (): Boolean {
33
+ if (System .getenv(" ANDROID_SDK_ROOT" ) != null ) {
34
+ return true ;
35
+ }
36
+ // TODO: Check if `sdk.dir` property is defined in `local.properties`
37
+
38
+ // Ensure that on CI systems we do assume that Android is installed
39
+ return System .getenv(" CI" ) != null ;
40
+ }
You can’t perform that action at this time.
0 commit comments