in gradle script kotln what is the same as setting ext.someThing= [ foo : true]
c
Czar
03/17/2018, 7:31 PM
Copy code
// option 1
val something by extra { "value" }
// option 2
extra["something"] = "value"
b
bjartek
03/17/2018, 7:32 PM
thanks 🙂
c
Czar
03/17/2018, 7:34 PM
if you want to reuse the value in the same script, I suggest option 1, because it gives you a typed val, if you only need to set it, then option 2 is shorter therefore you could go with it to save up some typing 🙂