Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AndroidEmulatorRunnerV2 #345

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/supported-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ Click on a version to see the wrapper's code.
* [create-pull-request](https://github.com/peter-evans/create-pull-request) - v4: [`CreatePullRequestV4`](https://github.com/krzema12/github-actions-kotlin-dsl/blob/v[[ version ]]/library/src/gen/kotlin/it/krzeminski/githubactions/actions/peterevans/CreatePullRequestV4.kt)
* peterjgrainger
* [action-create-branch](https://github.com/peterjgrainger/action-create-branch) - v2.2.0: [`ActionCreateBranchV2`](https://github.com/krzema12/github-actions-kotlin-dsl/blob/v[[ version ]]/library/src/gen/kotlin/it/krzeminski/githubactions/actions/peterjgrainger/ActionCreateBranchV2.kt)
* ReactiveCircus
* [android-emulator-runner](https://github.com/ReactiveCircus/android-emulator-runner) - v2: [`AndroidEmulatorRunnerV2`](https://github.com/krzema12/github-actions-kotlin-dsl/blob/v[[ version ]]/library/src/gen/kotlin/it/krzeminski/githubactions/actions/reactivecircus/AndroidEmulatorRunnerV2.kt)
* repo-sync
* [pull-request](https://github.com/repo-sync/pull-request) - v2: [`PullRequestV2`](https://github.com/krzema12/github-actions-kotlin-dsl/blob/v[[ version ]]/library/src/gen/kotlin/it/krzeminski/githubactions/actions/reposync/PullRequestV2.kt)
* ruby
Expand All @@ -131,5 +133,5 @@ Click on a version to see the wrapper's code.

Number of wrappers available:

* counting by actions: 76
* counting each version separately: 89
* counting by actions: 77
* counting each version separately: 90
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
// This file was generated using 'wrapper-generator' module. Don't change it by hand, your changes will
// be overwritten with the next wrapper code regeneration. Instead, consider introducing changes to the
// generator itself.
package it.krzeminski.githubactions.actions.reactivecircus

import it.krzeminski.githubactions.actions.Action
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.collections.toList
import kotlin.collections.toTypedArray

/**
* Action: Android Emulator Runner
*
* Installs, configures and starts an Android Emulator directly on macOS virtual machines.
*
* [Action on GitHub](https://github.com/ReactiveCircus/android-emulator-runner)
*/
public class AndroidEmulatorRunnerV2(
LeoColman marked this conversation as resolved.
Show resolved Hide resolved
/**
* API level of the platform and system image - e.g. 23 for Android Marshmallow, 29 for Android
* 10
krzema12 marked this conversation as resolved.
Show resolved Hide resolved
*/
public val apiLevel: Int,
/**
* target of the system image - default, google_apis, google_apis_playstore, aosp_atd,
* google_atd, android-wear, android-wear-cn, android-tv or google-tv
*/
public val target: AndroidEmulatorRunnerV2.Target? = null,
/**
* CPU architecture of the system image - x86, x86_64 or arm64-v8a
*/
public val arch: AndroidEmulatorRunnerV2.Arch? = null,
/**
* hardware profile used for creating the AVD - e.g. `Nexus 6`
*/
public val profile: String? = null,
/**
* the number of cores to use for the emulator
*/
public val cores: Int? = null,
/**
* size of RAM to use for this AVD, in KB or MB, denoted with K or M. - e.g. `2048M`
*/
public val ramSize: String? = null,
/**
* size of heap to use for this AVD in MB. - e.g. `512M`
*/
public val heapSize: String? = null,
/**
* path to the SD card image for this AVD or the size of a new SD card image to create for this
* AVD, in KB or MB, denoted with K or M. - e.g. `path/to/sdcard`, or `1000M`
*/
public val sdcardPathOrSize: String? = null,
/**
* disk size to use for this AVD. Either in bytes or KB, MB or GB, when denoted with K, M or G
*/
public val diskSize: String? = null,
/**
* custom AVD name used for creating the Android Virtual Device
*/
public val avdName: String? = null,
/**
* whether to force create the AVD by overwriting an existing AVD with the same name as
* `avd-name` - `true` or `false`
*/
public val forceAvdCreation: Boolean? = null,
/**
* command-line options used when launching the emulator - e.g.
* `-no-window -no-snapshot -camera-back emulated`
*/
public val emulatorOptions: String? = null,
/**
* whether to disable animations - true or false
*/
public val disableAnimations: Boolean? = null,
/**
* whether to disable spellchecker - `true` or `false`
*/
public val disableSpellchecker: Boolean? = null,
/**
* whether to disable hardware acceleration on Linux machines - `true` or `false` or `auto`
*/
public val disableLinuxHwAccel: Boolean? = null,
/**
* whether to enable hardware keyboard - `true` or `false`.
*/
public val enableHwKeyboard: Boolean? = null,
/**
* build number of a specific version of the emulator binary to use - e.g. `6061023` for
* emulator v29.3.0.0
*/
public val emulatorBuild: String? = null,
/**
* A custom working directory - e.g. `./android` if your root Gradle project is under the
* `./android` sub-directory within your repository
*/
public val workingDirectory: String? = null,
/**
* version of NDK to install - e.g. 21.0.6113669
*/
public val ndk: String? = null,
/**
* version of CMake to install - e.g. 3.10.2.4988404
*/
public val cmake: String? = null,
/**
* Channel to download the SDK components from - `stable`, `beta`, `dev`, `canary`
*/
public val channel: AndroidEmulatorRunnerV2.Channel? = null,
/**
* custom script to run - e.g. `./gradlew connectedCheck`
*/
public val script: String,
/**
* Type-unsafe map where you can put any inputs that are not yet supported by the wrapper
*/
public val _customInputs: Map<String, String> = mapOf(),
/**
* Allows overriding action's version, for example to use a specific minor version, or a newer
* version that the wrapper doesn't yet know about
*/
_customVersion: String? = null,
) : Action("ReactiveCircus", "android-emulator-runner", _customVersion ?: "v2") {
@Suppress("SpreadOperator")
public override fun toYamlArguments() = linkedMapOf(
*listOfNotNull(
"api-level" to apiLevel.toString(),
target?.let { "target" to it.stringValue },
arch?.let { "arch" to it.stringValue },
profile?.let { "profile" to it },
cores?.let { "cores" to it.toString() },
ramSize?.let { "ram-size" to it },
heapSize?.let { "heap-size" to it },
sdcardPathOrSize?.let { "sdcard-path-or-size" to it },
diskSize?.let { "disk-size" to it },
avdName?.let { "avd-name" to it },
forceAvdCreation?.let { "force-avd-creation" to it.toString() },
emulatorOptions?.let { "emulator-options" to it },
disableAnimations?.let { "disable-animations" to it.toString() },
disableSpellchecker?.let { "disable-spellchecker" to it.toString() },
disableLinuxHwAccel?.let { "disable-linux-hw-accel" to it.toString() },
enableHwKeyboard?.let { "enable-hw-keyboard" to it.toString() },
emulatorBuild?.let { "emulator-build" to it },
workingDirectory?.let { "working-directory" to it },
ndk?.let { "ndk" to it },
cmake?.let { "cmake" to it },
channel?.let { "channel" to it.stringValue },
"script" to script,
*_customInputs.toList().toTypedArray(),
).toTypedArray()
)

public sealed class Target(
public val stringValue: String,
) {
public object Default : AndroidEmulatorRunnerV2.Target("default")

public object GoogleApis : AndroidEmulatorRunnerV2.Target("google_apis")

public object GoogleApisPlaystore : AndroidEmulatorRunnerV2.Target("google_apis_playstore")

public object AospAtd : AndroidEmulatorRunnerV2.Target("aosp_atd")

public object GoogleAtd : AndroidEmulatorRunnerV2.Target("google_atd")

public object AndroidWear : AndroidEmulatorRunnerV2.Target("android-wear")

public object AndroidWearCn : AndroidEmulatorRunnerV2.Target("android-wear-cn")

public object AndroidTv : AndroidEmulatorRunnerV2.Target("android-tv")

public object GoogleTv : AndroidEmulatorRunnerV2.Target("google-tv")

public class Custom(
customStringValue: String,
) : AndroidEmulatorRunnerV2.Target(customStringValue)
}

public sealed class Arch(
public val stringValue: String,
) {
public object X86 : AndroidEmulatorRunnerV2.Arch("x86")

public object X8664 : AndroidEmulatorRunnerV2.Arch("x86_64")

public object Arm64V8a : AndroidEmulatorRunnerV2.Arch("arm64-v8a")

public class Custom(
customStringValue: String,
) : AndroidEmulatorRunnerV2.Arch(customStringValue)
}

public sealed class Channel(
public val stringValue: String,
) {
public object Stable : AndroidEmulatorRunnerV2.Channel("stable")

public object Beta : AndroidEmulatorRunnerV2.Channel("beta")

public object Dev : AndroidEmulatorRunnerV2.Channel("dev")

public object Canary : AndroidEmulatorRunnerV2.Channel("canary")

public class Custom(
customStringValue: String,
) : AndroidEmulatorRunnerV2.Channel(customStringValue)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,43 @@ val wrappersToGenerate = listOf(
),
WrapperRequest(ActionCoords("peterjgrainger", "action-create-branch", "v2.2.0")),

WrapperRequest(
ActionCoords("ReactiveCircus", "android-emulator-runner", "v2"),
TypingsSource.WrapperGenerator(
mapOf(
"api-level" to IntegerTyping,
"target" to EnumTyping(
"Target",
listOf(
"default", "google_apis", "google_apis_playstore", "aosp_atd",
"google_atd", "android-wear", "android-wear-cn", "android-tv",
"google-tv"
)
),
"arch" to EnumTyping("Arch", listOf("x86", "x86_64", "arm64-v8a")),
"profile" to StringTyping,
"cores" to IntegerTyping,
"ram-size" to StringTyping,
"heap-size" to StringTyping,
"sdcard-path-or-size" to StringTyping,
"disk-size" to StringTyping,
"avd-name" to StringTyping,
"force-avd-creation" to BooleanTyping,
"emulator-options" to StringTyping,
"disable-animations" to BooleanTyping,
"disable-spellchecker" to BooleanTyping,
"disable-linux-hw-accel" to BooleanTyping,
"enable-hw-keyboard" to BooleanTyping,
"emulator-build" to StringTyping,
"working-directory" to StringTyping,
"ndk" to StringTyping,
"cmake" to StringTyping,
"channel" to EnumTyping("Channel", listOf("stable", "beta", "dev", "canary")),
"script" to StringTyping,
)
)
),

WrapperRequest(
ActionCoords("repo-sync", "pull-request", "v2"),
TypingsSource.WrapperGenerator(
Expand Down