aboutsummaryrefslogtreecommitdiff
path: root/buildSrc/src/main/kotlin/org/jetbrains/taskUtils.kt
blob: b018ba1326dbe25eb793659f0fd8950a9c2c4d16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
package org.jetbrains

import org.gradle.api.Task

fun Task.dependsOnMavenLocalPublication() {
        project.rootProject.allprojects.forEach { otherProject ->
            otherProject.invokeWhenEvaluated { evaluatedProject ->
                evaluatedProject.tasks.findByName("publishToMavenLocal")?.let { publishingTask ->
                    this.dependsOn(publishingTask)
                }
            }
        }
}