Cannot import gradle project into another gradle project

女生的网名这么多〃 提交于 2019-12-23 03:46:29

问题


I have the following Windows directory structure for my 2 gradle projects:

bitbucket/
    users-dashboard/
        backend/
            users-data/
                build.gradle
                settings.gradle
    common-util/
        common-util/
            build.gradle
            settings.gradle

And I would like to you use the common-util project (as a dependency) into the users-data project.

I am trying the following without succeed!

users-data/settings.gradle

include ':common-util'
project(':common-util').projectDir = new File('../../../common-util/common-util')

users-data/build.gradle

dependencies {
    compile project(':common-util')
}

common-util/settings.gradle

rootProject.name = 'common-util'

Please help!

Getting this error:

Project with path ':common-util' could not be found in project ':users-data'.

来源:https://stackoverflow.com/questions/54819044/cannot-import-gradle-project-into-another-gradle-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!