godot.gradle.tasks.setupBuildTask.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of godot-gradle-plugin Show documentation
Show all versions of godot-gradle-plugin Show documentation
Godot gradle plugin for kotlin language support.
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)
}
}
}
}