4 Star 25 Fork 24

帆软软件/design

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
globalConfigHook.gradle 712 Bytes
一键复制 编辑 原始数据 按行查看 历史
def getRootGradle() {
def currentGradle = gradle
while (currentGradle.parent) {
currentGradle = currentGradle.parent
}
return currentGradle
}
def findHookIncludedBuild() {
def rootGradle = getRootGradle()
def hookProject = rootGradle.getIncludedBuilds()
.find({ build -> build.name == 'hook' })
return hookProject
}
def findGlobalConfig() {
def hookProject = findHookIncludedBuild()
if (hookProject) {
def path = hookProject.projectDir.parent + '/globalConfig.gradle'
if (file(path).exists()) {
return path
}
}
}
def globalConfigPath = findGlobalConfig()
if (globalConfigPath) {
apply from: globalConfigPath
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/fanruan/design.git
[email protected]:fanruan/design.git
fanruan
design
design
persist/10.0

搜索帮助