Gradle downloading dependency into cache instead of maven repository

后端 未结 2 849
伪装坚强ぢ
伪装坚强ぢ 2021-01-11 13:27

I am trying to maintain the same repository on my filesystem for maven and gradle. But I am running into some problems.

I have the following in my build.gradle

相关标签:
2条回答
  • 2021-01-11 13:51

    Yes, I read the source code and just confirmed There is no setting to change that.

    Here is my solution:

    1. install a local maven repository manager like Nexus.

    2. config gradle using that repository.

    0 讨论(0)
  • 2021-01-11 14:06

    There is no setting to change that. There is no gradle repository as such. Also, it seems like a bad idea to have gradle use the repository's folder as dependency cache because of the clutter.

    If you are trying to publish artifacts built by gradle to said maven repository, you should probably take a look at the maven-publish plugin.

    If you are trying to use artifacts from that repository in your build, the way to go would be to add mavenLocal() to your repositories and then just use the compile function in your dependencies.

    0 讨论(0)
提交回复
热议问题