a template for openrndr project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.7 KiB

# OPENRNDR template project
5 years ago
A feature rich template for creating OPENRNDR programs based on Gradle/Kts
The template consists of a configuration for Gradle and an example OPENRNDR program. The Gradle configuration should serve as the
go-to starting point for writing OPENRNDR-based software.
If you are looking at this from IntelliJ IDEA you can start by expanding the _project_ tab on the left. You will find a template program in `src/main/kotlin/TemplateProgram.kt`
You will find some [basic instructions](https://guide.openrndr.org/setUpYourFirstProgram.html) in the [OPENRNDR guide](https://guide.openrndr.org)
5 years ago
## Gradle tasks
5 years ago
- `run` runs the TemplateProgram
- `jar` creates an executable platform specific jar file with all dependencies
- `jpackageZip` creates a zip with a stand-alone executable for the current platform (works with Java 14 only)
5 years ago
## Cross builds
To create runnable jars for a platform different from the platform you use to build one uses `./gradlew jar --PtargetPlatform=<platform>`. The supported platforms are `windows`, `macos`, `linux-x64` and `linux-arm64`.
## Run other Kotlin programs from the command line
By default `./gradlew run` runs a program called `TemplateProgram.kt` but a different one can be provided as an argument:
To run `src/main/kotlin/myProgram.kt`
./gradlew -Popenrndr.application=MyProgramKt
To run `src/main/kotlin/foo/bar/myProgram.kt` (assuming `package foo.bar` in myProgram.kt)
./gradlew -Popenrndr.application=foo.bar.MyProgramKt
## Github Actions
This repository contains a number of Github Actions in `./github/workflows`.
The actions enable a basic build run on commit, plus publication actions that are executed when
a commit is tagged with a version number like `v0.*` or `v1.*`.