-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dedicated download task included, running the game/editor now depends…
… on running the build task if it exists. Assetstore url is no longer hardcoded, the configuration is used.
- Loading branch information
1 parent
520e0a7
commit 82877dd
Showing
9 changed files
with
101 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
The test suit must be down to as many individual classes as it is reasonable, to take advantage of multi threading! | ||
|
||
Every test should be done with both dsl-s, to verify that every user can handle the plugin. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package io.github.frontrider.godle.tasks | ||
|
||
import fi.linuxbox.gradle.download.Download | ||
import io.github.frontrider.godle.GodotCacheFolder | ||
import io.github.frontrider.godle.dsl.GodleExtension | ||
import org.gradle.workers.WorkerExecutor | ||
import java.io.File | ||
import javax.inject.Inject | ||
|
||
abstract class GodotDownload @Inject constructor(workerExecutor: WorkerExecutor?) :Download(workerExecutor) { | ||
|
||
init { | ||
val extension = project.extensions.getByName("godle") as GodleExtension | ||
val downloadConfig = extension.getDownloadConfig() | ||
|
||
val hasMono = downloadConfig.mono.get() | ||
val version = downloadConfig.godotVersion.get() | ||
val classifier = downloadConfig.classifier.get() | ||
val compressed = downloadConfig.isCompressed.get() | ||
val downloadPath = "${project.buildDir.absolutePath}/$GodotCacheFolder/" | ||
|
||
from.set(extension.getDownloadURL()) | ||
to.set( | ||
File( | ||
if (hasMono) { | ||
"${downloadPath}/Godot_mono_V${version}_$classifier" | ||
} else { | ||
"${downloadPath}/Godot_V${version}_$classifier" | ||
} + if (compressed) { | ||
".zip" | ||
} else { | ||
"" | ||
} | ||
) | ||
) | ||
//IF we already downloaded then this is up-to-date. | ||
outputs.upToDateWhen { | ||
to.get().asFile.exists() | ||
} | ||
|
||
} | ||
} |