aboutsummaryrefslogtreecommitdiff
path: root/buildSrc/src/main/kotlin/org
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-07-02 14:18:51 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-07-06 15:34:57 +0200
commita573641a70a626983c1d63965e377ea0be274f41 (patch)
treefa242cb03627437c6a40a38900d894c97a6436c0 /buildSrc/src/main/kotlin/org
parentb594564969ec4d93d59e4850a63f0fbf8f68cf7a (diff)
downloaddokka-a573641a70a626983c1d63965e377ea0be274f41.tar.gz
dokka-a573641a70a626983c1d63965e377ea0be274f41.tar.bz2
dokka-a573641a70a626983c1d63965e377ea0be274f41.zip
Implement AndroidGradleIntegrationTest
Diffstat (limited to 'buildSrc/src/main/kotlin/org')
-rw-r--r--buildSrc/src/main/kotlin/org/jetbrains/projectUtils.kt16
1 files changed, 16 insertions, 0 deletions
diff --git a/buildSrc/src/main/kotlin/org/jetbrains/projectUtils.kt b/buildSrc/src/main/kotlin/org/jetbrains/projectUtils.kt
new file mode 100644
index 00000000..46d803a5
--- /dev/null
+++ b/buildSrc/src/main/kotlin/org/jetbrains/projectUtils.kt
@@ -0,0 +1,16 @@
+package org.jetbrains
+
+import org.gradle.api.Project
+
+fun Project.whenEvaluated(action: Project.() -> Unit) {
+ if (state.executed) {
+ action()
+ } else {
+ afterEvaluate { action() }
+ }
+}
+
+fun Project.invokeWhenEvaluated(action: (project: Project) -> Unit) {
+ whenEvaluated { action(this) }
+}
+