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

godot.gradle.tasks.setupBuildTask.kt Maven / Gradle / Ivy

The newest version!
package godot.gradle.tasks

import godot.gradle.projectExt.godotJvmExtension
import org.gradle.api.Project
import org.gradle.api.Task
import org.gradle.api.tasks.TaskProvider

fun Project.setupBuildTask(
    packageBootstrapJarTask: TaskProvider,
    packageMainJarTask: TaskProvider,
    deleteBuildLockTask: TaskProvider,
    packageBootstrapDexJarTask: TaskProvider,
    packageMainDexJarTask: TaskProvider,
    createGraalNativeImageTask: TaskProvider,
    createIOSTask: TaskProvider,
    createBuildLockTask: TaskProvider,
    generateGdIgnoreFilesTask: TaskProvider,
) {
    tasks.named("build") {
        with(it) {
            dependsOn(
                createBuildLockTask,
                packageBootstrapJarTask,
                packageMainJarTask,
                generateGdIgnoreFilesTask
            )

            finalizedBy(deleteBuildLockTask)
            if (godotJvmExtension.isAndroidExportEnabled.get()) {
                finalizedBy(packageBootstrapDexJarTask, packageMainDexJarTask)
            }
            if (godotJvmExtension.isGraalNativeImageExportEnabled.get()) {
                finalizedBy(createGraalNativeImageTask)
            }
            if (godotJvmExtension.isIOSExportEnabled.get()) {
                finalizedBy(createIOSTask)
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy