This is a tutorial on setting up IntelliJ in such a way that it treats OPENRNDR, ORX and your template based work as a single inter-dependent project. This is useful in cases in which you want to make changes to OPENRND and ORX and be able to see their effect in your work immediately. Here immediately means without having to go through the process of running
gradle publishToMavenLocal -Prelease.version=0.4.0-SNAPSHOT. Composite projects are also convenient when you work with the debugger and want to set breakpoints inside OPENRNDR or ORX.
Step 1: clone repositories
mkdir composite cd composite git clone https://github.com/openrndr/openrndr git clone https://github.com/openrndr/orx git clone https://github.com/openrndr/openrndr-template
Note here that I make folder called
composite here, this will function as the top-level project in IntelliJ IDEA. You can pick whatever name you like for it.
Step 2: start IntelliJ IDEA
From terminal (but possible in other ways too), start IntelliJ. IntelliJ will treat our
compsite folder as a project. You probably need to install IntelliJ command-line tools for this work.
Step 3: Import gradle projects
For each of the modules
openrndr-template , and
orx locate the build.gradle or build.gradle.kts files and use “Import Gradle Project” on them.
Step 4: Configure composite builds
- Open the Gradle view on the right.
- Right click on
openrndr-templateand open “Composite Build Configuration”. Check both
- Right click on
orxand open “Composite Build Configuration”, check only
Step 5: Fix openrndr-template
I suspect this is an IntelliJ bug. In build.gradle.kts we have to change the line
implementation(openrndr("gl3")) otherwise the GL3 back-end cannot be resolved (for reasons unclear to me)
Step 6: Fix run configuration
When IntelliJ launches programs it will set the CWD to composite, so you will have to change the working directory to
That’s it. You should be able to run the template program while linking against the OPENRNDR and ORX versions in your composite project.