I'm trying to add BuildConfig variable using gradle.
I see that buildConfigField is valid when I call it on
gradle buildTypes: release/debug
and also on defaultConfig
but I'm trying to create this inside gradle task. for example:
task myTask{
buildConfigField 'String', 'Test', '"value"'
}
and then call my task. but in that case when I call myTask, gradle is failed and I'm getting:
"could not find method buildConfigField"
is there any option to call buildConfigField
and make it work inside task?