Compare commits

...

209 Commits

Author SHA1 Message Date
Edwin Jakobs
e79d83c017 Merge branch 'next-version' into feature-variants 2025-09-17 01:35:44 -07:00
Abe Pazos
2623633588 README.md: tweak Building Libraries section
s/convention/conventions/
2025-09-16 22:38:56 +02:00
Edwin Jakobs
46fb734771 Fixed mavenLocal configuration 2025-09-16 22:25:49 +02:00
Edwin Jakobs
0bdb818026 Fixed missing logger providers in demo 2025-09-16 22:12:54 +02:00
Edwin Jakobs
d334c11b6a Add main.output to demo.runtimeClasspath 2025-09-16 21:43:32 +02:00
Edwin Jakobs
7f8af578e6 Add main.output to demo.compileClasspath 2025-09-16 19:10:52 +02:00
Edwin Jakobs
6e328f3871 Clean up publish-library.gradle.kts 2025-09-15 20:51:01 +02:00
Edwin Jakobs
15ab357c05 Restore plugin setup 2025-09-15 20:49:52 +02:00
Edwin Jakobs
f8cc9b713e Add publish-library convention plugin 2025-09-15 20:49:05 +02:00
Edwin Jakobs
a0b7df5585 Configure group/name/version through gradle.properties 2025-09-15 12:16:25 +02:00
Edwin Jakobs
3144067340 Remove lingering import and ext.set() 2025-09-15 11:49:58 +02:00
Edwin Jakobs
a4525f9b16 Use jvmTarget, kotlinLanguage and kotlinApi from libs.versions.toml 2025-09-15 07:19:20 +02:00
Edwin Jakobs
84f00fa827 Make use of version catalogs and variants 2025-09-14 21:27:30 +02:00
Abe Pazos
e97ef57b78 Update README.md: change Java requirement 14 -> 17 2025-09-13 19:46:41 +02:00
Abe Pazos
2e760f9c53 Add link to wiki 2025-09-11 13:11:13 +02:00
Abe Pazos
3d6774275a Add link to wiki 2025-09-11 13:10:29 +02:00
Abe Pazos
b4242bc892 Upgrade to Kotlin 2.2.20 2025-09-11 11:49:41 +02:00
Abe Pazos
d38df2eed7 Enable orx-composition, orx-svg, orx-text-writer
They were part of openrndr and enabled by default in the past
2025-09-11 11:35:00 +02:00
Abe Pazos
622bfc5077 Merge branch 'next-version' ignoring changes in master
Includes openrndr and orx 0.4.5
2025-09-06 13:54:37 +02:00
Abe Pazos
c2756d2b9d Upgrade to openrndr/orx 0.4.5 2025-09-06 13:36:34 +02:00
Abe Pazos
3ed7c18932 build.gradle.kts: add orx-axidraw, reformatting 2025-09-03 11:11:35 +02:00
Abe Pazos
86c36a0f35 Update to openrndr and orx 0.4.5-alpha11 2025-09-03 11:04:20 +02:00
Abe Pazos
e6a9e319d9 Update to gradleup.shadow 9.1.0 2025-08-29 22:58:55 +02:00
Abe Pazos
a385ebb216 Update badges in README.md
Previous ones stopped working
2025-08-26 15:11:52 +02:00
Abe Pazos
e1d44de9a1 Update badges in README.md
Previous ones stopped working
2025-08-26 15:07:50 +02:00
Abe Pazos
8191515779 Update to openrndr and orx 0.4.5-alpha10 2025-08-22 14:05:10 +02:00
Abe Pazos
7597ac35e2 Update README.md
Simplify README by merging two sections
2025-08-22 12:03:35 +00:00
Abe Pazos
69f698df1f Update to kotlin 2.2.10, kotlinLogging 7.0.13, shadow 9.0.2
Replace com.github.johnrengelman.shadow with com.gradleup.shadow
2025-08-21 00:00:04 +02:00
Abe Pazos
f93a523115 Dependencies: update kotlinLogging to 7.0.11 2025-08-06 11:57:54 +02:00
Abe Pazos
8f08e44141 Add .lwjgl to .gitignore
For new users, it's confusing that IDEA suggests adding five extra files to git when they only edited one.
2025-07-30 08:41:40 +02:00
Abe Pazos
aa3e5e15ac Ignore .lwjgl in .gitignore
For new users, it's confusing that IDEA suggests adding five extra files to git when they only edited one.
2025-07-30 08:40:39 +02:00
Edwin Jakobs
de0ec94804 Upgrade to Gradle 8.14.3, Kotlin 2.2.0, kotlinx serialization 1.9.0 2025-07-09 21:38:54 +02:00
Abe Pazos
bf588e1baa Update Gradle to 8.14.2 2025-06-05 17:20:27 +02:00
Abe Pazos
ba99027329 Update Gradle to 8.14.1 2025-05-22 21:41:10 +02:00
Abe Pazos
5e6fbdd06a Update Kotlin to 2.1.21 2025-05-13 15:16:08 +03:00
Abe Pazos
cd5a98322b Fix deprecation warnings 2025-05-02 19:02:48 +03:00
Abe Pazos
fef8e76e52 Describe how to run the executable created by jpackage 2025-05-02 19:01:38 +03:00
Abe Pazos
315e788a32 Upgrade to Gradle 8.14 2025-04-25 23:55:14 +03:00
Abe Pazos
ca85dec73a Upgrade to openrndr/orx 0.4.5-alpha9, kotlin-logging 7.0.7 2025-04-22 12:10:27 +02:00
Abe Pazos
4247fd0989 Upgrade kotlinx.coroutines to 1.10.2 2025-04-11 11:57:11 +03:00
Abe Pazos
2d6963b627 Upgrade to kotlin-logging 7.0.6, kotlinx-serialization-core 1.8.1 2025-04-03 23:51:58 +08:00
Abe Pazos
72270a5421 Upgrade to kotlin 2.1.20 2025-03-20 22:16:28 +08:00
Abe Pazos
89aeaf68eb Upgrade to openrndr/orx 0.4.5-alpha8 2025-03-11 10:18:21 +08:00
Abe Pazos
b164dc2bc5 Upgrade kotlin-logging to 7.0.5 2025-03-09 20:35:09 +08:00
Abe Pazos
de3079cbee Upate to Gradle 8.13, slf4j 2.0.17 2025-02-26 02:07:26 +01:00
Abe Pazos
e57ba1bff7 Build on commit also for next-version 2025-02-16 23:15:28 +08:00
Abe Pazos
ce0877cdd1 Upgrade kotlin-logging to 7.0.4 2025-02-16 17:51:48 +08:00
Abe Pazos
fff6fcee83 Upgrade to openrndr and orx 0.4.5-alpha7 2025-02-04 13:11:29 +01:00
Abe Pazos
5ff7884bd5 Add orx-math
Note: not in any ORX alpha release at the time of writing,
only available when building your own orx SNAPSHOT.
2025-02-02 18:53:14 +01:00
Abe Pazos
bf7d308796 Revert dependency accidentally commented out 2025-02-02 18:43:28 +01:00
Abe Pazos
a21da71eb1 Upgrade to Gradle 8.12.1, Kotlin 2.1.10, Versions 0.52.0 2025-02-01 09:56:40 +01:00
Abe Pazos
dbe277002a Update kotlinx-serialization to 1.8.0 2025-01-06 17:17:21 +01:00
Abe Pazos
2a4d2142e0 Update kotlinx-coroutines-core to 1.10.1 2024-12-22 10:20:06 +01:00
Abe Pazos
7bc745fbed Update to Gradle 8.12 2024-12-20 17:54:44 +01:00
Abe Pazos
374cd51b8a Update kotlin-logging 7.0.0 -> 7.0.3 2024-12-03 10:33:52 +01:00
Abe Pazos
0ca9db90d0 Update to Kotlin 2.1.0 2024-11-27 16:38:18 +01:00
Abe Pazos
e7f3475de0 Update to Gradle 8.11.1 2024-11-25 08:06:42 +01:00
Abe Pazos
ef7cee01c7 Fix #53 - ffmpeg warnings after shadowJar 2024-11-21 11:19:30 +01:00
Abe Pazos
9e08c6cfb6 Fix #53 - ffmpeg warnings after shadowJar 2024-11-21 11:18:38 +01:00
Abe Pazos
1565ef12be Update README.md
Mention how to specify a main method to run after using shadowJar

