Hi, i am new to using gradle kotlin DSL and was wo...
# gradle
j
Hi, i am new to using gradle kotlin DSL and was wondering how do u add a buildConfig variable on it? I tried adding
buildConfigField("String", "BUILD_TIME", "\"${minutesSinceEpoch}\"")
as an example but buildConfigField does not exist and could not see a similar function?
m
There should be a
buildConfigField
on the
BuildType
class
Something like
Copy code
buildTypes {
        val debug by getting {
            buildConfigField("String", "BUILD_TIME", "\"${System.currentTimeMillis()}\"")
        }
    }
j
cool thanks