-
Notifications
You must be signed in to change notification settings - Fork 1
Home
frontrider edited this page Oct 30, 2023
·
9 revisions
Godle first and foremost allows you to link the version of godot
//use the named extension
godle{
}
//configure by class
configure<GodleExtension>{
//creates a blank project in the godotRoot folder.
createBlankProject = true
//configure the godot version of your choice.
version = `kotlin-jvm`("0.5.1-3.5.1")
//alternative kotlin handle for groovy.
version = kotlinJvm("0.5.1-3.5.1")
//the kotlin compat's second argument can disable automatic JVM detection.
//it will first check the current runtime's jvm (as in the JVM that runs gradle right now), then the environment.
`asKotlin-jvm`("0.5.1-3.5.1",false)
asGodot("3.5.1")
asMono("3.5.1")
//the folder where the godot project is located.
godotRoot.set(project.rootDir)
//environment variables for godot
env["my_key"] = "my_value"
env("my_key","my_value")
}
createBlankProject
will not erase any existing project files.
Godle will also generate a set of shell/batch scripts to launch the game and the editor without having to run gradle by hand, can be used to set shortcuts.
Downloading Godot is a base feature of the plugin, and is a convention to guarantee that every project you make is consistent with its own configuration. Bringing your own local binary is not supported by the plugin itself, but nothing should stop you from stepping out of this convention and opening the project with that.
Godle provides a number of tasks to work with.
-
cleanGodotAddons
: cleans the addon folder, so godle can download it again. -
installGodleAddons
: installs the currently configured addons -
godotDownload
: downloads the currently configured version of Godot. -
godotRunEditor
: runs the editor in thegodotRoot
folder (configured on the extension). It will open any projects in that folder. -
godotVersion
: prints the current Godot version. -
godotRunGame
: runs the game in thegodotRoot
folder (configured on the extension). It will open any projects in that folder. -
godleGenerateBindings
: Will produce native bindings for the currently downloaded version of godot. This can be used to set up bindings generation for that version of Godot.