-
Notifications
You must be signed in to change notification settings - Fork 119
/
IosGcloudYml.kt
45 lines (38 loc) · 1.3 KB
/
IosGcloudYml.kt
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
44
45
package ftl.args.yml
import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.annotation.JsonProperty
import ftl.config.Device
import ftl.config.FtlConstants.defaultIosModel
import ftl.config.FtlConstants.defaultIosVersion
import ftl.util.Utils.assertNotEmpty
/**
* iOS specific gcloud parameters
*
* https://cloud.google.com/sdk/gcloud/reference/firebase/test/android/run
* https://cloud.google.com/sdk/gcloud/reference/alpha/firebase/test/ios/run
*/
@JsonIgnoreProperties(ignoreUnknown = true)
class IosGcloudYmlParams(
val test: String = "",
@field:JsonProperty("xctestrun-file")
val xctestrunFile: String = "",
@field:JsonProperty("xcode-version")
val xcodeVersion: String? = null,
val device: List<Device> = listOf(Device(defaultIosModel, defaultIosVersion))
) {
companion object : IYmlKeys {
override val keys = listOf("test", "xctestrun-file", "xcode-version", "device")
}
init {
assertNotEmpty(test, "test is not set")
assertNotEmpty(xctestrunFile, "xctestrun-file is not set")
}
}
@JsonIgnoreProperties(ignoreUnknown = true)
class IosGcloudYml(
val gcloud: IosGcloudYmlParams = IosGcloudYmlParams()
) {
companion object : IYmlMap {
override val map = mapOf("gcloud" to IosGcloudYmlParams.keys)
}
}