Simplify the text.
2024-11-16 18:37:32 +01:00
Abe Pazos
de35f064d8 Update README.md
Mention how to specify a main method to run after using shadowJar

Simplify the text.
2024-11-16 17:24:36 +00:00
Abe Pazos
6e5fac82ac Ignore .kotlin folder 2024-11-14 15:14:58 +01:00
Abe Pazos
a9edf8d79f Add org.gradle.configuration-cache.parallel
to gradle.properties
2024-11-14 15:12:23 +01:00
Abe Pazos
418339fe4b Update to openrndr/orx 0.4.5-alpha6 2024-11-14 15:11:34 +01:00
Abe Pazos
aad6a8f576 Update to Gradle 8.11 2024-11-14 15:11:19 +01:00
Abe Pazos
4d65172d93 Upgrade .set() syntax to = in Gradle 2024-11-11 14:32:38 +01:00
Abe Pazos
b3f94abc82 Upgrade kotlin 2.0.20 to 2.0.21 2024-11-11 14:32:13 +01:00
Abe Pazos
e4dfb4aaed Replace gson with kotlinx.serialization 2024-11-11 14:31:46 +01:00
Abe Pazos
524635e1ad Revert accidentally pushed code
This reverts commit 3ef46bcc4e.
2024-10-31 08:02:36 +01:00
Abe Pazos
db5ea1cdd2 Update to Gradle 8.10.2 2024-10-30 21:43:46 +01:00
Abe Pazos
04139af57c Update to Gradle 8.10.2 2024-10-01 16:01:34 +02:00
Abe Pazos
c77fd4c99a Update to kotlinx-coroutines 1.9.0 2024-09-17 11:13:29 +02:00
Abe Pazos
3ef46bcc4e Add kinect test 2024-09-13 18:12:52 +02:00
Abe Pazos
1384143d6f Update to Gradle 8.10 2024-09-13 18:11:46 +02:00
Abe Pazos
6b14304c80 Update kotlin to 2.0.20 2024-09-01 19:18:04 +02:00
Abe Pazos
c6f608f880 Mention ORSL in the README 2024-08-15 16:24:44 +02:00
Abe Pazos
3bfb55041d Update orsl to 0.4.5-alpha5 2024-08-15 11:17:53 +02:00
Abe Pazos
91e953ab61 Update to Gradle 8.10 2024-08-15 10:53:09 +02:00
Abe Pazos
10ccb692c7 Update to Gradle 8.9 2024-08-12 19:29:46 +02:00
Abe Pazos
0edd57129a Update slf4j to 2.0.16 2024-08-10 14:47:06 +02:00
Abe Pazos
0278b7dc9e Update kotlin to 2.0.10, slf4j to 2.0.15 2024-08-08 17:22:08 +02:00
Abe Pazos
440d67654d Solve kotlinOptions deprecation warning 2024-07-30 17:19:55 +02:00
Abe Pazos
fa280af373 Update dependencies
openrndr = "0.4.5-alpha5"
orx = "0.4.5-alpha5"
orsl = "0.4.5-alpha3"

