【问题标题】:Confused with Gradle Dependencies对 Gradle 依赖项感到困惑
【发布时间】:2015-02-22 15:53:48
【问题描述】:

我正在尝试将我的依赖项添加到 Eclipse 中的 Gradle Dependencies 库,当我运行它时,它会下载这些依赖项,但是我的其他依赖项位于 Eclipse 中 Gradle Project 下的 Gradle Dependencies 文件夹中,但这个不是。请帮忙,我只需要在eclipse中添加一个Gradle Dependency。

repositories {
    mavenCentral()
    maven {
            url "http://clojars.org/repo"
        }
}

dependencies {
    compile group: 'commons-collections', name: 'commons-collections', version: '3.2'
    compile "org.clojars.jmeeks:jfugue-with-musicxml:4.0.3"
    testCompile group: 'junit', name: 'junit', version: '4.+'
}

【问题讨论】:

    标签: gradle dependencies dependency-management


    【解决方案1】:

    您应该告诉 gradle 您的本地存储库,首先在存储库部分添加 mavenLocal()。使用您当前的配置,您告诉 gradle 一切都存储在 mavenCentral 或自定义 repo 中。

    【讨论】:

      猜你喜欢
      • 2012-08-19
      • 2016-03-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-08
      • 1970-01-01
      相关资源
      最近更新 更多