2015-02-12 23 views
1

我使用GWT Gradle Plugin。我有我包含在我的主要項目,第二個項目:在gwtSuperDev中包含用於重新編譯的其他源任務

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

我還創建了一個settings.gradle包含

includeFlat 'core-project' 

的核心項目是一個庫項目。當我運行gradle gwtSuperDev並更改我的主項目中的文件時,重新編譯會發生,但如果我更改了我的核心項目中的文件,則不會。

如何在SuperDevMode發生更改後重新編譯core-project源代碼?

回答

0

根據您的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') 
    ... 
} 
相關問題