<@U092308M7> On the other hand, these literals hel...
# random
c
@orangy On the other hand, these literals help DSL’s by replacing
listOf(1,2,3)
with
[1,2,3]
, which reads a bit better IMO
👍 4
v
DSLs are welcome to use
vararg
. Annotations are another story thou
g
If you have DSL with a big list of properties, you just want to use properties instead method with varargs. You can check example of Gradle DSL in my project - https://github.com/gildor/gradle-firebase-test-lab-plugin/blob/master/README.md:
Copy code
matrices {
        "nexus7" {
            androidApiLevels = listOf(19, 21)
            deviceIds = listOf("flo")
            locales = listOf("en")
            orientations = listOf(portrait, landscape)
        }
    }