You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: java/README.md
+25-7Lines changed: 25 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,9 @@
3
3
This the Java Mode in Processing. It compiles your sketches and runs them. It is the primary mode of Processing.
4
4
5
5
## Folders
6
-
-`application` assets for exporting applications within the mode
7
-
-`generated` generated antlr code for the mode, should be moved to a proper `antlr` plugin within gradle
6
+
-`application` assets for exporting applications within the mode (Deprecated)
7
+
-`generated` generated antlr code for the mode, should be moved to a proper `antlr` plugin within gradle (Deprecated)
8
+
-`gradle` the Processing java gradle plugin
8
9
-`libraries` libraries that are available within the mode
9
10
-`lsp` gradle build system for the language server protocol, in the future we should decouple the lsp from the java mode and pde and move all relevant code here. For now it can be found in `src/.../lsp`
10
11
-`mode` legacy files for `Ant`
@@ -13,8 +14,25 @@ This the Java Mode in Processing. It compiles your sketches and runs them. It is
13
14
-`test` tests for the mode
14
15
-`theme` assets for the mode, related to autocomplete and syntax highlighting
15
16
16
-
## Future plans
17
-
- Decouple the `lsp` and `preprocessor` from the mode and move them to their own repositories
18
-
- Move the `antlr` code to a proper plugin within gradle
19
-
- Create a gradle plugin to convert `.pde` file to `.java` files
20
-
- Create a gradle based version of Java mode.
17
+
## The Modern Build system
18
+
19
+
Since 2025 work has started on creating a new internal build system for the Java Mode based on Gradle.
20
+
The goal is to simplify by leaning more on Gradle, which provides a lot of the functionality that was build before out of the box and a lot more.
21
+
22
+
### How it used to work
23
+
24
+
The build system used to be based on some parts Ant, some parts eclipse (org.eclipse.jdt.core) and a lot of custom work build up over the years.
25
+
26
+
### How it will work going forward
27
+
28
+
The modern build system is based around Gradle, the main service (GradleService) for building a sketch with Gradle is included in `app` instead of into the Java mode as future modes are most likely also based on Gradle if they use `core` in some way. Most _Modes_ should/could probably be a Gradle plugin going forward.
29
+
Breaking the build system away from the java mode will mean that we create an island of isolation when it comes to the build system, allowing contributors to work on the build system without running the editor.
30
+
Another upside is that when we publish the Gradle plugin to the Gradle Plugin repository, it will become trivial to run Processing sketches outside the PDE and improvements made to the build system will be usable for everyone.
31
+
There is now also an opportunity for creating contributions that modify the build system in more subtle ways rather than having to make a complete new mode, e.g. a compilation step for shaders or some setup tweaks to make JavaFX work out of the box.
32
+
Furthermore, this change will embed Processing more into the wider Java ecosystem, if users want to upgrade from using Processing to Java whilst still using `core` that will become possible and won't need a rewrite of what they already created.
33
+
34
+
### How to work on the modern build system
35
+
36
+
If you want to work on the build system without the PDE, open `/java/gradle/example` into a new intellij IDEA window, this is set up to compile the Processing Java plugin and run sketches standalone.
37
+
38
+
Within the editor, the gradle plugin is embedded in Processing's embedded maven repository so that Gradle can find it.
0 commit comments