33This folder contains the source for the Processing Gradle plugin.
44The plugin will transform any Processing sketch into a Gradle project for easy compilation and advanced features.
55
6+ ## Motivation
7+
8+ Processing was designed to be easy to start with, and the PDE (Processing Development Environment) handles most things
9+ for you: you can write code, import libraries, run your sketch, or even export it as an executable. This works very well
10+ for learning and for small to medium sketches, but it isn’t ideal for larger projects.
11+
12+ With the Processing Gradle Plugin, we want to make it possible to build more ambitious projects on top of Processing.
13+ This is intended for users who are comfortable moving beyond the PDE, such as artists and developers working on larger
14+ sketches, long running installations, multi sketch projects, or teams who want version control, automated builds, and
15+ integration with standard Java tools and editors. It is optional and does not replace the PDE, but complements it for
16+ more advanced workflows.
17+
18+ ## What is Gradle
19+
20+ Gradle is a build tool commonly used in the Java ecosystem. It is responsible for tasks like compiling code, managing
21+ dependencies, and running applications. You do not need to learn Gradle to use Processing in the P
22+
623## Usage
724
825Add the following files to any Processing sketch alongside the ` .pde ` files
926
27+ ` build.gradle.kts `
1028``` kotlin
11- // build.gradle.kts
1229plugins {
13- id(" org.processing.java" ) version " 4.5.3" // version of Processing you would like to use.
30+ id(" org.processing.java" ) version " 4.5.3"
1431}
15-
16- // settings.gradle.kts - create the file but leave blank
1732```
1833
19- This will make the Processing sketch a fully fledges Gradle project, usable with any editor that supports gradle.
20- Including the ` gradle ` command if installed.
34+ The version number determines which version of Processing will be used.
35+
36+ ` settings.gradle.kts `
37+ create the file but leave blank
38+
39+ This will turn the Processing sketch into a Gradle project, usable with any editor that supports Gradle.
40+ Including the ` gradle ` command if installed. If you want to use your own editor, or no editor at all, use the
41+ gradle command if installed. Find installation instructions
42+ here: https://docs.gradle.org/current/userguide/installation.html
2143
2244The plugin will add the ` sketch ` command to the Gradle tasks lists, so run the sketch with ` gradle sketch ` , this will
2345build and launch your sketch.
@@ -31,8 +53,8 @@ the same folder.
3153To use any kind of dependency add as a normal gradle dependency, the plugin has already automatically added the Maven
3254Central repository.
3355
56+ ` build.gradle.kts `
3457``` kotlin
35- // build.gradle.kts
3658plugins {
3759 id(" org.processing.java" ) version " 4.5.3"
3860}
@@ -44,17 +66,17 @@ dependencies {
4466
4567To use an older version of Processing just change the plugin version:
4668
69+ ` build.gradle.kts `
4770``` kotlin
48- // build.gradle.kts
4971plugins {
5072 id(" org.processing.java" ) version " 4.5.0"
5173}
5274```
5375
5476Other gradle plugins are also supported
5577
78+ ` build.gradle.kts `
5679``` kotlin
57- // build.gradle.kts
5880plugins {
5981 id(" org.processing.java" ) version " 4.5.3"
6082 id(" com.gradleup.shadow" ) version " <version>"
@@ -63,22 +85,29 @@ plugins {
6385
6486If you want to combine multiple sketches into a single project
6587
88+ ` sketch-a/build.gradle.kts `
6689``` kotlin
67- // sketch-a/build.gradle.kts
6890plugins {
6991 id(" org.processing.java" ) version " 4.5.3"
7092}
93+ ```
7194
72- // sketch-b/build.gradle.kts
95+ ` sketch-b/build.gradle.kts `
96+
97+ ``` kotlin
7398plugins {
7499 id(" org.processing.java" ) version " 4.5.3"
75100}
101+ ```
102+
103+ ` build.gradle.kts `
76104
77- // build.gradle.kts
105+ ``` kotlin
78106plugins {
79107 id(" org.processing.java" ) version " 4.5.3" apply false
80108}
81- // settings.gradle.kts - create the file but leave blank
82109```
83110
111+ ` settings.gradle.kts ` - create the file but leave blank
112+
84113Then run all sketches at once with ` gradle sketch `
0 commit comments