Skip to content

Plugin doesn't work with Kotlin gradle scripts #42

@ztibbitts

Description

@ztibbitts

I've been generally unsuccessful configuring this plugin with kts gradle scripts. I believe it's due to the use of a Closure instead of an Action in the devices method on FirebaseTestLabPluginExtension

For the moment, I've forked the plugin locally to make the following change in FirebaseTestLabPluginExtension:

fun devices(action: NamedDomainObjectContainer<Device>.() -> Unit) { devices.action() }

this lets me configure the plugin like this in my build.gradle.kts file:

firebaseTestLab {
    keyFile = file("asdfasdf.json")
    googleProjectId = "asdfasdf"

    devices {
        register("pixel") {
            deviceIds = listOf("sailfish")
            androidApiLevels = listOf(25)
            locales = listOf("en")
        }
    }
}

I haven't tested to see if this breaks compatibility with groovy gradle scripts, but I'm open to helping out to reach a compatible solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions