Test changes from branch
In order to test a change from a specific branch in your own project, you'll need to follow the following steps:
Warning
Before following these steps, make sure you've done a proper backup of your project! Things can and will break! So ensure you can easily rollback all changes applied to your project
Info
Building the project from source, requires that you've setup your system to be able to build godot. Follow the official documentation for the setup of your system!
Warning
If you republish changes locally under the same snapshot version, Gradle may keep using cached plugin artifacts in your demo project. In that case, rerun your demo build with --refresh-dependencies (for example ./gradlew --refresh-dependencies build) so the republished local artifacts are picked up.
- Ensure the
JAVA_HOMEenv variable is set. At least jdk 17 is required. - Check against which godot branch/tag the branch is built against. (
Check the Godot-JVM version you are branching from) - Check out godot:
git clone git@github.com:godotengine/godot.git --branch 4.3-stable --recursive - Move into the godot root:
cd godot - Check out our module:
git submodule add git@github.com:utopia-rise/godot-kotlin-jvm.git modules/kotlin_jvm - Move into the kotlin root of our module:
cd modules/kotlin_jvm/kt - Check out the branch you want:
git checkout <branch_name> - Locally deploy our module:
./gradlew publishArtifactsToMavenLocal - Move back to the godot root:
cd ../../.. - Build godot:
scons debug_symbols=yes dev_build=yes - Make sure your project's
settings.gradle.ktscontains:1 2 3 4 5 6 7 8 9 10
pluginManagement { repositories { mavenLocal() mavenCentral() gradlePluginPortal() google() } } rootProject.name = "your-project-name" - Check the version name which you've built:
ls ~/.m2/repository/com/utopia-rise/godot-gradle-plugin/It should be something like:0.10.0-4.3.0-d68f299-SNAPSHOT - Use that exact snapshot version in your project.
- Build your project
- Run your project with the editor binary you've built in step 10
You can find that binary in the godot root in the
binfolder, and it should look something like this:godot.macos.editor.dev.arm64