orsl was set to alpha4 which does not yet exist
2024-07-18 22:59:41 +02:00
Abe Pazos
0268725ead Update jackson 2.17.1 to 2.17.2 2024-07-16 15:25:21 +02:00
Abe Pazos
d8d9445062 Update Gradle 8.8 to 8.9 2024-07-16 15:24:58 +02:00
Abe Pazos
0ccab3a8bf Update kotlin-logging 6.0.9 -> 7.0.0 2024-06-15 13:01:14 +02:00
Abe Pazos
0282d5a0b5 Update GitHub actions 2024-06-15 11:13:31 +02:00
Abe Pazos
24e441189a Update openrndr/orx/orsl to 0.4.5-alpha4 2024-06-09 07:18:41 +02:00
Edwin Jakobs
d019406420 Upgrade to Gradle 8.8 2024-06-01 07:59:06 +02:00
Edwin Jakobs
3cdf6ea780 Upgrade to JDK 17 2024-06-01 07:55:38 +02:00
Abe Pazos
df784c99c1 Update to Kotlin 2.0.0 2024-05-27 22:42:21 +02:00
Abe Pazos
80078cc2cb Update kotlin-csv-jvm to 1.9.3 2024-05-16 16:11:28 +02:00
Abe Pazos
527b502e74 Update kotlinx-coroutines-core to 1.8.1 2024-05-13 13:46:26 +02:00
Abe Pazos
c4e5b3b1aa Update to kotlin 1.9.24 and jackson 2.17.1 2024-05-09 13:05:34 +02:00
Abe Pazos
5b2634fdd1 Update to 0.4.5-alpha3, remove openrndr-svg
Add orx-svg and orx-composition
2024-04-24 08:35:35 +02:00
Abe Pazos
8c2f9c0ec6 Update slf4j, jackson, kotlin-logging 2024-04-18 18:25:50 +02:00
Abe Pazos
dec0b36aaf Upgrade Gradle to 8.7, disable orx-svg, orx-composition
as they are not yet available in 0.4.5alpha2
2024-03-23 10:35:11 +01:00
Abe Pazos
cf4ebfc490 add new orx'es to build.gradle.kts 2024-03-18 13:07:33 +01:00
Abe Pazos
cc31b08b91 libs.versions.toml use openrndr/orx/orsl 0.4.5-alpha2 2024-03-17 20:45:53 +01:00
Abe Pazos
3a4d22d940 Update to log4j 2.23.1, jackson 2.16.2 2024-03-11 16:40:36 +01:00
Abe Pazos
b98a1068f7 Update kotlin to 1.9.23 2024-03-07 19:06:54 +01:00
Abe Pazos
b57fb1abc6 Update log4j and org.beryx.runtime dependencies 2024-02-22 17:29:52 +01:00
Abe Pazos
14630e3b5b Update slf4j and kotlinx-coroutines-core 2024-02-19 15:51:47 +01:00
Abe Pazos
638e579f3e Update to Gradle 8.6 2024-02-03 09:30:16 +01:00
Abe Pazos
9604de3243 update Gradle dependencies logging and versions 2024-01-29 17:48:02 +01:00
Edwin Jakobs
15fb5393e7 Add ORSL dependencies 2024-01-15 14:15:29 +01:00
Edwin Jakobs
c518834f71 Upgrade to kotlin-logging 6.0.2 2024-01-14 19:57:47 +01:00
Abe Pazos
a83e888dc3 Merge changes from next-version 2024-01-05 16:49:07 +01:00
Abe Pazos
498fd6773d Add orx-property-watchers, mention next-version branch 2024-01-05 16:37:29 +01:00
Abe Pazos
d5702db78f Update openrndr and orx to 0.4.4 2024-01-05 16:22:49 +01:00
Abe Pazos
d692d6998d Update dependencies 2024-01-02 11:16:47 +01:00
Abe Pazos
3db83af277 Add svg to media file scope 2024-01-02 11:16:30 +01:00
Abe Pazos
29db13e82a Update openrndr and orx to 0.4.4-alpha6 2023-12-08 10:49:11 +01:00
Abe Pazos
a3c9178d4d Update orx'es in build.gradle.kts 2023-12-08 10:48:00 +01:00
Abe Pazos
84f54b3f4e Add logging files to .gitignore 2023-12-08 10:47:07 +01:00
Abe Pazos
4c9e1c552f Fix markdown 2023-12-01 17:28:15 +01:00
Abe Pazos
e36cad040e Mention next-version branch in readme 2023-12-01 17:12:51 +01:00
Abe Pazos
ce3bf56b43 Update openrndr and orx dependencies to 0.4.4-alpha5 2023-12-01 17:11:57 +01:00
Abe Pazos
5ce3313da5 Update dependencies 2023-11-29 17:06:24 +01:00
Abe Pazos
9695d5e8af Update Gradle to 8.5 2023-11-29 16:28:12 +01:00
Kazik Pogoda
5242dae526 build: versions plugin added for routine checks of dependency updates, excluding unstable dependencies (#51) 2023-11-29 16:28:12 +01:00
Kazik Pogoda
d97e80c903 build: versions plugin added for routine checks of dependency updates, excluding unstable dependencies (#51) 2023-11-12 16:17:25 +01:00
Abe Pazos
adf88e1062 Update dependencies 2023-11-11 11:59:29 +01:00
Abe Pazos
eda66cc37a s/Images/Media/ (file scope), add audio and video file extensions 2023-10-06 18:08:56 +02:00
Abe Pazos
fa820c6d3c Fix Gradle deprecated $buildDir
And some whitespace
2023-10-06 18:08:07 +02:00
Abe Pazos
411b5f5b12 Update Gradle and Kotlin 2023-10-06 17:26:30 +02:00
Edwin Jakobs
2f2d279e24 Update configuration cache settings 2023-10-06 16:58:22 +02:00
Edwin Jakobs
a35675fd03 Upgrade to Gradle 8.3 2023-10-06 16:58:22 +02:00
Edwin Jakobs
2477ce7de8 Update configuration cache settings 2023-08-29 08:04:07 +02:00
Edwin Jakobs
0fd7a72d4f Upgrade to Gradle 8.3 2023-08-29 07:50:15 +02:00
Edwin Jakobs
f907422a5e Upgrade kotlinx coroutines to 1.7.1, kotlin-csv to 1.9.1 2023-06-24 07:51:19 +02:00
Edwin Jakobs
f3d8d0a3dc Upgrade openrndr/orx to 0.4.4-SNAPSHOT 2023-06-24 07:46:45 +02:00
Abe Pazos
7d9065b818 Update openrndr and orx to 0.4.3 2023-06-20 10:31:53 +02:00
Abe Pazos
36fc9c7908 Add 7 new orx extensions, use OPENRNDR and ORX 0.4.3-alpha9 2023-06-02 14:59:36 +02:00
Abe Pazos
8ed15ab6eb Update README.md, mention how to run the jar
Also mention gradlew.bat for Windows.
2023-06-02 08:45:41 +02:00
Abe Pazos
88c716804b Silence os constants access warnings 2023-05-10 15:33:06 +02:00
Abe Pazos
f5763cca77 Update kotlin and jsoup dependencies 2023-05-03 10:17:26 +02:00
Abe Pazos
b84956b9aa Fix build task jar -> shadowJar 2023-05-03 10:17:26 +02:00
Abe Pazos
2534cd25ff Add Gradle task to add scopes to IntelliJ 2023-04-27 15:55:01 +02:00
Abe Pazos
38c37d2df0 Update Gradle 2023-04-24 21:39:27 +02:00
Abe Pazos
f3320b722b README: Add missing run commands following ./gradlew 2023-04-22 08:30:32 +00:00
Edwin Jakobs
5aef63bad7 Upgrade to Gradle 8.1 2023-04-15 15:56:48 +02:00
Abe Pazos
0ff4e26091 build.gradle.kts: add openrndr("dialogs") dependency
See usage demos in this commit a368aac916
2023-04-04 07:50:44 +02:00
Edwin Jakobs
9716ffed5f Upgrade to Kotlin 1.8.20, slf4j 2.0.7, kotlin-logging 3.0.5, kotlin-csv 1.9.0 2023-04-03 15:46:29 +02:00
Abe Pazos
a9b2f1859b README.md: fix openrndr badge version number 2023-04-03 15:13:44 +02:00
Abe Pazos
a7fbe6f470 README.md Fix paths to yaml files 2023-03-31 16:51:50 +02:00
Abe Pazos
6944998cb6 Update used third-party github actions 2023-03-30 18:34:06 +02:00
Abe Pazos
b4dae00646 Fix workflow name 2023-03-30 18:34:06 +02:00
Abe Pazos
6210723148 Combine 3 publish github actions into one 2023-03-30 18:34:06 +02:00
Abe Pazos
2e9da10d4d Increase template version to v1.0.0. Fixes building on Mac. 2023-03-30 18:34:06 +02:00
Abe Pazos
35b8474c2d Gradle cache has issues, disable it 2023-03-30 18:34:06 +02:00
Abe Pazos
ea279f63a2 Fix warning and publishing permissions 2023-03-30 18:34:06 +02:00
Abe Pazos
da2d9d3aa9 Update README: fix --P
Fix the incorrect formatting in the cross-build example.

Add link to read about Gradle.

Mention TemplateLiveProgram.kt.
2023-03-28 09:02:55 +02:00
Abe Pazos
589a408709 Update README.md: fix ORX badge, rewording 2023-03-16 09:29:48 +01:00
Abe Pazos
d72cee08a9 Update README.md
Add version badges, fix typo
2023-03-16 09:29:48 +01:00
Abe Pazos
2113b159fe Update README.md (updating dependencies) 2023-03-16 09:29:48 +01:00
Edwin Jakobs
16eb227741 Fix jpackage macos app bundles 2023-03-15 14:34:43 +01:00
Edwin Jakobs
4f1517a62f Upgrade to log4j 2.20.0, jackson 2.14.2, kotlin 1.18.10, kotlin-logging 3.0.5,kotlin-csv 1.8.0 2023-03-04 16:47:54 +01:00
Edwin Jakobs
3ead34887e Upgrade to Gradle 8.0.2 2023-03-04 16:35:00 +01:00
vechro
129626edbe Prefer mavenCentral before mavenLocal 2023-03-04 15:01:57 +01:00
vechro
89767de35a Remove hardcoded mavenLocal() logic 2023-03-04 15:01:57 +01:00
vechro
a26fd652d5 Move to libs.version.toml for version management 2023-03-04 15:01:57 +01:00
Abe Pazos
1620af58a3 Delete reference to orx which no longer exists 2023-03-04 12:02:57 +01:00
Edwin Jakobs
1d51a766e1 Fix location of data inside macos app bundle, update workflows 2023-03-01 16:31:01 +01:00
Abe Pazos
0e76bcd431 Fix launching custom Kt files from command line
The `application` property was already used.
Reusing it breaks things.
Use `openrndr.application` instead.
2023-02-28 09:40:19 +01:00
Abe Pazos
01d45029e6 Add application gradle option to allow running custom Kt files 2023-02-20 12:37:55 +01:00
Edwin Jakobs
ff1942d2a8 Fix minimize excludes for log4j-slf4j2 2023-01-27 09:13:28 +01:00
Edwin Jakobs
cb6aa04f91 Upgrade to openrndr 0.4.2, kotlin 1.8, slf4j 2.0.6, kotlin-logging 3.0.4 2023-01-27 09:09:58 +01:00
Edwin Jakobs
091115f49a Add OPENRNDR task aliases 2023-01-25 20:36:24 +01:00
Edwin Jakobs
3b957d53e3 Upgrade OPENRNDR to 0.4.2-rc.3, runtime to 1.13.0, gson to 2.10.1. Enable gradle configuration cache. Change default orx features. 2023-01-23 08:37:19 +01:00
Edwin Jakobs
4631eced38 Configure jpackage to launch JVM with cwd set to Contents/Resources 2022-12-19 21:33:10 +01:00
Edwin Jakobs
63f10ce2bb Upgrade to Kotlin 1.7.21, Jackson 2.14.1, log4j 2.19.0, jsoup 1.15.3, kotlin-csv 1.7.0 2022-12-19 21:27:47 +01:00
Kazik Pogoda
29a0cbdd75 dependencies: sl4j-api is an explicit dependency solving resolution of slf4j parts in different versions, "Implementation-Version" added to shadowJar manifest, shadowJar minimization will not remove logging support 2022-12-07 14:57:36 +01:00
Kazik Pogoda
c340edab96 fix: typo in "org.slf4j" group name, "f" was missing 2022-12-07 14:57:36 +01:00
vechro
a42a2bd9a3 Fix macOS M1 architecture not being correctly detected for lwjgl 2022-10-12 16:18:30 +02:00
Edwin Jakobs
905c5f8b9d Upgrade Kotlin to 1.7.20 2022-10-12 15:45:02 +02:00
Edwin Jakobs
f0c25cb7f0 Upgrade to OPENRNDR 0.4.1 2022-08-24 14:35:27 +02:00
Edwin Jakobs
7cc1edb568 Upgrade to OPENRNDR 0.4.1, kotlin-logging 2.1.23, kotlin-csv-jvm 1.6.0, kotlinx-coroutines 1.6.4 2022-08-22 17:34:26 +02:00
vechro
fd6333e264 Use Kotlin 1.7.10 and target JVM 11 2022-08-12 11:58:29 +02:00
vechro
787d0ab673 Upgrade to Gradle 7.5.1 2022-08-12 11:58:29 +02:00
Abe Pazos
5756c29660 Update json, xml and csv libraries (#28) 2022-08-12 07:08:43 +02:00
Abe Pazos
f80caf7acf Fix broken link in README (#26) 2022-08-12 07:08:31 +02:00
Edwin Jakobs
f5d9accd71 Upgrade to OPENRNDR 0.4.0, ORX 0.4.0, Kotlin 1.6.21, Jackson 2.13.3, log4j 2.18.0 2022-07-08 22:19:51 +02:00
Edwin Jakobs
71bb6c61c7 Upgrade to Gradle 7.4.1, OPENRNDR 0.4.0-rc.7, ORX 0.4.0-rc.8, Jackson 2.13.2. Add orx-minim 2022-03-19 07:49:58 +01:00
Edwin Jakobs
6ca525341e Upgrade to shadow plugin 7.1.2, slf4j 1.7.36, jackson 2.13.1 2022-03-06 08:25:01 +01:00
Edwin Jakobs
e16ae4334e Switch to Gradle 7.4 version catalog syntax 2022-03-03 08:17:02 +01:00
Edwin Jakobs
975d4ee1a1 Upgrade to Gradle 7.4, log4j 2.17.2, kotlinx-coroutines 1.6.0, kotlin-logging 2.1.21, gson 2.9.0 2022-03-02 10:43:25 +01:00
Edwin Jakobs
24a5f7f091 Fix M1 support, disable video support for M1 2022-02-11 11:24:59 +01:00
Edwin Jakobs
11dc0f71d9 Attempt to add macOS m1 libraries 2022-02-10 17:37:55 +01:00
Edwin Jakobs
0c82af93b2 Upgrade to ORX 0.4.0-rc.7, OPENRNDR 0.4.0-rc.6 2022-02-09 17:34:03 +01:00
Steven van den Broek
6797934670 Fix typo in jpackage configuration (#25) 2022-01-31 08:32:20 +01:00
Edwin Jakobs
ad3b2f8c7c Switch to OPENRNDR 0.4.0-rc.5, ORX 0.4.0-rc.5 2022-01-29 20:46:31 +01:00
Vechro
64aaa00524 Update log4j to 2.17.0 2021-12-22 19:29:41 +01:00
Edwin Jakobs
34fac68d50 Upgrade to log4j 2.15.0 2021-12-11 15:46:40 +01:00
Edwin Jakobs
8553c8a4c8 Update .gitignore 2021-11-23 10:50:12 +01:00
Edwin Jakobs
e507fb7b35 Change list of default orxFeatures 2021-11-23 10:26:25 +01:00
Edwin Jakobs
180d85bd69 Add gitArchiveToMarkdown plugin and task 2021-11-23 10:26:25 +01:00
Edwin Jakobs
d1fbf470b2 Shorten jpackage configuration 2021-11-23 10:26:25 +01:00
Edwin Jakobs
e988a14f03 Add version catalog 2021-11-23 10:26:25 +01:00
Edwin Jakobs
a02d3fc44f Upgrade to Kotlin 1.6.0, Gradle 7.3 2021-11-20 21:18:56 +01:00
Edwin Jakobs
df1782f317 Prepare template for OPENRNDR 0.4 2021-07-22 16:26:58 +02:00
Edwin Jakobs
d103e206d2 Upgrade to Gradle 7.0.2, OPENRNDR/ORX 0.3.58, Kotlin 1.5.0 2021-05-16 09:34:06 +02:00
Edwin Jakobs
ef25b9a101 Change maven url to https://maven.openrndr.org 2021-04-12 13:55:47 +02:00
Edwin Jakobs
acaa7ceeba Upgrade to Gradle 7.0, Kotlin 1.4.32 2021-04-10 18:08:42 +02:00
Edwin Jakobs
248c1eb617 Upgrade to OPENRNDR 0.3.46 2021-03-12 08:58:28 +01:00
Abe Pazos
495078a419 Add missing orx to build.gradle.kts, null as trailing comma (#16) 2021-02-24 20:08:51 +01:00
Abe Pazos
03d5b07009 Update gradle to 6.8 (#15) 2021-01-22 21:21:01 +01:00
Edwin Jakobs
3e932ac945 Merge pull request #14 from ricardomatias/patch-4
Add orml setup
2021-01-21 21:06:59 +01:00
Ricardo Matias
b6e2377384 Add orml setup 2021-01-21 12:53:18 +01:00
24 changed files with 788 additions and 512 deletions

2
.gitattributes vendored Normal file
View File

@@ -0,0 +1,2 @@
*.bat eol=crlf

View File

@@ -3,13 +3,19 @@ on:
push:
branches:
- master
- next-version
jobs:
build:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 14
distribution: 'temurin'
java-version: '17'
#cache: 'gradle'
- name: Build sources
run: ./gradlew build

View File

@@ -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"

View File

@@ -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"

View File

@@ -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
View 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@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
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.14.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
View File

@@ -3,3 +3,11 @@ build
out
.idea
.gradle
.kotlin
.lwjgl
video/
screenshots/
gui-parameters/
ffmpegOutput.txt
ShaderError.glsl

View File

@@ -1,24 +1,73 @@
# 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.
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
- `run` runs the TemplateProgram
- `jar` creates an executable platform specific jar file with all dependencies
- `zipDistribution` creates a zip file containing the application jar and the data folder
- `jpackageZip` creates a zip with a stand-alone executable for the current platform (works with Java 14 only)
- `./gradlew run` runs `TemplateProgram.kt` (Use `gradlew.bat run` under Windows)
- `./gradlew run -Popenrndr.application=MyProgramKt` runs `src/main/kotlin/myProgram.kt`
- `./gradlew run -Popenrndr.application=foo.bar.MyProgramKt` runs `src/main/kotlin/foo/bar/myProgram.kt` (assuming `package foo.bar` is used in myProgram.kt)
- `./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. If your project contains multiple `main` methods, specify which one to run with `java -cp build/libs/openrndr-template-1.0.0-all.jar MyProgramKt`, where `MyProgramKt` can also be `foo.bar.MyProgramKt` if it's in the package `foo.bar`.
- `./gradlew jpackageZip` creates a zip with a stand-alone executable for the current platform (requires Java 17 or newer). Run it like this: `cd build/jpackage/openrndr-application/ && bin/openrndr-application`.
- `./gradlew dependencyUpydates` checks whether any dependencies have newer versions.
## Tips and issues
See the [wiki](https://github.com/openrndr/openrndr-template/wiki)
## 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).
See the [wiki](https://github.com/openrndr/openrndr-template/wiki)
## 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 and
provides the optional [orsl](https://github.com/openrndr/orsl/) shader helper modules.
The version numbers of these dependencies are specified in your [libs.versions.toml](gradle/libs.versions.toml) file.
Learn more about this file in the [Gradle documentation](https://docs.gradle.org/current/userguide/platforms.html#sub:conventional-dependencies-toml) website.
Newer versions bring useful features and bug fixes. The most recent versions are<br>
![Maven Central Version](https://img.shields.io/maven-central/v/org.openrndr/openrndr-math-jvm?label=OPENRNDR&color=%23FFC0CB)
![Maven Central Version](https://img.shields.io/maven-central/v/org.openrndr.extra/orx-noise-jvm?label=ORX&color=%23FFC0CB)
![Maven Central Version](https://img.shields.io/maven-central/v/org.openrndr.orsl/orsl-shader-generator-jvm?label=ORSL&color=%23FFC0CB).
Switch to the [next-version branch](https://github.com/openrndr/openrndr-template/tree/next-version) or enter these versions manually 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.5-alpha5"
orx = "0.4.5-alpha5"
orsl = "0.4.5-alpha5"
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.
## 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.*`.
This repository contains various Github Actions under `./github/workflows`:
- [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
```
You can follow the progress of the action under the Actions tab in GitHub. Once complete, the executables will appear under the Releases section.
## Building libraries
This template can be used to create a library with your classes and extensions and reuse them across projects or share them with other people.
To publish the project as a library, open [build.gradle.kts](build.gradle.kts) and replace the `conventions.distribute-application` plugin with `conventions.publish-library`.
This automatically sets up the `maven-publish` plugin, which adds the `publishToMavenLocal` task.
The plugin also adds a `demo` sourceSet with runtime dependencies set to go. Demos can be placed in `src/demo/kotlin` and started right away.

View File

@@ -1,254 +1,31 @@
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"
version = "0.3.14"
val applicationMainClass = "TemplateProgramKt"
/* Which additional (ORX) libraries should be added to this project. */
val orxFeatures = setOf(
// "orx-boofcv",
// "orx-camera",
// "orx-chataigne",
"orx-compositor",
// "orx-dnk3",
// "orx-easing",
// "orx-file-watcher",
// "orx-parameters",
// "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-mesh-generators",
// "orx-midi",
// "orx-no-clear",
"orx-noise",
// "orx-obj-loader",
"orx-olive",
// "orx-osc",
// "orx-palette",
// "orx-poisson-fill",
// "orx-rabbit-control,
// "orx-runway",
"orx-shade-styles",
// "orx-shader-phrases",
// "orx-shapes",
// "orx-syphon",
// "orx-temporal-blur",
// "orx-time-operators",
// "orx-kinect-v1",
"orx-panel"
)
/* 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.44"
val orxUseSnapshot = false
val orxVersion = if (orxUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.53"
//<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.0"
group = property("project.group") ?: error("project.group not set")
version = property("project.version") ?: error("project.version not set")
plugins {
java
kotlin("jvm") version("1.4.0")
id("com.github.johnrengelman.shadow") version ("6.1.0")
id("org.beryx.runtime") version ("1.11.4")
}
repositories {
mavenCentral()
if (openrndrUseSnapshot || orxUseSnapshot) {
mavenLocal()
}
maven(url = "https://dl.bintray.com/openrndr/openrndr")
}
fun DependencyHandler.orx(module: String): Any {
return "org.openrndr.extra:$module:$orxVersion"
}
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"
alias(libs.plugins.kotlin.serialization)
id("conventions.kotlin-jvm")
id("conventions.openrndr-tasks")
id("conventions.distribute-application")
}
dependencies {
/* This is where you add additional (third-party) dependencies */
implementation(openrndr.application)
implementation(openrndr.draw)
runtimeOnly(openrndr.gl3)
// implementation("org.jsoup:jsoup:1.12.2")
// implementation("com.google.code.gson:gson:2.8.6")
implementation(openrndr.dialogs)
implementation(openrndr.orextensions)
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(openrndr.ffmpeg)
implementation(orx.bundles.basic)
implementation(orx.olive)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.kotlinx.serialization.core)
implementation(libs.kotlinx.serialization.json)
implementation(libs.slf4j.api)
implementation(libs.kotlin.logging)
implementation("org.jetbrains.kotlinx", "kotlinx-coroutines-core","1.3.9")
implementation("io.github.microutils", "kotlin-logging","1.12.0")
runtimeOnly(libs.bundles.logging.simple)
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))
}
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")
testImplementation(libs.junit)
}

12
buildSrc/build.gradle.kts Normal file
View File

@@ -0,0 +1,12 @@
plugins {
`kotlin-dsl`
}
val libs = extensions.getByType<VersionCatalogsExtension>().named("libs")
dependencies {
implementation(libs.findLibrary("shadow-gradle-plugin").get())
implementation(libs.findLibrary("runtime-gradle-plugin").get())
implementation(libs.findLibrary("kotlin-gradle-plugin").get())
implementation(libs.findLibrary("xversions-gradle-plugin").get())
}

View File

@@ -0,0 +1,39 @@
rootProject.name = "buildSrc"
dependencyResolutionManagement {
repositories {
mavenCentral()
gradlePluginPortal()
mavenLocal {
content {
includeGroup("org.openrndr")
includeGroup("org.openrndr.extra")
}
}
}
versionCatalogs {
create("libs") {
from(files("../gradle/libs.versions.toml"))
}
// We use a regex to get the openrndr/orx versions from the primary catalog as there is no public Gradle API to parse catalogs.
val orRegEx = Regex("^openrndr[ ]*=[ ]*(?:\\{[ ]*require[ ]*=[ ]*)?\"(.*)\"[ ]*(?:\\})?", RegexOption.MULTILINE)
val orxRegEx = Regex("^orx[ ]*=[ ]*(?:\\{[ ]*require[ ]*=[ ]*)?\"(.*)\"[ ]*(?:\\})?", RegexOption.MULTILINE)
val openrndrVersion = orRegEx.find(File(rootDir,"../gradle/libs.versions.toml").readText())?.groupValues?.get(1) ?: error("can't find openrndr version")
val orxVersion = orxRegEx.find(File(rootDir,"../gradle/libs.versions.toml").readText())?.groupValues?.get(1) ?: error("can't find orx version")
create("orx") {
from("org.openrndr.extra:orx-module-catalog:$orxVersion")
}
create("openrndr") {
from("org.openrndr:openrndr-module-catalog:$openrndrVersion")
}
}
}
pluginManagement {
repositories {
gradlePluginPortal()
}
}

View File

@@ -0,0 +1,73 @@
package conventions
import org.gradle.internal.os.OperatingSystem
import kotlin.collections.set
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id("com.gradleup.shadow")
id("org.beryx.runtime")
}
val applicationMainClass: String by properties
application {
mainClass = if (hasProperty("openrndr.application"))
"${property("openrndr.application")}"
else
applicationMainClass
}
tasks {
named<ShadowJar>("shadowJar") {
manifest {
attributes["Main-Class"] = applicationMainClass
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:.*"))
exclude(dependency("org.bytedeco:.*"))
}
}
}
tasks {
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)
}
}
}
register<Zip>("jpackageZip") {
archiveFileName = "openrndr-application.zip"
from("${layout.buildDirectory.get()}/jpackage") {
include("**/*")
}
dependsOn("jpackage")
}
}
runtime {
jpackage {
imageName = "openrndr-application"
skipInstaller = true
if (OperatingSystem.current().isMacOsX) {
jvmArgs.add("-XstartOnFirstThread")
jvmArgs.add("-Duser.dir=${"$"}APPDIR/../Resources")
}
}
options = listOf("--strip-debug", "--compress", "1", "--no-header-files", "--no-man-pages")
modules = listOf("jdk.unsupported", "java.management", "java.desktop")
}

View File

@@ -0,0 +1,71 @@
package conventions
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
val libs = extensions.getByType<VersionCatalogsExtension>().named("libs")
plugins {
java
kotlin("jvm")
id("com.github.ben-manes.versions")
}
repositories {
mavenCentral()
mavenLocal()
}
java {
targetCompatibility = JavaVersion.valueOf("VERSION_${libs.findVersion("jvmTarget").get().displayName}")
sourceCompatibility = JavaVersion.valueOf("VERSION_${libs.findVersion("jvmTarget").get().displayName}")
}
kotlin {
compilerOptions {
apiVersion.set(KotlinVersion.valueOf("KOTLIN_${libs.findVersion("kotlinApi").get().displayName.replace(".", "_")}"))
languageVersion.set(KotlinVersion.valueOf("KOTLIN_${libs.findVersion("kotlinLanguage").get().displayName.replace(".", "_")}"))
jvmTarget.set(JvmTarget.valueOf("JVM_${libs.findVersion("jvmTarget").get().displayName}"))
}
}
fun arch(arch: String = System.getProperty("os.arch")): String {
return when (arch) {
"x86-64", "x86_64", "amd64" -> "x86-64"
"arm64", "aarch64" -> "aarch64"
else -> error("unsupported arch $arch")
}
}
fun Project.addHostMachineAttributesToRuntimeConfigurations() {
val currentOperatingSystemName: String = DefaultNativePlatform.getCurrentOperatingSystem().toFamilyName()
val currentArchitectureName: String = arch()
configurations.matching {
it.name.endsWith("runtimeClasspath", ignoreCase = true)
}.configureEach {
attributes {
attribute(OperatingSystemFamily.OPERATING_SYSTEM_ATTRIBUTE, objects.named(currentOperatingSystemName))
attribute(MachineArchitecture.ARCHITECTURE_ATTRIBUTE, objects.named(currentArchitectureName))
}
}
}
addHostMachineAttributesToRuntimeConfigurations()
tasks {
dependencyUpdates {
gradleReleaseChannel = "current"
val nonStableKeywords = listOf("alpha", "beta", "rc")
fun isNonStable(version: String) = nonStableKeywords.any {
version.lowercase().contains(it)
}
rejectVersionIf {
isNonStable(candidate.version) && !isNonStable(currentVersion)
}
}
}

View File

@@ -0,0 +1,42 @@
package conventions
val applicationMainClass by properties
tasks.register("create executable jar for $applicationMainClass") {
group = " \uD83E\uDD8C OPENRNDR"
dependsOn("shadowJar")
}
tasks.register("run $applicationMainClass") {
group = " \uD83E\uDD8C OPENRNDR"
dependsOn("run")
}
tasks.register("create standalone executable for $applicationMainClass") {
group = " \uD83E\uDD8C OPENRNDR"
dependsOn("jpackageZip")
}
tasks.register("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()
)
}
}
}

View File

@@ -0,0 +1,37 @@
package conventions
import org.gradle.kotlin.dsl.java
import org.gradle.kotlin.dsl.kotlin
plugins {
java
kotlin("jvm")
`maven-publish`
}
val libs = extensions.getByType<VersionCatalogsExtension>().named("libs")
val openrndr = extensions.getByType<VersionCatalogsExtension>().named("openrndr")
val demo = sourceSets.create("demo")
val main = sourceSets.getByName("main")
demo.compileClasspath += main.compileClasspath
demo.runtimeClasspath += main.runtimeClasspath
demo.compileClasspath += main.output
demo.runtimeClasspath += main.output
dependencies {
"demoRuntimeOnly"(openrndr.findLibrary("gl3").get())
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
groupId = property("project.group")?.toString() ?: error("project.group not set")
artifactId = property("project.name")?.toString() ?: error("project.name not set")
description = property("project.name")?.toString() ?: error("project.name not set")
version = property("project.version")?.toString() ?: error("project.version not set")
}
}
}

View File

@@ -1 +1,10 @@
project.name=openrndr-template
project.group=org.openrndr
project.version=1.0.0
applicationMainClass=TemplateProgramKt
openrndr.tasks=true
kotlin.code.style=official
#org.gradle.configuration-cache=true
#org.gradle.configuration-cache.parallel=true
#org.gradle.configuration-cache.problems=warn

59
gradle/libs.versions.toml Normal file
View File

@@ -0,0 +1,59 @@
[versions]
jvmTarget = "17"
kotlin = "2.2.10"
kotlinApi = "2.2"
kotlinLanguage = "2.2"
openrndr = "0.5.0-SNAPSHOT"
orx = "0.5.0-SNAPSHOT"
orsl = "0.4.5-alpha5"
orml = "0.4.1"
slf4j = "2.0.17"
log4j = "2.23.1"
jackson = "2.17.2"
junit = "4.13.2"
kotlinxCoroutines = "1.10.2"
kotlinxSerialization = "1.9.0"
kotlinLogging = "7.0.13"
kotlinCsvJvm = "1.9.3"
jsoup = "1.17.1"
shadow = "9.1.0"
runtime = "1.13.1"
versions = "0.52.0"
[libraries]
kotlin-script-runtime = { group = "org.jetbrains.kotlin", name = "kotlin-script-runtime", 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" }
shadow-gradle-plugin = { group = "com.gradleup.shadow", name = "com.gradleup.shadow.gradle.plugin", version.ref = "shadow" }
runtime-gradle-plugin = { group = "org.beryx.runtime", name = "org.beryx.runtime.gradle.plugin", version.ref = "runtime" }
kotlin-gradle-plugin = { group = "org.jetbrains.kotlin.jvm", name = "org.jetbrains.kotlin.jvm.gradle.plugin", version.ref = "kotlin" }
xversions-gradle-plugin = { group = "com.github.ben-manes.versions", name = "com.github.ben-manes.versions.gradle.plugin", version.ref = "versions" }
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinxCoroutines" }
kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxSerialization" }
kotlinx-serialization-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-core", version.ref = "kotlinxSerialization" }
kotlin-logging = { group = "io.github.oshai", name = "kotlin-logging", version.ref = "kotlinLogging" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
jsoup = { group = "org.jsoup", name = "jsoup", version.ref = "jsoup" }
csv = { group = "com.github.doyaaaaaken", name = "kotlin-csv-jvm", version.ref = "kotlinCsvJvm" }
[plugins]
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }
runtime = { id = "org.beryx.runtime", version.ref = "runtime" }
gitarchive-tomarkdown = { id = "org.openrndr.extra.gitarchiver.tomarkdown", version.ref = "orx" }
versions = { id = "com.github.ben-manes.versions", version.ref = "versions" }
[bundles]
logging-none = ["slf4j-nop"]
logging-simple = ["slf4j-simple"]
loggin-full = ["log4j-slf4j2", "log4j-core", "jackson-databind", "jackson-json"]

Binary file not shown.

View File

@@ -1,6 +1,7 @@
#Thu Aug 01 12:32:31 CEST 2019
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

313
gradlew vendored
View File

@@ -1,78 +1,129 @@
#!/usr/bin/env sh
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
##
## 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/platforms/jvm/plugins-application/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
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# 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"'
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
MAX_FD=maximum
warn () {
echo "$*"
}
} >&2
die () {
echo
echo "$*"
echo
exit 1
}
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD="$JAVA_HOME/bin/java"
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@@ -81,92 +132,120 @@ Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
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.
JAVACMD=java
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
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# 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, switch paths to Windows format before running java
if $cygwin ; 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=$((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" ;;
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --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
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
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, 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" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# 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" "$@"

76
gradlew.bat vendored
View File

@@ -1,3 +1,21 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@@ -10,24 +28,28 @@ if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m"
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
@@ -35,48 +57,36 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
set CLASSPATH=
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal

View File

@@ -1,2 +0,0 @@
rootProject.name = 'openrndr-template'

35
settings.gradle.kts Normal file
View File

@@ -0,0 +1,35 @@
rootProject.name = extra["project.name"]?.toString() ?: error("project.name not set")
pluginManagement {
repositories {
gradlePluginPortal()
mavenLocal()
}
}
dependencyResolutionManagement {
repositories {
mavenCentral()
mavenLocal {
content {
includeGroup("org.openrndr")
includeGroup("org.openrndr.extra")
}
}
}
versionCatalogs {
// We use a regex to get the openrndr/orx versions from the primary catalog as there is no public Gradle API to parse catalogs.
val orRegEx = Regex("^openrndr[ ]*=[ ]*(?:\\{[ ]*require[ ]*=[ ]*)?\"(.*)\"[ ]*(?:\\})?", RegexOption.MULTILINE)
val orxRegEx = Regex("^orx[ ]*=[ ]*(?:\\{[ ]*require[ ]*=[ ]*)?\"(.*)\"[ ]*(?:\\})?", RegexOption.MULTILINE)
val openrndrVersion = orRegEx.find(File(rootDir,"gradle/libs.versions.toml").readText())?.groupValues?.get(1) ?: error("can't find openrndr version")
val orxVersion = orxRegEx.find(File(rootDir,"gradle/libs.versions.toml").readText())?.groupValues?.get(1) ?: error("can't find orx version")
create("orx") {
from("org.openrndr.extra:orx-module-catalog:$orxVersion")
}
create("openrndr") {
from("org.openrndr:openrndr-module-catalog:$openrndrVersion")
}
}
}

View File

@@ -2,7 +2,7 @@ import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.draw.loadFont
import org.openrndr.draw.loadImage
import org.openrndr.draw.tint
import org.openrndr.extra.color.colormatrix.tint
import kotlin.math.cos
import kotlin.math.sin