Relative project dependencies in Gradle?

后端 未结 5 1233
眼角桃花
眼角桃花 2021-01-30 17:30

When specifying Gradle project dependencies, can I avoid using a full absolute project name and use a relative one instead? (i.e. in my example I don\'t want to explicitly speci

5条回答
  •  忘掉有多难
    2021-01-30 17:54

    Relative names are a bad idea since they make your project depend on the wider project it is located in. That should not be the case. I suggest to avoid using the relative name.

    In terms of retrieving the parent project as a dependency this would be done via the default being the parent directory or that failing it would use the usual dependency resolution mechanism, which uses the coordinates (groupId, artifactId and version) and looks the artifact up in the local repository..

提交回复
热议问题