File tree Expand file tree Collapse file tree 3 files changed +15
-35
lines changed Expand file tree Collapse file tree 3 files changed +15
-35
lines changed Original file line number Diff line number Diff line change @@ -4,13 +4,25 @@ android:
4
4
components :
5
5
- tools
6
6
- platform-tools
7
- - build-tools-27.0.3
8
7
- android-27
9
- - extra-android-m2repository
10
- - sys-img-armeabi-v7a-android-19
8
+
11
9
jdk :
12
10
- oraclejdk8
13
11
12
+ before_script :
13
+ # Install SDK license so Android Gradle plugin can install deps.
14
+ - mkdir "$ANDROID_HOME/licenses" || true
15
+ - echo "d56f5187479451eabf01fb78af6dfcb131a6481e" > "$ANDROID_HOME/licenses/android-sdk-license"
16
+ # Install the rest of tools (e.g., avdmanager)
17
+ - sdkmanager tools
18
+ # Install emulator system image
19
+ - sdkmanager "system-images;android-19;default;armeabi-v7a"
20
+ # Start Emulator
21
+ - echo no | $ANDROID_HOME/tools/bin/avdmanager create avd --force -n test -k "system-images;android-19;default;armeabi-v7a"
22
+ - emulator -avd test -no-audio -no-window &
23
+ - android-wait-for-emulator
24
+ - adb shell input keyevent 82 &
25
+
14
26
script :
15
27
./gradlew build test connectedCheck
16
28
Original file line number Diff line number Diff line change @@ -26,28 +26,4 @@ task clean(type: Delete) {
26
26
delete rootProject. buildDir
27
27
}
28
28
29
- ext. isCi = " true" == System . getenv(" CI" )
30
-
31
- if (isCi) {
32
- println ' Running on CI. Adding task to start emulator.'
33
-
34
- task startEmulator {
35
- doLast {
36
- " $rootDir /gradle/start-emulator.sh" . execute(). waitFor()
37
- }
38
- }
39
-
40
- subprojects {
41
- afterEvaluate { Project project ->
42
- project. android. testVariants. all { variant ->
43
- variant. connectedInstrumentTest. dependsOn startEmulator
44
- }
45
-
46
- project. android. dexOptions {
47
- preDexLibraries = false
48
- }
49
- }
50
- }
51
- }
52
-
53
29
apply from : file(" gradle/bintray-properties.gradle" )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments