【问题标题】:Include additional Sources for recompile in gwtSuperDev Task在 gwtSuperDev 任务中包含用于重新编译的其他源
【发布时间】:2015-02-12 02:36:02
【问题描述】:

我使用GWT Gradle Plugin。我有第二个项目,我将其包含在我的主要项目中:

dependencies {  
  compile(project(':core-project')) {
    transitive = false
  }
}

我还创建了一个settings.gradle,其中包含

includeFlat 'core-project'

核心项目是一个库项目。当我运行gradle gwtSuperDev 并更改主项目中的文件时,会重新编译,但如果我更改核心项目中的文件,则不会。

如何使核心项目源代码在 SuperDevMode 发生更改后也重新编译?

【问题讨论】:

    标签: java eclipse gwt gradle gwt-super-dev-mode


    【解决方案1】:

    根据您的 gradle 依赖项的组织方式,您可以简单地将它们的源文件添加到 build.gradle 文件的 gwt 部分。

    我的构建文件中有这样的内容:

    gwt {
      gwtVersion = '2.7.0'
      if (System.getProperty('devmode') != null) {
        modules = ['dk.logiva.invoice.autoaccount.gwt.AutoAccountAdminDev']
        compiler {
            style = 'PRETTY';
            strict = true;
        }
        // include sources from inherited module
        src += project(':invoice:gwt:gwt-common').files('src/main/java')
      } else {
        modules = ['dk.logiva.invoice.autoaccount.gwt.AutoAccountAdmin']
      }
      devWar = file("${buildDir}/war")
      maxHeapSize = "3G"
    }
    ...
    dependencies {
      compile project(':invoice:gwt:gwt-common')
      ...
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-05-25
      • 2011-01-03
      • 2010-11-27
      • 2011-01-12
      • 2017-09-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多