File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
kt/plugins/godot-gradle-plugin/src/main/kotlin/godot/gradle/tasks Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -10,16 +10,15 @@ fun Project.generateGdIgnoreFilesTask(): TaskProvider<Task> {
1010 group = " godot-kotlin-jvm"
1111 description = " Generates .gdignore files to hide gradle files, kotlin build files and jre files from the godot editor."
1212
13- doFirst {
13+ // safety check: make sure that the target project has our plugin
14+ val hasPlugin = provider { pluginManager.hasPlugin(" com.utopia-rise.godot-kotlin-jvm" ) }
15+ onlyIf { hasPlugin.get() }
1416
15- // safety check: make sure that the target project has our plugin
16- if (! this .project.pluginManager.hasPlugin(" com.utopia-rise.godot-kotlin-jvm" )) {
17- // the target project doesn't seem to have our plugin; skip.
18- return @doFirst
19- }
17+ val projectDir = layout.projectDirectory.asFile
18+ val buildDirProvider = layout.buildDirectory.asFile
19+ doFirst {
2020
21- val projectDir = this .project.projectDir
22- val buildDir = this .project.layout.buildDirectory.asFile.get()
21+ val buildDir = buildDirProvider.get()
2322
2423 val targetDirSequence = sequenceOf(
2524 buildDir,
You can’t perform that action at this time.
0 commit comments