我编写多模块 android 项目。这个模块之一 - 它是 gitlab 上 git 存储库中的另一个项目。 我怎么能把它拉进gradle?我尝试了 gradle-plugin-git-dependencies 和 maven-git-commit-id-plugin/pull/92
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
classpath 'org.batcha.gradle.plugins:git-dependencies:0.1'
apply from: 'https://raw.github.com/bat-cha/gradle-plugin-git-dependencies/0.1/git-dependencies.gradle'
compile('org.batcha:dummy-project-a:4.2').ext.git = 'https://gitlab.com/Artem_Chekharin/uz.git'
}
}
但是他们没有从 git 中拉取项目。我使用 Android Studio 0.5.1。
最佳答案
您必须先运行 initGitDependencies gradle 的任务。
关于android - Gradle git 依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22434559/