Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@ fun Project.generateGdIgnoreFilesTask(): TaskProvider<Task> {
group = "godot-kotlin-jvm"
description = "Generates .gdignore files to hide gradle files, kotlin build files and jre files from the godot editor."

doFirst {
// safety check: make sure that the target project has our plugin
val hasPlugin = provider { pluginManager.hasPlugin("com.utopia-rise.godot-kotlin-jvm") }
onlyIf { hasPlugin.get() }

// safety check: make sure that the target project has our plugin
if (!this.project.pluginManager.hasPlugin("com.utopia-rise.godot-kotlin-jvm")) {
// the target project doesn't seem to have our plugin; skip.
return@doFirst
}
val projectDir = layout.projectDirectory.asFile
val buildDirProvider = layout.buildDirectory.asFile
doFirst {

val projectDir = this.project.projectDir
val buildDir = this.project.layout.buildDirectory.asFile.get()
val buildDir = buildDirProvider.get()

val targetDirSequence = sequenceOf(
buildDir,
Expand Down
Loading