Alô! The action AndroidEmulatorRunner from Reactiv...
# github-workflows-kt
l
Alô! The action AndroidEmulatorRunner from ReactiveCircus have weird bindings. Specifically, this doesn't compile
Copy code
uses(
      name = "Android Tests",
      action = AndroidEmulatorRunner(
        apiLevel = 33,
        emulatorOptions = "-no-snapshot -no-audio -no-boot-anim",
        disableAnimations = true,
        script = "./gradlew connectedAndroidTest",
        target = "default",
      )
    )
As it becomes a private constructor, And this compiles
Copy code
action = AndroidEmulatorRunner(
        apiLevel = 33,
        emulatorOptions = "-no-snapshot -no-audio -no-boot-anim",
        disableAnimations = true,
        script = "./gradlew connectedAndroidTest",
      )
For some reason I don't know. I expected the first one and the second one to compile using the same constructor I'm experimenting with it here
1
p
the
target
input is an enum, see: • in the typings: https://github.com/ReactiveCircus/android-emulator-runner/blob/50d5b10c0167135fd356722acdfaaef2542f8f1b/action-types.yml#L4-L15 • IDE's hints (yes, AI gets it wrong by proposing a string!):
if you write
AndroidEmulatorRunner.Target.
, you'll get all options, including
default
available under the
Default
enum item
l
Ah, I'm the dum dum once again 😄
🤠 1
p
why you saw it as a private constructor initially - not sure, looks like a misleading error message to me, since I don't see any constructor that would match the initial signature