【问题标题】:Gradle and Eclipse project referencesGradle 和 Eclipse 项目参考
【发布时间】:2014-06-16 09:17:25
【问题描述】:

我在 Eclipse 中使用 Gradle,并试图从 Project2 中引用 Project1(都在同一个根目录下),如下所示:

settings.gradle:

include ':Project1'
project(':Project1').projectDir = new File(settingsDir, '../Project1')

build.gradle

dependencies {
    compile project(':Project1')
 ...}

Project1 也通过构建路径引用。但是 eclipse/gradle 不会重新编译,而是使用包含旧的 jar 类。我也尝试将插件设置为apply plugin: 'eclipse-wtp'

【问题讨论】:

标签: eclipse gradle


【解决方案1】:

出于好奇,你的 build.gradle 中是否有这样的块

eclipse.project {
  referencedProjects 'Project1'
}

我问是因为,如果你不告诉 Eclipse 这个项目引用了 Project1,它就不会包含在构建路径中。

【讨论】:

    猜你喜欢
    • 2013-01-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-05
    • 1970-01-01
    相关资源
    最近更新 更多