Android 如何调用build.gradle中buildscript函数的用户定义的存储库内方法函数
我在project level build.gradle中定义了一个函数Android 如何调用build.gradle中buildscript函数的用户定义的存储库内方法函数,android,gradle,android-gradle-plugin,build.gradle,gradle-plugin,Android,Gradle,Android Gradle Plugin,Build.gradle,Gradle Plugin,我在project level build.gradle中定义了一个函数 def isGood(){ return true } 同样在项目级别,我想在buildscript函数的存储库内调用这个函数。但是从这里不能叫isGood。为什么?我该怎么做呢 buildscript { repositories { if(isGood()) {. // isGood cannot be found here. I want to call isGood functi
def isGood(){
return true
}
同样在项目级别,我想在buildscript函数的存储库内调用这个函数。但是从这里不能叫isGood。为什么?我该怎么做呢
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 {
}
}