I am trying to access
Groovy
extra in my
KTS
scripts but I couldn’t make it. I have something in my
constants.gradle
ext {
javaTypes = [
NULL : "null",
TRUE : "true",
FALSE : "false",
BOOLEAN : "boolean",
STRING : "String",
STRING_ARRAY: "String[]",
INT : "int",
LONG : "long"
]
}
val javaTypes by extra
buildConfigField(javaTypes.STRING, constants.HTTP_DEV_URL, asString(Urls.http_dev_url))
And in a KTS script, I am trying to access it like above but I am getting error:
Unresolved reference: javaTypes
Can you help me? Thanks.