Compare commits
100 Commits
openrndr-t
...
feature-co
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e35d629a5a | ||
|
|
577e0c2f9a | ||
|
|
3350274efb | ||
|
|
a83e888dc3 | ||
|
|
498fd6773d | ||
|
|
d5702db78f | ||
|
|
d692d6998d | ||
|
|
3db83af277 | ||
|
|
29db13e82a | ||
|
|
a3c9178d4d | ||
|
|
84f54b3f4e | ||
|
|
4c9e1c552f | ||
|
|
e36cad040e | ||
|
|
ce3bf56b43 | ||
|
|
5ce3313da5 | ||
|
|
9695d5e8af | ||
|
|
5242dae526 | ||
|
|
d97e80c903 | ||
|
|
adf88e1062 | ||
|
|
eda66cc37a | ||
|
|
fa820c6d3c | ||
|
|
411b5f5b12 | ||
|
|
2f2d279e24 | ||
|
|
a35675fd03 | ||
|
|
2477ce7de8 | ||
|
|
0fd7a72d4f | ||
|
|
f907422a5e | ||
|
|
f3d8d0a3dc | ||
|
|
7d9065b818 | ||
|
|
36fc9c7908 | ||
|
|
8ed15ab6eb | ||
|
|
88c716804b | ||
|
|
f5763cca77 | ||
|
|
b84956b9aa | ||
|
|
2534cd25ff | ||
|
|
38c37d2df0 | ||
|
|
f3320b722b | ||
|
|
5aef63bad7 | ||
|
|
0ff4e26091 | ||
|
|
9716ffed5f | ||
|
|
a9b2f1859b | ||
|
|
a7fbe6f470 | ||
|
|
6944998cb6 | ||
|
|
b4dae00646 | ||
|
|
6210723148 | ||
|
|
2e9da10d4d | ||
|
|
35b8474c2d | ||
|
|
ea279f63a2 | ||
|
|
da2d9d3aa9 | ||
|
|
589a408709 | ||
|
|
d72cee08a9 | ||
|
|
2113b159fe | ||
|
|
16eb227741 | ||
|
|
4f1517a62f | ||
|
|
3ead34887e | ||
|
|
129626edbe | ||
|
|
89767de35a | ||
|
|
a26fd652d5 | ||
|
|
1620af58a3 | ||
|
|
1d51a766e1 | ||
|
|
0e76bcd431 | ||
|
|
01d45029e6 | ||
|
|
ff1942d2a8 | ||
|
|
cb6aa04f91 | ||
|
|
091115f49a | ||
|
|
3b957d53e3 | ||
|
|
4631eced38 | ||
|
|
63f10ce2bb | ||
|
|
29a0cbdd75 | ||
|
|
c340edab96 | ||
|
|
a42a2bd9a3 | ||
|
|
905c5f8b9d | ||
|
|
f0c25cb7f0 | ||
|
|
7cc1edb568 | ||
|
|
fd6333e264 | ||
|
|
787d0ab673 | ||
|
|
5756c29660 | ||
|
|
f80caf7acf | ||
|
|
f5d9accd71 | ||
|
|
71bb6c61c7 | ||
|
|
6ca525341e | ||
|
|
e16ae4334e | ||
|
|
975d4ee1a1 | ||
|
|
24a5f7f091 | ||
|
|
11dc0f71d9 | ||
|
|
0c82af93b2 | ||
|
|
6797934670 | ||
|
|
ad3b2f8c7c | ||
|
|
64aaa00524 | ||
|
|
34fac68d50 | ||
|
|
8553c8a4c8 | ||
|
|
e507fb7b35 | ||
|
|
180d85bd69 | ||
|
|
d1fbf470b2 | ||
|
|
e988a14f03 | ||
|
|
a02d3fc44f | ||
|
|
df1782f317 | ||
|
|
d103e206d2 | ||
|
|
ef25b9a101 | ||
|
|
acaa7ceeba |
15
.github/workflows/build-on-commit.yaml
vendored
15
.github/workflows/build-on-commit.yaml
vendored
@@ -5,11 +5,16 @@ on:
|
|||||||
- master
|
- master
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-java@v1
|
|
||||||
|
- uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
java-version: 14
|
distribution: 'temurin'
|
||||||
|
java-version: '17'
|
||||||
|
#cache: 'gradle'
|
||||||
|
|
||||||
- name: Build sources
|
- name: Build sources
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
|
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
name: Publish Linux/x64 binaries
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- v0.*
|
|
||||||
- v0.*.*
|
|
||||||
- v1.*
|
|
||||||
- v1.*.*
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up JDK 14
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: 14
|
|
||||||
- name: Build with Gradle
|
|
||||||
run: ./gradlew jpackageZip
|
|
||||||
- name: Create Release
|
|
||||||
uses: ncipollo/release-action@v1.6.1
|
|
||||||
id: create_release
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
allowUpdates: true
|
|
||||||
replaceArtifacts: false
|
|
||||||
body: Fully automated release
|
|
||||||
artifacts: "./build/distributions/openrndr-application-linux-x64.zip"
|
|
||||||
30
.github/workflows/publish-binaries-macos.yaml
vendored
30
.github/workflows/publish-binaries-macos.yaml
vendored
@@ -1,30 +0,0 @@
|
|||||||
name: Publish macOS binaries
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- v0.*
|
|
||||||
- v0.*.*
|
|
||||||
- v1.*
|
|
||||||
- v1.*.*
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: macos-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up JDK 14
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: 14
|
|
||||||
- name: Build with Gradle
|
|
||||||
run: ./gradlew jpackageZip
|
|
||||||
- name: Create Release
|
|
||||||
uses: ncipollo/release-action@v1.6.1
|
|
||||||
id: create_release
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
allowUpdates: true
|
|
||||||
replaceArtifacts: false
|
|
||||||
body: Fully automated release
|
|
||||||
artifacts: "./build/distributions/openrndr-application-macos.zip"
|
|
||||||
30
.github/workflows/publish-binaries-windows.yaml
vendored
30
.github/workflows/publish-binaries-windows.yaml
vendored
@@ -1,30 +0,0 @@
|
|||||||
name: Publish Windows binaries
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- v0.*
|
|
||||||
- v0.*.*
|
|
||||||
- v1.*
|
|
||||||
- v1.*.*
|
|
||||||
-
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up JDK 14
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: 14
|
|
||||||
- name: Build with Gradle
|
|
||||||
run: ./gradlew jpackageZip
|
|
||||||
- name: Create Release
|
|
||||||
uses: ncipollo/release-action@v1.6.1
|
|
||||||
id: create_release
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
allowUpdates: true
|
|
||||||
replaceArtifacts: false
|
|
||||||
body: Fully automated release
|
|
||||||
artifacts: "./build/distributions/openrndr-application-windows.zip"
|
|
||||||
59
.github/workflows/publish-binaries.yaml
vendored
Normal file
59
.github/workflows/publish-binaries.yaml
vendored
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
name: Publish binaries
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- v1.*
|
||||||
|
- v1.*.*
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
# Required to make env var work on Windows
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up JDK 17
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '17'
|
||||||
|
#cache: 'gradle'
|
||||||
|
|
||||||
|
- name: Build with Gradle
|
||||||
|
run: ./gradlew jpackageZip
|
||||||
|
|
||||||
|
- run: echo "OR_TARGET_NAME=linux-x64" >> $GITHUB_ENV
|
||||||
|
if: matrix.os == 'ubuntu-latest'
|
||||||
|
|
||||||
|
- run: echo "OR_TARGET_NAME=macos" >> $GITHUB_ENV
|
||||||
|
if: matrix.os == 'macos-latest'
|
||||||
|
|
||||||
|
- run: echo "OR_TARGET_NAME=windows" >> $GITHUB_ENV
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
|
|
||||||
|
- name: Rename jpackage zip
|
||||||
|
run: mv ./build/distributions/openrndr-application.zip ./build/distributions/openrndr-application-${{env.OR_TARGET_NAME}}.zip
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
uses: ncipollo/release-action@v1.12.0
|
||||||
|
id: create_release
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
allowUpdates: true
|
||||||
|
replacesArtifacts: false
|
||||||
|
body: Fully automated release
|
||||||
|
artifacts: "./build/distributions/openrndr-application-${{env.OR_TARGET_NAME}}.zip"
|
||||||
|
|
||||||
8
.gitignore
vendored
8
.gitignore
vendored
@@ -2,4 +2,10 @@ application.log
|
|||||||
build
|
build
|
||||||
out
|
out
|
||||||
.idea
|
.idea
|
||||||
.gradle
|
.gradle
|
||||||
|
video/
|
||||||
|
screenshots/
|
||||||
|
gui-parameters/
|
||||||
|
ffmpegOutput.txt
|
||||||
|
ShaderError.glsl
|
||||||
|
|
||||||
|
|||||||
68
README.md
68
README.md
@@ -1,24 +1,68 @@
|
|||||||
# OPENRNDR template project
|
# OPENRNDR template project
|
||||||
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
|
A feature rich template for creating OPENRNDR programs based on [Gradle/Kts](https://en.wikipedia.org/wiki/Gradle).
|
||||||
|
|
||||||
|
The template consists of a configuration for Gradle and two example OPENRNDR programs. The Gradle configuration should serve as the
|
||||||
go-to starting point for writing OPENRNDR-based software.
|
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`
|
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` and a live-coding example in `src/main/kotlin/TemplateLiveProgram.kt`.
|
||||||
|
|
||||||
You will find some [basic instructions](https://guide.openrndr.org/#/02_Getting_Started_with_OPENRNDR/C00_SetupYourFirstProgram) in the [OPENRNDR guide](https://guide.openrndr.org)
|
You will find some [basic instructions](https://guide.openrndr.org/setUpYourFirstProgram.html) in the [OPENRNDR guide](https://guide.openrndr.org)
|
||||||
|
|
||||||
## Gradle tasks
|
## Gradle tasks
|
||||||
- `run` runs the TemplateProgram
|
|
||||||
- `jar` creates an executable platform specific jar file with all dependencies
|
- `./gradlew run` runs the TemplateProgram (Use `gradlew.bat run` under Windows)
|
||||||
- `zipDistribution` creates a zip file containing the application jar and the data folder
|
- `./gradlew shadowJar` creates an executable platform specific jar file with all dependencies. Run the resulting program by typing `java -jar build/libs/openrndr-template-1.0.0-all.jar` in a terminal from the project root.
|
||||||
- `jpackageZip` creates a zip with a stand-alone executable for the current platform (works with Java 14 only)
|
- `./gradlew jpackageZip` creates a zip with a stand-alone executable for the current platform (works with Java 14 only)
|
||||||
|
|
||||||
## Cross builds
|
## 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`. Note that the `linux-arm64` platform will only work with OPENRNDR snapshot builds from master and OPENRNDR 0.3.39 (a future version).
|
|
||||||
|
To create a runnable jar for a platform different from your current platform, use `./gradlew jar -PtargetPlatform=<platform>`, where `<platform>` is either `windows`, `macos`, `linux-x64`, or `linux-arm64`.
|
||||||
|
|
||||||
|
## Updating OPENRNDR, ORX and other dependencies
|
||||||
|
|
||||||
|
The openrndr-template depends on various packages including the core [openrndr](https://github.com/openrndr/openrndr/) and the [orx](https://github.com/openrndr/orx/) extensions. The version numbers of these dependencies are specified in your [libs.versions.toml](gradle/libs.versions.toml) file. If you want to learn about file format visit the [Gradle documentation](https://docs.gradle.org/current/userguide/platforms.html#sub:conventional-dependencies-toml) website.
|
||||||
|
|
||||||
|
Newer versions of OPENRNDR and ORX bring useful features and bug fixes. The most recent versions are
|
||||||
|
<br> for OPENRNDR.
|
||||||
|
<br> for ORX.
|
||||||
|
|
||||||
|
Switch to the [next-version branch](https://github.com/openrndr/openrndr-template/tree/next-version) or enter these version numbers in your toml file. They can look like "0.4.3" or "0.4.3-alpha4". Use the complete string, as in:
|
||||||
|
|
||||||
|
openrndr = "0.4.3-alpha4"
|
||||||
|
orx = "0.4.3-alpha4"
|
||||||
|
|
||||||
|
You can add other dependencies needed by your project to your [build.gradle.kts](build.gradle.kts) file, inside the `dependencies { }` block.
|
||||||
|
|
||||||
|
Remember to reload the Gradle configuration after changing any dependencies.
|
||||||
|
|
||||||
|
## 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 run -Popenrndr.application=MyProgramKt
|
||||||
|
|
||||||
|
To run `src/main/kotlin/foo/bar/myProgram.kt` (assuming `package foo.bar` in myProgram.kt)
|
||||||
|
|
||||||
|
./gradlew run -Popenrndr.application=foo.bar.MyProgramKt
|
||||||
|
|
||||||
## Github Actions
|
## Github Actions
|
||||||
|
|
||||||
This repository contains a number of Github Actions in `./github/workflows`.
|
This repository contains a number of Github Actions under `./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.*`.
|
[build-on-commit.yaml](.github/workflows/build-on-commit.yaml) runs a basic build on every commit,
|
||||||
|
which can help detect issues in the source code.
|
||||||
|
|
||||||
|
[publish-binaries.yaml](.github/workflows/publish-binaries.yaml) publishes binaries for Linux, Mac and Windows
|
||||||
|
any time a commit is tagged with a version number like `v1.*`.
|
||||||
|
|
||||||
|
For example, we can create and push a tag with these git commands:
|
||||||
|
|
||||||
|
git tag -a v1.0.0 -m "v1.0.0"
|
||||||
|
git push origin v1.0.0
|
||||||
|
|
||||||
|
The progress of the running actions can be followed under the Actions tab in GitHub.
|
||||||
|
Once complete, the executables will be found under the Releases section.
|
||||||
|
|
||||||
|
|||||||
301
build.gradle.kts
301
build.gradle.kts
@@ -1,293 +1,28 @@
|
|||||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
||||||
import org.gradle.internal.os.OperatingSystem
|
|
||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
||||||
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
|
|
||||||
|
|
||||||
/* the name of this project, default is the template version but you are free to change these */
|
|
||||||
group = "org.openrndr.template"
|
group = "org.openrndr.template"
|
||||||
version = "0.3.15"
|
version = "1.0.0"
|
||||||
|
|
||||||
val applicationMainClass = "TemplateProgramKt"
|
|
||||||
|
|
||||||
/* Which additional (ORX) libraries should be added to this project. */
|
|
||||||
val orxFeatures = setOf(
|
|
||||||
// "orx-boofcv",
|
|
||||||
// "orx-camera",
|
|
||||||
// "orx-chataigne",
|
|
||||||
// "orx-color",
|
|
||||||
"orx-compositor",
|
|
||||||
// "orx-dnk3",
|
|
||||||
// "orx-easing",
|
|
||||||
// "orx-file-watcher",
|
|
||||||
// "orx-filter-extension",
|
|
||||||
"orx-fx",
|
|
||||||
// "orx-glslify",
|
|
||||||
// "orx-gradient-descent",
|
|
||||||
"orx-gui",
|
|
||||||
"orx-image-fit",
|
|
||||||
// "orx-integral-image",
|
|
||||||
// "orx-interval-tree",
|
|
||||||
// "orx-jumpflood",
|
|
||||||
// "orx-kdtree",
|
|
||||||
// "orx-keyframer",
|
|
||||||
// "orx-kinect-v1",
|
|
||||||
// "orx-kotlin-parser",
|
|
||||||
// "orx-mesh-generators",
|
|
||||||
// "orx-midi",
|
|
||||||
// "orx-no-clear",
|
|
||||||
"orx-noise",
|
|
||||||
// "orx-obj-loader",
|
|
||||||
"orx-olive",
|
|
||||||
// "orx-osc",
|
|
||||||
// "orx-palette",
|
|
||||||
"orx-panel",
|
|
||||||
// "orx-parameters",
|
|
||||||
// "orx-poisson-fill",
|
|
||||||
// "orx-rabbit-control",
|
|
||||||
// "orx-realsense2",
|
|
||||||
// "orx-runway",
|
|
||||||
"orx-shade-styles",
|
|
||||||
// "orx-shader-phrases",
|
|
||||||
// "orx-shapes",
|
|
||||||
// "orx-syphon",
|
|
||||||
// "orx-temporal-blur",
|
|
||||||
// "orx-tensorflow",
|
|
||||||
// "orx-time-operators",
|
|
||||||
// "orx-timer",
|
|
||||||
// "orx-triangulation",
|
|
||||||
// "orx-video-profiles",
|
|
||||||
null
|
|
||||||
).filterNotNull()
|
|
||||||
|
|
||||||
val ormlFeatures = setOf<String>(
|
|
||||||
// "orml-blazepose",
|
|
||||||
// "orml-dbface",
|
|
||||||
// "orml-facemesh",
|
|
||||||
// "orml-image-classifier",
|
|
||||||
// "orml-psenet",
|
|
||||||
// "orml-ssd",
|
|
||||||
// "orml-style-transfer",
|
|
||||||
// "orml-super-resolution",
|
|
||||||
// "orml-u2net"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
/* Which OPENRNDR libraries should be added to this project? */
|
|
||||||
val openrndrFeatures = setOf(
|
|
||||||
"video"
|
|
||||||
)
|
|
||||||
|
|
||||||
/* Which version of OPENRNDR and ORX should be used? */
|
|
||||||
val openrndrUseSnapshot = false
|
|
||||||
val openrndrVersion = if (openrndrUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.46"
|
|
||||||
|
|
||||||
val orxUseSnapshot = false
|
|
||||||
val orxVersion = if (orxUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.56"
|
|
||||||
|
|
||||||
val ormlUseSnapshot = false
|
|
||||||
val ormlVersion = if (ormlUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.0-rc.5"
|
|
||||||
|
|
||||||
// choices are "orx-tensorflow-gpu", "orx-tensorflow-mkl", "orx-tensorflow"
|
|
||||||
val orxTensorflowBackend = "orx-tensorflow-mkl"
|
|
||||||
|
|
||||||
//<editor-fold desc="This is code for OPENRNDR, no need to edit this .. most of the times">
|
|
||||||
val supportedPlatforms = setOf("windows", "macos", "linux-x64", "linux-arm64")
|
|
||||||
|
|
||||||
val openrndrOs = if (project.hasProperty("targetPlatform")) {
|
|
||||||
val platform : String = project.property("targetPlatform") as String
|
|
||||||
if (platform !in supportedPlatforms) {
|
|
||||||
throw IllegalArgumentException("target platform not supported: $platform")
|
|
||||||
} else {
|
|
||||||
platform
|
|
||||||
}
|
|
||||||
} else when (OperatingSystem.current()) {
|
|
||||||
OperatingSystem.WINDOWS -> "windows"
|
|
||||||
OperatingSystem.MAC_OS -> "macos"
|
|
||||||
OperatingSystem.LINUX -> when(val h = DefaultNativePlatform("current").architecture.name) {
|
|
||||||
"x86-64" -> "linux-x64"
|
|
||||||
"aarch64" -> "linux-arm64"
|
|
||||||
else ->throw IllegalArgumentException("architecture not supported: $h")
|
|
||||||
}
|
|
||||||
else -> throw IllegalArgumentException("os not supported")
|
|
||||||
}
|
|
||||||
//</editor-fold>
|
|
||||||
|
|
||||||
enum class Logging {
|
|
||||||
NONE,
|
|
||||||
SIMPLE,
|
|
||||||
FULL
|
|
||||||
}
|
|
||||||
|
|
||||||
/* What type of logging should this project use? */
|
|
||||||
val applicationLogging = Logging.FULL
|
|
||||||
|
|
||||||
val kotlinVersion = "1.4.31"
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
java
|
openrndr
|
||||||
kotlin("jvm") version("1.4.31")
|
|
||||||
id("com.github.johnrengelman.shadow") version ("6.1.0")
|
|
||||||
id("org.beryx.runtime") version ("1.11.4")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
openrndr {
|
||||||
mavenCentral()
|
openrndrVersion = libs.versions.openrndr.get()
|
||||||
if (openrndrUseSnapshot || orxUseSnapshot) {
|
orxVersion = libs.versions.orx.get()
|
||||||
mavenLocal()
|
orxFeatures = setOf(
|
||||||
}
|
libs.orx.olive,
|
||||||
maven(url = "https://dl.bintray.com/openrndr/openrndr")
|
libs.orx.color,
|
||||||
}
|
libs.orx.shapes,
|
||||||
|
libs.orx.gui,
|
||||||
fun DependencyHandler.orx(module: String): Any {
|
libs.orx.svg
|
||||||
return "org.openrndr.extra:$module:$orxVersion"
|
)
|
||||||
}
|
openrndrFeatures = setOf(
|
||||||
|
libs.openrndr.ffmpeg,
|
||||||
fun DependencyHandler.orml(module: String): Any {
|
libs.openrndr.gl3
|
||||||
return "org.openrndr.orml:$module:$ormlVersion"
|
)
|
||||||
}
|
mainClass = "TemplateProgramKt"
|
||||||
|
|
||||||
fun DependencyHandler.openrndr(module: String): Any {
|
|
||||||
return "org.openrndr:openrndr-$module:$openrndrVersion"
|
|
||||||
}
|
|
||||||
|
|
||||||
fun DependencyHandler.openrndrNatives(module: String): Any {
|
|
||||||
return "org.openrndr:openrndr-$module-natives-$openrndrOs:$openrndrVersion"
|
|
||||||
}
|
|
||||||
|
|
||||||
fun DependencyHandler.orxNatives(module: String): Any {
|
|
||||||
return "org.openrndr.extra:$module-natives-$openrndrOs:$orxVersion"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
/* This is where you add additional (third-party) dependencies */
|
implementation(libs.csv)
|
||||||
|
|
||||||
// implementation("org.jsoup:jsoup:1.12.2")
|
|
||||||
// implementation("com.google.code.gson:gson:2.8.6")
|
|
||||||
|
|
||||||
runtimeOnly(openrndr("gl3"))
|
|
||||||
runtimeOnly(openrndrNatives("gl3"))
|
|
||||||
implementation(openrndr("openal"))
|
|
||||||
runtimeOnly(openrndrNatives("openal"))
|
|
||||||
implementation(openrndr("core"))
|
|
||||||
implementation(openrndr("svg"))
|
|
||||||
implementation(openrndr("animatable"))
|
|
||||||
implementation(openrndr("extensions"))
|
|
||||||
implementation(openrndr("filter"))
|
|
||||||
|
|
||||||
implementation("org.jetbrains.kotlinx", "kotlinx-coroutines-core","1.4.2")
|
|
||||||
implementation("io.github.microutils", "kotlin-logging-jvm","2.0.4")
|
|
||||||
|
|
||||||
when(applicationLogging) {
|
|
||||||
Logging.NONE -> {
|
|
||||||
runtimeOnly("org.slf4j","slf4j-nop","1.7.30")
|
|
||||||
}
|
|
||||||
Logging.SIMPLE -> {
|
|
||||||
runtimeOnly("org.slf4j","slf4j-simple","1.7.30")
|
|
||||||
}
|
|
||||||
Logging.FULL -> {
|
|
||||||
runtimeOnly("org.apache.logging.log4j", "log4j-slf4j-impl", "2.13.3")
|
|
||||||
runtimeOnly("com.fasterxml.jackson.core", "jackson-databind", "2.11.1")
|
|
||||||
runtimeOnly("com.fasterxml.jackson.dataformat", "jackson-dataformat-yaml", "2.11.1")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ("video" in openrndrFeatures) {
|
|
||||||
implementation(openrndr("ffmpeg"))
|
|
||||||
runtimeOnly(openrndrNatives("ffmpeg"))
|
|
||||||
}
|
|
||||||
|
|
||||||
for (feature in orxFeatures) {
|
|
||||||
implementation(orx(feature))
|
|
||||||
}
|
|
||||||
|
|
||||||
for (feature in ormlFeatures) {
|
|
||||||
implementation(orml(feature))
|
|
||||||
}
|
|
||||||
|
|
||||||
if ("orx-tensorflow" in orxFeatures) {
|
|
||||||
runtimeOnly("org.openrndr.extra:$orxTensorflowBackend-natives-$openrndrOs:$orxVersion")
|
|
||||||
}
|
|
||||||
|
|
||||||
if ("orx-kinect-v1" in orxFeatures) {
|
|
||||||
runtimeOnly(orxNatives("orx-kinect-v1"))
|
|
||||||
}
|
|
||||||
|
|
||||||
if ("orx-olive" in orxFeatures) {
|
|
||||||
implementation("org.jetbrains.kotlin:kotlin-script-runtime:$kotlinVersion")
|
|
||||||
}
|
|
||||||
|
|
||||||
implementation(kotlin("stdlib-jdk8"))
|
|
||||||
testImplementation("junit", "junit", "4.12")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
configure<JavaPluginConvention> {
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
||||||
}
|
|
||||||
tasks.withType<KotlinCompile> {
|
|
||||||
kotlinOptions.jvmTarget = "1.8"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
project.setProperty("mainClassName", applicationMainClass)
|
|
||||||
tasks {
|
|
||||||
named<ShadowJar>("shadowJar") {
|
|
||||||
manifest {
|
|
||||||
attributes["Main-Class"] = applicationMainClass
|
|
||||||
}
|
|
||||||
minimize {
|
|
||||||
exclude(dependency("org.openrndr:openrndr-gl3:.*"))
|
|
||||||
exclude(dependency("org.jetbrains.kotlin:kotlin-reflect:.*"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
named<org.beryx.runtime.JPackageTask>("jpackage") {
|
|
||||||
doLast {
|
|
||||||
when (OperatingSystem.current()) {
|
|
||||||
OperatingSystem.WINDOWS, OperatingSystem.LINUX -> {
|
|
||||||
copy {
|
|
||||||
from("data") {
|
|
||||||
include("**/*")
|
|
||||||
}
|
|
||||||
into("build/jpackage/openrndr-application/data")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
OperatingSystem.MAC_OS -> {
|
|
||||||
copy {
|
|
||||||
from("data") {
|
|
||||||
include("**/*")
|
|
||||||
}
|
|
||||||
into("build/jpackage/openrndr-application.app/data")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register<Zip>("jpackageZip") {
|
|
||||||
archiveFileName.set("openrndr-application-$openrndrOs.zip")
|
|
||||||
from("$buildDir/jpackage") {
|
|
||||||
include("**/*")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
tasks.findByName("jpackageZip")?.dependsOn("jpackage")
|
|
||||||
|
|
||||||
runtime {
|
|
||||||
jpackage {
|
|
||||||
imageName = "openrndr-application"
|
|
||||||
skipInstaller = true
|
|
||||||
if (OperatingSystem.current() == OperatingSystem.MAC_OS) {
|
|
||||||
jvmArgs.add("-XstartOnFirstThread")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
options.empty()
|
|
||||||
options.add("--strip-debug")
|
|
||||||
options.add("--compress")
|
|
||||||
options.add("1")
|
|
||||||
options.add("--no-header-files")
|
|
||||||
options.add("--no-man-pages")
|
|
||||||
modules.empty()
|
|
||||||
modules.add("jdk.unsupported")
|
|
||||||
modules.add("java.management")
|
|
||||||
}
|
|
||||||
|
|||||||
29
buildSrc/build.gradle.kts
Normal file
29
buildSrc/build.gradle.kts
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
plugins {
|
||||||
|
`kotlin-dsl`
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
mavenLocal()
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(libs.kotlin.gradle.plugin)
|
||||||
|
|
||||||
|
implementation(libs.shadow.gradle.plugin)
|
||||||
|
implementation(libs.runtime.gradle.plugin)
|
||||||
|
|
||||||
|
//implementation(libs.kotlin.serialization.gradle.plugin)
|
||||||
|
// https://github.com/gradle/gradle/issues/15383#issuecomment-779893192
|
||||||
|
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
|
||||||
|
}
|
||||||
|
|
||||||
|
gradlePlugin {
|
||||||
|
plugins {
|
||||||
|
register("openrndr-plugin") {
|
||||||
|
id = "openrndr"
|
||||||
|
implementationClass = "org.openrndr.template.OpenrndrPlugin"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
7
buildSrc/settings.gradle.kts
Normal file
7
buildSrc/settings.gradle.kts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
dependencyResolutionManagement {
|
||||||
|
versionCatalogs {
|
||||||
|
create("libs") {
|
||||||
|
from(files("../gradle/libs.versions.toml"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
package org.openrndr.template.convention
|
||||||
|
import org.gradle.accessors.dm.LibrariesForLibs
|
||||||
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||||
|
import org.gradle.internal.os.OperatingSystem
|
||||||
|
|
||||||
|
val libs = the<LibrariesForLibs>()
|
||||||
|
|
||||||
|
var applicationMainClass: String = "setme"
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
kotlin("jvm")
|
||||||
|
id("com.github.johnrengelman.shadow")
|
||||||
|
id("org.beryx.runtime")
|
||||||
|
application
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks {
|
||||||
|
named<ShadowJar>("shadowJar") {
|
||||||
|
manifest {
|
||||||
|
attributes["Main-Class"] = application.mainClass.get()
|
||||||
|
attributes["Implementation-Version"] = project.version
|
||||||
|
}
|
||||||
|
minimize {
|
||||||
|
exclude(dependency("org.openrndr:openrndr-gl3:.*"))
|
||||||
|
exclude(dependency("org.jetbrains.kotlin:kotlin-reflect:.*"))
|
||||||
|
exclude(dependency("org.slf4j:slf4j-simple:.*"))
|
||||||
|
exclude(dependency("org.apache.logging.log4j:log4j-slf4j2-impl:.*"))
|
||||||
|
exclude(dependency("com.fasterxml.jackson.core:jackson-databind:.*"))
|
||||||
|
exclude(dependency("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:.*"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
named<org.beryx.runtime.JPackageTask>("jpackage") {
|
||||||
|
doLast {
|
||||||
|
val destPath = if(OperatingSystem.current().isMacOsX)
|
||||||
|
"build/jpackage/openrndr-application.app/Contents/Resources/data"
|
||||||
|
else
|
||||||
|
"build/jpackage/openrndr-application/data"
|
||||||
|
|
||||||
|
copy {
|
||||||
|
from("data") {
|
||||||
|
include("**/*")
|
||||||
|
}
|
||||||
|
into(destPath)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register<Zip>("jpackageZip") {
|
||||||
|
archiveFileName.set("openrndr-application.zip")
|
||||||
|
from("${layout.buildDirectory.get()}/jpackage") {
|
||||||
|
include("**/*")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tasks.findByName("jpackageZip")?.dependsOn("jpackage")
|
||||||
|
|
||||||
|
runtime {
|
||||||
|
jpackage {
|
||||||
|
imageName = "openrndr-application"
|
||||||
|
skipInstaller = true
|
||||||
|
if (OperatingSystem.current().isMacOsX) {
|
||||||
|
jvmArgs.add("-XstartOnFirstThread")
|
||||||
|
jvmArgs.add("-Duser.dir=${"$"}APPDIR/../Resources")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
options.set(listOf("--strip-debug", "--compress", "1", "--no-header-files", "--no-man-pages"))
|
||||||
|
modules.set(listOf("jdk.unsupported", "java.management", "java.desktop"))
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package org.openrndr.template.convention
|
||||||
|
import org.gradle.accessors.dm.LibrariesForLibs
|
||||||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
|
|
||||||
|
val libs = the<LibrariesForLibs>()
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
kotlin("jvm")
|
||||||
|
application
|
||||||
|
}
|
||||||
|
|
||||||
|
//application {
|
||||||
|
// if (hasProperty("openrndr.application")) {
|
||||||
|
// mainClass.set("${property("openrndr.application")}")
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
tasks.withType<KotlinCompile> {
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = "17"
|
||||||
|
}
|
||||||
|
compilerOptions {
|
||||||
|
jvmTarget.set(JvmTarget.valueOf("JVM_${libs.versions.jvmTarget.get()}"))
|
||||||
|
freeCompilerArgs.add("-Xjdk-release=${libs.versions.jvmTarget.get()}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
java {
|
||||||
|
sourceCompatibility = JavaVersion.valueOf("VERSION_${libs.versions.jvmTarget.get()}")
|
||||||
|
targetCompatibility = JavaVersion.valueOf("VERSION_${libs.versions.jvmTarget.get()}")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
mavenLocal()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(libs.kotlinx.coroutines.core)
|
||||||
|
implementation(libs.slf4j.api)
|
||||||
|
implementation(libs.kotlin.logging)
|
||||||
|
|
||||||
|
implementation(libs.openrndr.application)
|
||||||
|
implementation(libs.openrndr.animatable)
|
||||||
|
implementation(libs.openrndr.dialogs)
|
||||||
|
implementation(libs.openrndr.extensions)
|
||||||
|
}
|
||||||
163
buildSrc/src/main/kotlin/org/openrndr/template/openrndr.kt
Normal file
163
buildSrc/src/main/kotlin/org/openrndr/template/openrndr.kt
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
package org.openrndr.template
|
||||||
|
|
||||||
|
import org.gradle.api.Plugin
|
||||||
|
import org.gradle.api.Project
|
||||||
|
import org.gradle.api.ProjectEvaluationListener
|
||||||
|
import org.gradle.api.ProjectState
|
||||||
|
import org.gradle.api.artifacts.DependencyResolutionListener
|
||||||
|
import org.gradle.api.artifacts.MinimalExternalModuleDependency
|
||||||
|
import org.gradle.api.artifacts.ResolvableDependencies
|
||||||
|
import org.gradle.api.provider.Property
|
||||||
|
import org.gradle.api.provider.Provider
|
||||||
|
import org.gradle.api.provider.SetProperty
|
||||||
|
import org.gradle.internal.os.OperatingSystem
|
||||||
|
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
|
||||||
|
import java.io.File
|
||||||
|
|
||||||
|
interface OpenrndrPluginExtension {
|
||||||
|
val openrndrVersion: Property<String>
|
||||||
|
val orxVersion: Property<String>
|
||||||
|
val openrndrFeatures: SetProperty<Provider<MinimalExternalModuleDependency>>
|
||||||
|
val orxFeatures: SetProperty<Provider<MinimalExternalModuleDependency>>
|
||||||
|
val mainClass: Property<String>
|
||||||
|
}
|
||||||
|
|
||||||
|
class OpenrndrPlugin : Plugin<Project> {
|
||||||
|
override fun apply(target: Project) {
|
||||||
|
val extension = target.extensions.create("openrndr", OpenrndrPluginExtension::class.java)
|
||||||
|
|
||||||
|
// Install the convention plugins
|
||||||
|
run {
|
||||||
|
target.plugins.apply("org.openrndr.template.convention.openrndr-jvm")
|
||||||
|
target.plugins.apply("org.openrndr.template.convention.distribution-jvm")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Configure the application mainClass
|
||||||
|
run {
|
||||||
|
val app =
|
||||||
|
(target as org.gradle.api.plugins.ExtensionAware).extensions.getByName("application") as org.gradle.api.plugins.JavaApplication
|
||||||
|
app.mainClass.set(extension.mainClass)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Install the OPENRNDR tasks
|
||||||
|
run {
|
||||||
|
target.gradle.addListener(object : ProjectEvaluationListener {
|
||||||
|
override fun beforeEvaluate(project: Project) {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun afterEvaluate(project: Project, state: ProjectState) {
|
||||||
|
if (target.properties["openrndr.tasks"] == "true") {
|
||||||
|
target.task("create executable jar for ${extension.mainClass.get()}") {
|
||||||
|
group = " \uD83E\uDD8C OPENRNDR"
|
||||||
|
dependsOn("shadowJar")
|
||||||
|
}
|
||||||
|
|
||||||
|
target.task("run $${extension.mainClass.get()}") {
|
||||||
|
group = " \uD83E\uDD8C OPENRNDR"
|
||||||
|
dependsOn("run")
|
||||||
|
}
|
||||||
|
|
||||||
|
target.task("create standalone executable for ${extension.mainClass.get()}") {
|
||||||
|
group = " \uD83E\uDD8C OPENRNDR"
|
||||||
|
dependsOn("jpackageZip")
|
||||||
|
}
|
||||||
|
|
||||||
|
target.task("add IDE file scopes") {
|
||||||
|
group = " \uD83E\uDD8C OPENRNDR"
|
||||||
|
val scopesFolder = File("${project.projectDir}/.idea/scopes")
|
||||||
|
scopesFolder.mkdirs()
|
||||||
|
|
||||||
|
val files = listOf(
|
||||||
|
"Code" to "file:*.kt||file:*.frag||file:*.vert||file:*.glsl",
|
||||||
|
"Text" to "file:*.txt||file:*.md||file:*.xml||file:*.json",
|
||||||
|
"Gradle" to "file[*buildSrc*]:*/||file:*gradle.*||file:*.gradle||file:*/gradle-wrapper.properties||file:*.toml",
|
||||||
|
"Media" to "file:*.png||file:*.jpg||file:*.dds||file:*.exr||file:*.mp3||file:*.wav||file:*.mp4||file:*.mov||file:*.svg"
|
||||||
|
)
|
||||||
|
files.forEach { (name, pattern) ->
|
||||||
|
val file = File(scopesFolder, "__$name.xml")
|
||||||
|
if (!file.exists()) {
|
||||||
|
file.writeText(
|
||||||
|
"""
|
||||||
|
<component name="DependencyValidationManager">
|
||||||
|
<scope name=" ★ $name" pattern="$pattern" />
|
||||||
|
</component>
|
||||||
|
""".trimIndent()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Dynamically configure dependencies from openrndrFeatures and orxFeatures
|
||||||
|
run {
|
||||||
|
val currArch = DefaultNativePlatform("current").architecture.name
|
||||||
|
val currOs = OperatingSystem.current()
|
||||||
|
val os = if (target.hasProperty("targetPlatform")) {
|
||||||
|
val supportedPlatforms = setOf("windows", "macos", "macos-arm64", "linux-x64", "linux-arm64")
|
||||||
|
val platform: String = target.property("targetPlatform") as String
|
||||||
|
if (platform !in supportedPlatforms) {
|
||||||
|
throw IllegalArgumentException("target platform not supported: $platform")
|
||||||
|
} else {
|
||||||
|
platform
|
||||||
|
}
|
||||||
|
} else when {
|
||||||
|
currOs.isWindows -> "windows"
|
||||||
|
currOs.isMacOsX -> when (currArch) {
|
||||||
|
"aarch64", "arm-v8" -> "macos-arm64"
|
||||||
|
else -> "macos"
|
||||||
|
}
|
||||||
|
currOs.isLinux -> when (currArch) {
|
||||||
|
"x86-64" -> "linux-x64"
|
||||||
|
"aarch64" -> "linux-arm64"
|
||||||
|
else -> throw IllegalArgumentException("architecture not supported: $currArch")
|
||||||
|
}
|
||||||
|
else -> throw IllegalArgumentException("os not supported: ${currOs.name}")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
target.gradle.addListener(object : DependencyResolutionListener {
|
||||||
|
override fun beforeResolve(dependencies: ResolvableDependencies) {
|
||||||
|
for (feature in extension.orxFeatures.get()) {
|
||||||
|
target.dependencies.add("implementation", feature)
|
||||||
|
}
|
||||||
|
|
||||||
|
for (feature in extension.openrndrFeatures.get()) {
|
||||||
|
target.dependencies.add("implementation", feature)
|
||||||
|
val dep = feature.get()
|
||||||
|
when (dep.name) {
|
||||||
|
"openrndr-ffmpeg" -> target.dependencies.add(
|
||||||
|
"runtimeOnly",
|
||||||
|
"${dep.group}:${dep.name}-natives-$os:${dep.version}"
|
||||||
|
)
|
||||||
|
|
||||||
|
"openrndr-gl3" -> target.dependencies.add(
|
||||||
|
"runtimeOnly",
|
||||||
|
"${dep.group}:${dep.name}-natives-$os:${dep.version}"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (feature in extension.orxFeatures.get()) {
|
||||||
|
target.dependencies.add("implementation", feature)
|
||||||
|
val dep = feature.get()
|
||||||
|
when (dep.name) {
|
||||||
|
"orx-kinect-v1" -> target.dependencies.add(
|
||||||
|
"runtimeOnly",
|
||||||
|
"${dep.group}:${dep.name}-natives-$os:${dep.version}"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
target.gradle.removeListener(this)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun afterResolve(dependencies: ResolvableDependencies) {
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1 +1,4 @@
|
|||||||
kotlin.code.style=official
|
openrndr.tasks=true
|
||||||
|
kotlin.code.style=official
|
||||||
|
#org.gradle.configuration-cache=true
|
||||||
|
#org.gradle.configuration-cache.problems=warn
|
||||||
74
gradle/libs.versions.toml
Normal file
74
gradle/libs.versions.toml
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
[versions]
|
||||||
|
kotlin = "2.0.0"
|
||||||
|
openrndr = "0.4.5-SNAPSHOT"
|
||||||
|
orx = "0.4.5-SNAPSHOT"
|
||||||
|
orml = "0.4.1"
|
||||||
|
jvmTarget = "17"
|
||||||
|
|
||||||
|
|
||||||
|
slf4j = "2.0.13"
|
||||||
|
log4j = "2.23.1"
|
||||||
|
jackson = "2.17.1"
|
||||||
|
|
||||||
|
[libraries]
|
||||||
|
kotlin-script-runtime = { group = "org.jetbrains.kotlin", name = "kotlin-script-runtime", version.ref = "kotlin" }
|
||||||
|
kotlin-gradle-plugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
|
||||||
|
|
||||||
|
slf4j-api = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j" }
|
||||||
|
slf4j-nop = { group = "org.slf4j", name = "slf4j-nop", version.ref = "slf4j" }
|
||||||
|
slf4j-simple = { group = "org.slf4j", name = "slf4j-simple", version.ref = "slf4j" }
|
||||||
|
log4j-slf4j2 = { group = "org.apache.logging.log4j", name = "log4j-slf4j2-impl", version.ref = "log4j" }
|
||||||
|
log4j-core = { group = "org.apache.logging.log4j", name = "log4j-core", version.ref = "log4j" }
|
||||||
|
jackson-databind = { group = "com.fasterxml.jackson.core", name = "jackson-databind", version.ref = "jackson" }
|
||||||
|
jackson-json = { group = "com.fasterxml.jackson.dataformat", name = "jackson-dataformat-yaml", version.ref = "jackson" }
|
||||||
|
|
||||||
|
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version = "1.8.1" }
|
||||||
|
kotlin-logging = { group = "io.github.oshai", name = "kotlin-logging", version = "6.0.9" }
|
||||||
|
junit = { group = "junit", name = "junit", version = "4.13.2" }
|
||||||
|
jsoup = { group = "org.jsoup", name = "jsoup", version = "1.17.2" }
|
||||||
|
gson = { group = "com.google.code.gson", name = "gson", version = "2.11.1" }
|
||||||
|
csv = { group = "com.github.doyaaaaaken", name = "kotlin-csv-jvm", version = "1.9.3" }
|
||||||
|
|
||||||
|
openrndr-animatable = { group = "org.openrndr", name = "openrndr-animatable", version.ref = "openrndr" }
|
||||||
|
openrndr-application = { group = "org.openrndr", name = "openrndr-application", version.ref = "openrndr" }
|
||||||
|
openrndr-binpack = { group = "org.openrndr", name = "openrndr-binpack", version.ref = "openrndr" }
|
||||||
|
openrndr-dialogs = { group = "org.openrndr", name = "openrndr-dialogs", version.ref = "openrndr" }
|
||||||
|
openrndr-event = { group = "org.openrndr", name = "openrndr-event", version.ref = "openrndr" }
|
||||||
|
openrndr-extensions = { group = "org.openrndr", name = "openrndr-extensions", version.ref = "openrndr" }
|
||||||
|
openrndr-filter = { group = "org.openrndr", name = "openrndr-filter", version.ref = "openrndr" }
|
||||||
|
openrndr-gl3 = { group = "org.openrndr", name = "openrndr-gl3", version.ref = "openrndr" }
|
||||||
|
openrndr-math = { group = "org.openrndr", name = "openrndr-math", version.ref = "openrndr" }
|
||||||
|
openrndr-ffmpeg = { group = "org.openrndr", name = "openrndr-ffmpeg", version.ref = "openrndr" }
|
||||||
|
openrndr-nullgl = { group = "org.openrndr", name = "openrndr-nullgl", version.ref = "openrndr" }
|
||||||
|
|
||||||
|
|
||||||
|
orx-camera = { group = "org.openrndr.extra", name = "orx-camera", version.ref = "orx" }
|
||||||
|
orx-color = { group = "org.openrndr.extra", name = "orx-color", version.ref = "orx" }
|
||||||
|
orx-compositor = { group = "org.openrndr.extra", name = "orx-compositor", version.ref = "orx" }
|
||||||
|
orx-delegate-magic = { group = "org.openrndr.extra", name = " orx-delegate-magic", version.ref = "orx" }
|
||||||
|
orx-envelopes = { group = "org.openrndr.extra", name = "orx-envelopes", version.ref = "orx" }
|
||||||
|
orx-fx = { group = "org.openrndr.extra", name = "orx-fx", version.ref = "orx" }
|
||||||
|
orx-gui = { group = "org.openrndr.extra", name = "orx-gui", version.ref = "orx" }
|
||||||
|
orx-image-fit = { group = "org.openrndr.extra", name = "orx-image-fit", version.ref = "orx" }
|
||||||
|
orx-no-clear = { group = "org.openrndr.extra", name = "orx-no-clear", version.ref = "orx" }
|
||||||
|
orx-noise = { group = "org.openrndr.extra", name = "orx-noise", version.ref = "orx" }
|
||||||
|
orx-olive = { group = "org.openrndr.extra", name = "orx-olive", version.ref = "orx" }
|
||||||
|
orx-panel = { group = "org.openrndr.extra", name = "orx-panel", version.ref = "orx" }
|
||||||
|
orx-shade-styles = { group = "org.openrndr.extra", name = "orx-shade-styles", version.ref = "orx" }
|
||||||
|
orx-shapes = { group = "org.openrndr.extra", name = "orx-shapes", version.ref = "orx" }
|
||||||
|
orx-svg = { group = "org.openrndr.extra", name = "orx-svg", version.ref = "orx" }
|
||||||
|
|
||||||
|
orx-video-profiles = { group = "org.openrndr.extra", name = "orx-video-profiles", version.ref = "orx" }
|
||||||
|
orx-view-box = { group = "org.openrndr.extra", name = "orx-view-box", version.ref = "orx" }
|
||||||
|
|
||||||
|
shadow-gradle-plugin = { group = "com.github.johnrengelman", name = "shadow", version = "8.1.1" }
|
||||||
|
runtime-gradle-plugin = { group = "org.beryx", name = "badass-runtime-plugin", version = "1.13.0" }
|
||||||
|
|
||||||
|
|
||||||
|
[plugins]
|
||||||
|
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
||||||
|
|
||||||
|
shadow = { id = "com.github.johnrengelman.shadow", version = "8.1.1" }
|
||||||
|
runtime = { id = "org.beryx.runtime", version = "1.13.1" }
|
||||||
|
gitarchive-tomarkdown = { id = "org.openrndr.extra.gitarchiver.tomarkdown", version.ref = "orx" }
|
||||||
|
versions = { id = "com.github.ben-manes.versions", version = "0.50.0" }
|
||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||||
|
networkTimeout=10000
|
||||||
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
294
gradlew
vendored
294
gradlew
vendored
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env sh
|
#!/bin/sh
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright 2015 the original author or authors.
|
# Copyright © 2015-2021 the original authors.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
@@ -17,67 +17,99 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
##
|
#
|
||||||
## Gradle start up script for UN*X
|
# Gradle start up script for POSIX generated by Gradle.
|
||||||
##
|
#
|
||||||
|
# Important for running:
|
||||||
|
#
|
||||||
|
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||||
|
# noncompliant, but you have some other compliant shell such as ksh or
|
||||||
|
# bash, then to run this script, type that shell name before the whole
|
||||||
|
# command line, like:
|
||||||
|
#
|
||||||
|
# ksh Gradle
|
||||||
|
#
|
||||||
|
# Busybox and similar reduced shells will NOT work, because this script
|
||||||
|
# requires all of these POSIX shell features:
|
||||||
|
# * functions;
|
||||||
|
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||||
|
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||||
|
# * compound commands having a testable exit status, especially «case»;
|
||||||
|
# * various built-in commands including «command», «set», and «ulimit».
|
||||||
|
#
|
||||||
|
# Important for patching:
|
||||||
|
#
|
||||||
|
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||||
|
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||||
|
#
|
||||||
|
# The "traditional" practice of packing multiple parameters into a
|
||||||
|
# space-separated string is a well documented source of bugs and security
|
||||||
|
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||||
|
# options in "$@", and eventually passing that to Java.
|
||||||
|
#
|
||||||
|
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||||
|
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||||
|
# see the in-line comments for details.
|
||||||
|
#
|
||||||
|
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||||
|
# Darwin, MinGW, and NonStop.
|
||||||
|
#
|
||||||
|
# (3) This script is generated from the Groovy template
|
||||||
|
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
|
# within the Gradle project.
|
||||||
|
#
|
||||||
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
# Attempt to set APP_HOME
|
# Attempt to set APP_HOME
|
||||||
|
|
||||||
# Resolve links: $0 may be a link
|
# Resolve links: $0 may be a link
|
||||||
PRG="$0"
|
app_path=$0
|
||||||
# Need this for relative symlinks.
|
|
||||||
while [ -h "$PRG" ] ; do
|
# Need this for daisy-chained symlinks.
|
||||||
ls=`ls -ld "$PRG"`
|
while
|
||||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||||
if expr "$link" : '/.*' > /dev/null; then
|
[ -h "$app_path" ]
|
||||||
PRG="$link"
|
do
|
||||||
else
|
ls=$( ls -ld "$app_path" )
|
||||||
PRG=`dirname "$PRG"`"/$link"
|
link=${ls#*' -> '}
|
||||||
fi
|
case $link in #(
|
||||||
|
/*) app_path=$link ;; #(
|
||||||
|
*) app_path=$APP_HOME$link ;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
SAVED="`pwd`"
|
|
||||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
|
||||||
APP_HOME="`pwd -P`"
|
|
||||||
cd "$SAVED" >/dev/null
|
|
||||||
|
|
||||||
APP_NAME="Gradle"
|
# This is normally unused
|
||||||
APP_BASE_NAME=`basename "$0"`
|
# shellcheck disable=SC2034
|
||||||
|
APP_BASE_NAME=${0##*/}
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD="maximum"
|
MAX_FD=maximum
|
||||||
|
|
||||||
warn () {
|
warn () {
|
||||||
echo "$*"
|
echo "$*"
|
||||||
}
|
} >&2
|
||||||
|
|
||||||
die () {
|
die () {
|
||||||
echo
|
echo
|
||||||
echo "$*"
|
echo "$*"
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
}
|
} >&2
|
||||||
|
|
||||||
# OS specific support (must be 'true' or 'false').
|
# OS specific support (must be 'true' or 'false').
|
||||||
cygwin=false
|
cygwin=false
|
||||||
msys=false
|
msys=false
|
||||||
darwin=false
|
darwin=false
|
||||||
nonstop=false
|
nonstop=false
|
||||||
case "`uname`" in
|
case "$( uname )" in #(
|
||||||
CYGWIN* )
|
CYGWIN* ) cygwin=true ;; #(
|
||||||
cygwin=true
|
Darwin* ) darwin=true ;; #(
|
||||||
;;
|
MSYS* | MINGW* ) msys=true ;; #(
|
||||||
Darwin* )
|
NONSTOP* ) nonstop=true ;;
|
||||||
darwin=true
|
|
||||||
;;
|
|
||||||
MINGW* )
|
|
||||||
msys=true
|
|
||||||
;;
|
|
||||||
NONSTOP* )
|
|
||||||
nonstop=true
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
@@ -87,9 +119,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
|||||||
if [ -n "$JAVA_HOME" ] ; then
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
# IBM's JDK on AIX uses strange locations for the executables
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||||
else
|
else
|
||||||
JAVACMD="$JAVA_HOME/bin/java"
|
JAVACMD=$JAVA_HOME/bin/java
|
||||||
fi
|
fi
|
||||||
if [ ! -x "$JAVACMD" ] ; then
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
@@ -98,88 +130,120 @@ Please set the JAVA_HOME variable in your environment to match the
|
|||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
JAVACMD="java"
|
JAVACMD=java
|
||||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
if ! command -v java >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
MAX_FD_LIMIT=`ulimit -H -n`
|
case $MAX_FD in #(
|
||||||
if [ $? -eq 0 ] ; then
|
max*)
|
||||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||||
MAX_FD="$MAX_FD_LIMIT"
|
# shellcheck disable=SC2039,SC3045
|
||||||
fi
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
ulimit -n $MAX_FD
|
warn "Could not query maximum file descriptor limit"
|
||||||
if [ $? -ne 0 ] ; then
|
esac
|
||||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
case $MAX_FD in #(
|
||||||
fi
|
'' | soft) :;; #(
|
||||||
else
|
*)
|
||||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||||
fi
|
# shellcheck disable=SC2039,SC3045
|
||||||
fi
|
ulimit -n "$MAX_FD" ||
|
||||||
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
# For Darwin, add options to specify how the application appears in the dock
|
|
||||||
if $darwin; then
|
|
||||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
|
||||||
fi
|
|
||||||
|
|
||||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
|
||||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
|
||||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
|
||||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
|
||||||
|
|
||||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
|
||||||
|
|
||||||
# We build the pattern for arguments to be converted via cygpath
|
|
||||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
|
||||||
SEP=""
|
|
||||||
for dir in $ROOTDIRSRAW ; do
|
|
||||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
|
||||||
SEP="|"
|
|
||||||
done
|
|
||||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
|
||||||
# Add a user-defined pattern to the cygpath arguments
|
|
||||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
|
||||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
|
||||||
fi
|
|
||||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
|
||||||
i=0
|
|
||||||
for arg in "$@" ; do
|
|
||||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
|
||||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
|
||||||
|
|
||||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
|
||||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
|
||||||
else
|
|
||||||
eval `echo args$i`="\"$arg\""
|
|
||||||
fi
|
|
||||||
i=`expr $i + 1`
|
|
||||||
done
|
|
||||||
case $i in
|
|
||||||
0) set -- ;;
|
|
||||||
1) set -- "$args0" ;;
|
|
||||||
2) set -- "$args0" "$args1" ;;
|
|
||||||
3) set -- "$args0" "$args1" "$args2" ;;
|
|
||||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
|
||||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
|
||||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
|
||||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
|
||||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
|
||||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Escape application args
|
# Collect all arguments for the java command, stacking in reverse order:
|
||||||
save () {
|
# * args from the command line
|
||||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
# * the main class name
|
||||||
echo " "
|
# * -classpath
|
||||||
}
|
# * -D...appname settings
|
||||||
APP_ARGS=`save "$@"`
|
# * --module-path (only if needed)
|
||||||
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||||
|
|
||||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
if "$cygwin" || "$msys" ; then
|
||||||
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||||
|
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||||
|
|
||||||
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||||
|
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
for arg do
|
||||||
|
if
|
||||||
|
case $arg in #(
|
||||||
|
-*) false ;; # don't mess with options #(
|
||||||
|
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||||
|
[ -e "$t" ] ;; #(
|
||||||
|
*) false ;;
|
||||||
|
esac
|
||||||
|
then
|
||||||
|
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||||
|
fi
|
||||||
|
# Roll the args list around exactly as many times as the number of
|
||||||
|
# args, so each arg winds up back in the position where it started, but
|
||||||
|
# possibly modified.
|
||||||
|
#
|
||||||
|
# NB: a `for` loop captures its iteration list before it begins, so
|
||||||
|
# changing the positional parameters here affects neither the number of
|
||||||
|
# iterations, nor the values presented in `arg`.
|
||||||
|
shift # remove old arg
|
||||||
|
set -- "$@" "$arg" # push replacement arg
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
|
# Collect all arguments for the java command:
|
||||||
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||||
|
# and any embedded shellness will be escaped.
|
||||||
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||||
|
# treated as '${Hostname}' itself on the command line.
|
||||||
|
|
||||||
|
set -- \
|
||||||
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
|
-classpath "$CLASSPATH" \
|
||||||
|
org.gradle.wrapper.GradleWrapperMain \
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
# Stop when "xargs" is not available.
|
||||||
|
if ! command -v xargs >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "xargs is not available"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Use "xargs" to parse quoted args.
|
||||||
|
#
|
||||||
|
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||||
|
#
|
||||||
|
# In Bash we could simply go:
|
||||||
|
#
|
||||||
|
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||||
|
# set -- "${ARGS[@]}" "$@"
|
||||||
|
#
|
||||||
|
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||||
|
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||||
|
# character that might be a shell metacharacter, then use eval to reverse
|
||||||
|
# that process (while maintaining the separation between arguments), and wrap
|
||||||
|
# the whole thing up as a single "set" statement.
|
||||||
|
#
|
||||||
|
# This will of course break if any of these variables contains a newline or
|
||||||
|
# an unmatched quote.
|
||||||
|
#
|
||||||
|
|
||||||
|
eval "set -- $(
|
||||||
|
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||||
|
xargs -n1 |
|
||||||
|
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||||
|
tr '\n' ' '
|
||||||
|
)" '"$@"'
|
||||||
|
|
||||||
exec "$JAVACMD" "$@"
|
exec "$JAVACMD" "$@"
|
||||||
|
|||||||
15
gradlew.bat
vendored
15
gradlew.bat
vendored
@@ -14,7 +14,7 @@
|
|||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%" == "" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@rem Gradle startup script for Windows
|
@rem Gradle startup script for Windows
|
||||||
@@ -25,7 +25,8 @@
|
|||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%" == "" set DIRNAME=.
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
|
@rem This is normally unused
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
@@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
|||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if "%ERRORLEVEL%" == "0" goto execute
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
@@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
|||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||||
|
|
||||||
:fail
|
:fail
|
||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
rem the _cmd.exe /c_ return code!
|
rem the _cmd.exe /c_ return code!
|
||||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
set EXIT_CODE=%ERRORLEVEL%
|
||||||
exit /b 1
|
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||||
|
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||||
|
exit /b %EXIT_CODE%
|
||||||
|
|
||||||
:mainEnd
|
:mainEnd
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
rootProject.name = 'openrndr-template'
|
|
||||||
|
|
||||||
8
settings.gradle.kts
Normal file
8
settings.gradle.kts
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
rootProject.name = "openrndr-template"
|
||||||
|
|
||||||
|
pluginManagement {
|
||||||
|
repositories {
|
||||||
|
gradlePluginPortal()
|
||||||
|
mavenLocal()
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user