我目前正在尝试将https://github.com/firebase/FirebaseUI-Android的本地克隆添加为项目中的依赖项。我不想通过标准方式导入它,因为我想对FirebaseUI进行修改。目前,我正在尝试:
settings.gradle:
include ':firebaseui'
project(':firebaseui').projectDir = new File(settingsDir, '../FirebaseUI')
我模块的 build.gradle:
dependencies {
compile project(":firebaseui")
}
但是我得到:
Error:(42, 0) Could not read script 'C:\Users\Gonzalo\AndroidStudioProjects\MyProject\common\constants.gradle' as it does not exist.
导入FirebaseUI \ build.gradle中:
allprojects { project ->
// Get constants, this is where we store things
// like the list of submodules or the version
project.apply from: "$rootDir/common/constants.gradle"
...
FirebaseUI的build.gradle或我的问题吗?
最佳答案
通过mavenLocal()
repo使用二进制deps:
git clone https://github.com/firebase/FirebaseUI-Android
cd FirebaseUI-Android
gradlew tasks
// //您将看到publishToMavenLocal
FirebaseUI-Android
打开到Intellij gradlew publishToMavenLocal
mavenLocal()
添加到您的repositories
compile 'com.firebaseui:firebase-ui:0.4.1'
做你的dependencies
之后,您一切顺利。
gradlew publishToMavenLocal
再次发布