From 4a46eec06734a2c62f6cc288d25bf3eb92f9e95c Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Tue, 26 May 2020 11:15:44 -0400 Subject: [PATCH] Fix JNI Gradle --- buildSrc/src/main/kotlin/jni.gradle.kts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/buildSrc/src/main/kotlin/jni.gradle.kts b/buildSrc/src/main/kotlin/jni.gradle.kts index 21fe6f3..a15fc98 100644 --- a/buildSrc/src/main/kotlin/jni.gradle.kts +++ b/buildSrc/src/main/kotlin/jni.gradle.kts @@ -22,11 +22,14 @@ tasks.register("compileJNI") { jniPlatforms.forEach { val buildDir = File(cDir, "build-${it.name}") - if (!buildDir.exists()) { - buildDir.mkdir() - } tasks.register("cmake-${it.name}") { + doFirst { + if (!buildDir.exists()) { + buildDir.mkdir() + } + } + group = "jni" workingDir(buildDir)