Make root dist & ideaPlugin depend on all corresponding tasks in child projects

This commit is contained in:
Vyacheslav Gerasimov
2018-02-01 17:11:08 +03:00
parent 74e47e024f
commit a595fdd312
+7 -2
View File
@@ -350,20 +350,25 @@ allprojects {
} }
} }
task<Copy>("dist") { val distTask = task<Copy>("dist") {
val childDistTasks = getTasksByName("dist", true) - this@task
dependsOn(childDistTasks)
into(distDir) into(distDir)
from(files("compiler/cli/bin")) { into("kotlinc/bin") } from(files("compiler/cli/bin")) { into("kotlinc/bin") }
from(files("license")) { into("kotlinc/license") } from(files("license")) { into("kotlinc/license") }
} }
val compilerCopyTask = task<Copy>("idea-plugin-copy-compiler") { val compilerCopyTask = task<Copy>("idea-plugin-copy-compiler") {
shouldRunAfter(":dist") dependsOn(distTask)
into(ideaPluginDir) into(ideaPluginDir)
from(distDir) { include("kotlinc/**") } from(distDir) { include("kotlinc/**") }
} }
task<Copy>("ideaPlugin") { task<Copy>("ideaPlugin") {
dependsOn(compilerCopyTask) dependsOn(compilerCopyTask)
val childIdeaPluginTasks = getTasksByName("ideaPlugin", true) - this@task
dependsOn(childIdeaPluginTasks)
shouldRunAfter(":prepare:idea-plugin:idea-plugin") shouldRunAfter(":prepare:idea-plugin:idea-plugin")
into("$ideaPluginDir/lib") into("$ideaPluginDir/lib")
} }