如何解决为什么gradle插件GrGit在/Users/rossUlbricht/.gradle/daemon/my-git-project/.git文件夹中查找我的git存储库
我当前的Android应用程序依赖于sub git repo
文件夹结构为
/Users/myname/github/main-app
/Users/myname/github/sub-module
我的项目gradle构建文件具有...
task cloneAndPullSdk {
File dir = new File('../sub-module')
def grgit
if (!dir.exists()) {
grgit = Grgit.clone(dir: dir,uri: 'https://github.com/Organisation/sub-module.git')
} else {
grgit = Grgit.open(dir: '../sub-module')
}
grgit.checkout(branch: sdkBranch,createBranch: false)
}
我的gradle
构建(用于正常工作)雇用了
classpath 'org.ajoberstar:grgit:1.9.3'
要打开关联的git repo
当我刷新gradle和/或清理或构建时,出现此错误
* What went wrong:
A problem occurred evaluating root project 'main-app'.
> repository not found: /Users/rossUlbricht/.gradle/daemon/sub-module/.git
GrGit
为什么在/.gradle/daemon/文件夹中查找我的存储库?
如何配置gradle以使其能够正确定位子模块文件夹的位置?
Android Studio 4.1
Build #AI-201.8743.12.41.6858069,built on September 23,2020
Runtime version: 1.8.0_242-release-1644-b3-6222593 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.6
并使用
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
classpath 'org.ajoberstar:grgit:1.9.3'
// in the individual module build.gradle files
}
使用
#Tue Jun 05 12:01:24 BST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。