summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDKTestApp/gradle-device-farm.gradle
blob: 5cb5d75bbb8bfc4fe525348449fac7d635f23006 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
apply plugin: 'devicefarm'

def getAccessKeyDeviceFarm() {
    if (project.hasProperty('AWS_ACCESS_KEY_ID_DEVICE_FARM')) {
        return AWS_ACCESS_KEY_ID_DEVICE_FARM
    } else {
        println("Could not locate AWS_ACCESS_KEY_ID_DEVICE_FARM in gradle.properties")
        return ""
    }
}

def getSecretAccessKeyDeviceFarm() {
    if (project.hasProperty('AWS_SECRET_ACCESS_KEY_DEVICE_FARM')) {
        return AWS_SECRET_ACCESS_KEY_DEVICE_FARM
    } else {
        println("Could not locate AWS_SECRET_ACCESS_KEY_DEVICE_FARM in gradle.properties")
        return ""
    }
}

devicefarm {

    projectName "Mapbox GL Android" // required: Must already exists.
    devicePool "sanity" // optional: Defaults to "Top Devices"

    authentication {
        accessKey getAccessKeyDeviceFarm()
        secretKey getSecretAccessKeyDeviceFarm()
    }

    devicestate {
        wifi "on"
        bluetooth "off"
        gps "on"
        nfc "on"
        latitude 47.6204 // default
        longitude - 122.3491 // default
    }

    instrumentation {

    }
}