0

我有以下多项目结构:

设置.gradle

rootProject.name = 'toolbox-backend'
include 'toolbox-components-rest'
include 'toolbox-components-executor'
include 'toolbox-components-toolsyncer'

我想在我的根build.gradle中创建一个任务,它将调用cleanbuildinstall(应用程序),最后调用toolbox-components-rest子模块的run任务。

4

1 回答 1

1
task startREST() {

dependsOn ':toolbox-components-rest:clean'
dependsOn ':toolbox-components-rest:build'
dependsOn ':toolbox-components-rest:bootRun'

println "[Toolbox $version] Starting REST interface..."
}

This does work - BUT the bootRun task is running before build which runs before clean. I'd like to have it exactly the other way around

Fixed the above with

bootRun.mustRunAfter build
build.mustRunAfter clean

in the gradle.build of the toolbox-components-rest submodule

于 2017-02-03T15:51:15.280 回答