I define a function in project level build.gradle
def isGood(){
return true
}
Again in project level, I want to call this function inside repositories function of buildscript function. But isGood cannot be called from here. Why? And how can I do it?
buildscript {
repositories {
if(isGood()) {. // isGood cannot be found here. I want to call isGood function here. How can I do that?
maven { url "https://something" }
}
}
dependencies {
}
}