All Downloads are FREE. Search and download functionalities are using the official Maven repository.

godot.gradle.tasks.graal.checkPresenceOfDefaultGraalJniConfig.kt Maven / Gradle / Ivy

There is a newer version: 0.11.0-4.3
Show newest version
package godot.gradle.tasks.graal

import godot.gradle.GodotExtension
import org.gradle.api.Project
import org.gradle.api.Task
import org.gradle.api.tasks.TaskProvider
import org.jetbrains.kotlin.gradle.internal.ensureParentDirsCreated
import java.io.InputStream

fun Project.checkPresenceOfDefaultGraalJniConfigTask(): TaskProvider {
    return tasks.register("createDefaultGraalJniConfigIfNotPresent") {
        with(it) {
            group = "godot-kotlin-jvm"
            description =
                "Checks if the default jni config for graalVM native image is present and creates it if it's not"

            doLast {
                copyToGraalFromPluginResourceIfDoesNotExists(
                    projectDir
                        .resolve("graal")
                        .resolve("godot-kotlin-graal-jni-config.json"),
                    "godot-kotlin-graal-jni-config.json"
                )
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy