GeezerVison is showing github.com — Internal Gradle Runner by Stefterv · Pull Request #1234 · processing/processing4
Conversation
Stefterv
commented
Sep 8, 2025
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
This PR adds the internal gradle runner to app to support running full Gradle projects within the PDE
Features
- Adds support for running Gradle Projects to the PDE
- Adds a new
processing sketch run CLI command for compiling Processing sketches from the command line
- Adds a new way of bundling sketches for the current OS
- Adds a more modern way of listening for exceptions within sketches. Tries to give more info on what went wrong and provides a baseline to build a new FES on top of.
- Adds a system for defining GradlePlugins (which could be extended in the future to wider Processing Plugins)
- Adds a new per sketch settings panel to manage sketch based preferences
- Adds an experimental HotReloading feature
Current issues
- Windows: does not like the way the System.err and System.out are routed
- Windows: some issue with the native binaries causing running to crash
- macOS: Exported application (Could not find agent library jdwp on the library path)
- macOS: Unsigned jar in distributable (race condition?)
- Windows: Library class not found errors
- Windows: Example folders are readonly causing gradle to crash (using
--build-file argument for gradle does not work)
- Windows: Failed Gradle Task does not report errors
- Windows: Library examples seem to not be marked readonly
- Windows:
Scan Libraries task fails on contributed examples
- Windows: Provider.forUseAtConfigurationTime warning
- Windows: OpenJDK stays active after killing the PDE
- Windows: This even prevents a library from being uninstalled because the file is still in use
- Rename windres doesnt run
- Linux: P2D and P3D renderer broken (Incorrect JOGL dependencies)
- Snap: Not sure what is wrong yet
- Home Directory not accessible for Gradle distribution download
TODO
- Add support for the integrated libraries (simply publish to the internal repository)
- Determine if we want to keep the hot reload & android plugins
How to test
- Switch to the PR Branch
- Run Processing
- Run a sketch, observe the note about the legacy build system in the console
- Go to Settings -> Sketches -> Enable
Use Modern Build System
- Save changes
- Run the sketch again, observe the note about the modern build system in the console
- Ideally everything says the same in terms of functionality
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
For upcoming plugin support we need a way to enable plugins based on each sketch
commit b2f79f6
Author: Stef Tervelde <[email protected]>
Date: Mon Sep 22 14:21:27 2025 +0200
Include root-level Java files in source set
Uncommented and updated the configuration to include all .java files at the project root in the source set. This ensures that Java files located directly in the project directory are recognized and compiled.
commit 4aeff01
Merge: 046a216 72db9b7
Author: Stef Tervelde <[email protected]>
Date: Mon Sep 22 14:07:25 2025 +0200
Merge branch 'main' into gradle-runner
commit 72db9b7
Merge: 0c43ebf aa9fd93
Author: Moon <[email protected]>
Date: Fri Sep 19 08:24:30 2025 -0400
Merge pull request processing#1251 from Stefterv/lsp-libraries-fix
Make sure LSP recognises contributed libraries
commit aa9fd93
Author: Stef Tervelde <[email protected]>
Date: Fri Sep 19 11:19:37 2025 +0200
Make sure contributions are loaded in the lsp
Trigger locating the sketchbook folder so contributed libraries are loaded
commit 0c43ebf
Merge: 9ca92bc 5a108da
Author: Moon <[email protected]>
Date: Thu Sep 18 09:01:09 2025 -0400
Merge pull request processing#1248 from processing/all-contributors/add-SuganthiThomas
docs: add SuganthiThomas as a contributor for code
commit 5a108da
Author: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Date: Thu Sep 18 13:00:49 2025 +0000
docs: update .all-contributorsrc [skip ci]
commit f3198d7
Author: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Date: Thu Sep 18 13:00:48 2025 +0000
docs: update README.md [skip ci]
commit 9ca92bc
Merge: 13e6977 88b9e04
Author: Moon <[email protected]>
Date: Thu Sep 18 08:54:28 2025 -0400
Default DEBUG env value to false, or read actual value instead of only checking for existence
commit 88b9e04
Author: Suganthi Thomas <[email protected]>
Date: Wed Sep 17 22:12:07 2025 -0500
Removed commented lines
commit 014fd93
Author: Suganthi Thomas <[email protected]>
Date: Tue Sep 16 17:43:01 2025 -0500
DEBUG should be set to the actual value.
commit 13e6977
Merge: bdbd025 a741775
Author: Stef Tervelde <[email protected]>
Date: Tue Sep 16 09:12:10 2025 +0200
Merge pull request processing#1239 from Stefterv/develop-menu
Add 'Develop' menu for debug mode with update check
commit a741775
Author: Stef Tervelde <[email protected]>
Date: Fri Sep 12 21:51:13 2025 +0200
Added Language key for `menu.develop.check_for_updates`
commit bdbd025
Merge: 354e560 9b44035
Author: Moon <[email protected]>
Date: Fri Sep 12 14:30:06 2025 -0400
Merge pull request processing#1242 from processing/all-contributors/add-npNSU
docs: add npNSU as a contributor for code
commit 9b44035
Author: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Date: Fri Sep 12 18:26:32 2025 +0000
docs: update .all-contributorsrc [skip ci]
commit 2800725
Author: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Date: Fri Sep 12 18:26:31 2025 +0000
docs: update README.md [skip ci]
commit c3b2c6b
Merge: d3f3611 354e560
Author: Stef Tervelde <[email protected]>
Date: Fri Sep 12 17:54:13 2025 +0200
Merge branch 'processing:main' into develop-menu
commit 354e560
Merge: 2c94b38 9507241
Author: Moon <[email protected]>
Date: Fri Sep 12 11:50:16 2025 -0400
Merge pull request processing#1236 from Stefterv/main
Fix the issue with the pre-processor test
commit 2c94b38
Merge: 34a85df 4495cc5
Author: Moon <[email protected]>
Date: Fri Sep 12 10:54:55 2025 -0400
Merge pull request processing#1192 from npNSU/dxfMigration
Migration of the `dxf` library from Ant to Gradle
commit 4495cc5
Merge: 20425fd 34a85df
Author: Moon <[email protected]>
Date: Fri Sep 12 10:39:45 2025 -0400
Merge branch 'main' into dxfMigration
commit 34a85df
Merge: 2e855a1 3fbfddb
Author: Stef Tervelde <[email protected]>
Date: Fri Sep 12 15:34:22 2025 +0200
Merge pull request processing#1222 from hamoid/addDependencyUpdates
Add Gradle task to check for dependency updates
commit 2e855a1
Merge: 275d789 3814307
Author: Raphaël de Courville <[email protected]>
Date: Fri Sep 12 14:43:31 2025 +0200
Merge pull request processing#1226 from Stefterv/pixel-density-warning
Add warning for default pixelDensity behavior
commit 3814307
Author: Raphaël de Courville <[email protected]>
Date: Fri Sep 12 14:42:36 2025 +0200
Update the warning message for pixelDensity
Made the warning message more helpful
commit 9507241
Author: Stef Tervelde <[email protected]>
Date: Fri Sep 12 07:46:40 2025 +0200
Update bug1532 test and resource file
Adjusted expected exception position in ParserTests for bug1532 and removed QuickTime session initialization from bug1532.pde to reflect updated test requirements.
commit 3fbfddb
Merge: 0e18502 275d789
Author: Stef Tervelde <[email protected]>
Date: Thu Sep 11 16:09:43 2025 +0200
Merge branch 'main' into addDependencyUpdates
commit d3f3611
Author: Stef Tervelde <[email protected]>
Date: Thu Sep 11 16:02:49 2025 +0200
Add 'Develop' menu for debug mode with update check
Introduces a new 'Develop' menu that appears when debug mode is enabled.
commit 0e18502
Author: Abe Pazos <[email protected]>
Date: Thu Sep 11 14:09:19 2025 +0200
Gradle libs.versions.toml: inline "versions" version
commit 275d789
Merge: 11ba3b4 faf5997
Author: Moon <[email protected]>
Date: Tue Sep 9 15:03:41 2025 -0400
Merge pull request processing#1189 from Stefterv/fix-pdf-library
Migration of the `pdf` library to Gradle
commit 11ba3b4
Merge: 43ba46b 00e4243
Author: Moon <[email protected]>
Date: Tue Sep 9 15:02:51 2025 -0400
Merge pull request processing#1232 from Stefterv/gradle-runner-preproc
Moving the `java:preprocessor` to be fully Gradle native
commit 43ba46b
Merge: c570b6d 7e109bd
Author: Moon <[email protected]>
Date: Tue Sep 9 15:01:52 2025 -0400
Merge pull request processing#1228 from Stefterv/format-cli
Adding the sketch format command
commit c570b6d
Merge: e56e281 8f418a2
Author: Moon <[email protected]>
Date: Mon Sep 8 14:41:47 2025 -0400
Merge pull request processing#1227 from awood0727/debugFixUpdate
Updated fix for the debugger issue
commit 8f418a2
Author: Amante' Woodley <[email protected]>
Date: Fri Sep 5 09:53:39 2025 -0400
Updated fix for the dubugger issue
Signed-off-by: Amante' Woodley <[email protected]>
Co-authored-by: Nia Perez <[email protected]>
Co-authored-by: Kayla Bobo <[email protected]>
Co-authored-by: Silas Morgan <[email protected]>
commit 7e109bd
Author: Stef Tervelde <[email protected]>
Date: Fri Sep 5 14:28:03 2025 +0200
Adding the sketch format command
commit 906ab17
Author: Stef Tervelde <[email protected]>
Date: Thu Sep 4 10:34:45 2025 +0200
Add warning for default pixelDensity behavior
Introduces a warning message when pixelDensity defaults to 2x to match the display's pixel density. The warning prompts users to explicitly set pixelDensity in settings() to avoid the message.
commit 452fbce
Author: Abe Pazos <[email protected]>
Date: Sat Aug 30 00:15:17 2025 +0200
Add Gradle task to check for dependency updates
commit 20425fd
Author: [Nia Perez] <[email protected]>
Date: Mon Jul 28 14:30:12 2025 -0400
Worked on migration of the dxf library from Ant to Gradle
Signed-off-by: [Nia Perez] <[email protected]>
Co-authored-by: Amante' Woodley <[email protected]>
Co-authored-by: Kayla Bobo <[email protected]>
Co-authored-by: Silas Morgan <[email protected]>
commit faf5997
Author: Stef Tervelde <[email protected]>
Date: Wed Jul 23 06:58:14 2025 +0200
Migration of the `pdf` library to Gradle
Add a publish-gradle job to the release workflow to publish Processing libraries to the Gradle Plugin Portal using gradle publish with required secrets and version/group env vars. Update gradle/plugins/library/build.gradle.kts to use the com.gradle.plugin-publish plugin, provide plugin metadata (website, vcsUrl, displayName, description, tags) and make the plugin id dynamic ("$group.library"). These changes enable automated publishing of the Gradle plugin with the metadata required by the portal.
Expose the project's group to test JVMs by configuring tasks.withType<Test>() to set systemProperty("project.group", group ?: "org.processing"). Update ProcessingPluginTest to read the plugin id from System.getProperty("project.group") instead of hardcoding the group. Also close the publishing block in build.gradle.kts. This allows tests to adapt when the project group is overridden.
|
@catilac Does it make sense to revisit this or should I close it?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
@Stefterv I think so. I feel like it would be helpful to get community support behind it. People wanting to use it, and I could definitely use help reviewing this. I can help advocate for this change, too.
It could be helpful to update this PR with info on how it works so I and others can review effectively if you're able.
|
Stefterv reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Stefterv
commented
Feb 10, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
Okay I've gotten it up to date with main again. I tried to rebase but that caused a lot of conflicts and git got kinda confused.
Also added more some info in the PR
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Stef, thanks for getting this enormous project started. It will be a huge help to match up the internal build system for sketches with the new gradle system for the wider PDE.
I haven't been able to review all of this in detail, but have run and tested this and left some comments based on the user experience. The main points are:
- there's some new technical jargon in the UI that I'd like to see us wrap with friendlier text, in the current build status
- the new Settings tab feels like a duplication of functionality we already have, so I'd be in favor of merging that with existing settings and moving the run on Android feature to a menu item from the main menu (Android mode currently puts this in the Sketch menu, I think)
- the app name says ProcessingKt now in the mac menu bar (though I'm not sure if this is because of how I ran the app)
I'm also not able to run any P3D examples when I use ./gradlew run. Here's an example of the error output I get:
In Processing code:
processing.opengl.PSurfaceJOGL.initDisplay() @ processing/opengl/PSurfaceJOGL.java:144
processing.opengl.PSurfaceJOGL.initFrame() @ processing/opengl/PSurfaceJOGL.java:131
processing.core.PApplet.initSurface() @ processing/core/PApplet.java:10236
processing.core.PApplet.runSketch() @ processing/core/PApplet.java:10142
processing.core.PApplet.main() @ processing/core/PApplet.java:9861
In your code:
jogamp.newt.DisplayImpl.create() @ jogamp/newt/DisplayImpl.java:314
com.jogamp.newt.NewtFactory.createDisplay() @ com/jogamp/newt/NewtFactory.java:170
com.jogamp.newt.NewtFactory.createDisplay() @ com/jogamp/newt/NewtFactory.java:152
sketch.main() @ sketch.java:56
Exception: java.lang.RuntimeException @ jogamp/newt/DisplayImpl.java:314
java.lang.RuntimeException: com.jogamp.nativewindow.NativeWindowException: Failed to find or initialize class <.macosx.DisplayDriver> -> <jogamp.newt.driver.macosx.DisplayDriver>: windowRepaint
at jogamp.newt.DisplayImpl.create(DisplayImpl.java:314)
at com.jogamp.newt.NewtFactory.createDisplay(NewtFactory.java:170)
at com.jogamp.newt.NewtFactory.createDisplay(NewtFactory.java:152)
at processing.opengl.PSurfaceJOGL.initDisplay(PSurfaceJOGL.java:144)
at processing.opengl.PSurfaceJOGL.initFrame(PSurfaceJOGL.java:131)
at processing.core.PApplet.initSurface(PApplet.java:10236)
at processing.core.PApplet.runSketch(PApplet.java:10142)
at processing.core.PApplet.main(PApplet.java:9861)
at sketch.main(sketch.java:56)
Caused by: com.jogamp.nativewindow.NativeWindowException: Failed to find or initialize class <.macosx.DisplayDriver> -> <jogamp.newt.driver.macosx.DisplayDriver>: windowRepaint
at com.jogamp.newt.NewtFactory.getCustomClass(NewtFactory.java:114)
at jogamp.newt.DisplayImpl.getDisplayClass(DisplayImpl.java:279)
at jogamp.newt.DisplayImpl.create(DisplayImpl.java:285)
... 8 more
Caused by: java.lang.NoSuchMethodError: windowRepaint
at jogamp.newt.driver.macosx.WindowDriver.initIDs0(Native Method)
at jogamp.newt.driver.macosx.DisplayDriver.<clinit>(DisplayDriver.java:67)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:375)
at com.jogamp.newt.NewtFactory.getCustomClass(NewtFactory.java:112)
... 10 more
Could not execute build using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-8.11-bin.zip'.
Execution failed for task ':run'.
Execution failed for task ':run'.
Process 'command '/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
I think our next step is to more clearly define scope for an initial implementation and write an issue that we can use to direct further work. Generally, I'd like to see us match (and modernize) current functionality in an initial patch, then add in new features separately later.
Thank you so much for all your work on this. Let me know if you want to continue with updates or if you'd prefer for someone else to pick up the work from here.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
preferences.editor.smooth=Enable antialiasing in the code editor
|
|
|
preferences.editor.caret.blink=Blink the caret
|
|
|
preferences.editor.caret.block=Use block caret
|
|
|
preferences.use_modern_build_system = Use modern build system (see Processing GitHub Wiki more details)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we call this new or beta build system? And would it be possible to link directly to the relevant page in the wiki from here?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
|
|
|
// TODO: Support modes other than Java
|
|
|
val mode = ModeContribution.load(
|
|
|
null, Platform.getContentFile("modes/java"),
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this code need to change to run other modes in the future? Build systems are not really my area of expertise, so I'm asking this question to understand the code better.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
No newline at end of file
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most files in this project end on a newline, do we want to follow that convention here?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
}
|
|
|
|
|
|
// TODO: Map to .pde file again, @see JavaBuild.placeException
|
|
|
// TODO: This functionality should be provided by the mode
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to implement this conversion to .pde line numbers before this is merged? Presently, the console spits out the raw compilation info if the user presses the Run button, references "sketch.java" with a line number that doesn't match up to what the user sees in the PDE.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
private fun BuildLauncher.addStateListener(){
|
|
|
addProgressListener(ProgressListener { event ->
|
|
|
if(event is TaskStartEvent) {
|
|
|
editor?.statusMessage("Running task: ${event.descriptor.name}", EditorStatus.NOTICE)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UI string needs internationalization
Also wondering if we should directly convey each step to the user or simplify? Right now, it feels like there's a lot of technical jargon displayed in the status message which is not ideal for beginners. I think the experimental p5.js mode handles this ok, we could borrow what they have for UI copy though I'm not sure that would be needed technically to implement this.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
}
|
|
|
if(event is TaskFinishEvent) {
|
|
|
if(event.result is TaskSuccessResult){
|
|
|
editor?.statusMessage("Finished task ${event.descriptor.name}", EditorStatus.NOTICE)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on Mac, this message only shows when the user exits the sketch window with the red button. It does not show when the user hits the stop button, the message stays stuck at "Running task. :run"
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
val group = System.getProperty("processing.group", "org.processing")
|
|
|
val plugins = mutableStateListOf(
|
|
|
GradlePlugin(
|
|
|
"Hot Reload",
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this different from Tweak Mode?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
import processing.app.ui.Theme
|
|
|
import kotlin.io.path.createTempDirectory
|
|
|
|
|
|
// TODO: Highlight errors in the editor in the right place
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a stale todo? if not, sounds like implementing this is essential before merge.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that this data is shown in a new Settings tab in the editor. This gives us two places that are "Settings", one via the main title bar menu and one in a tab below the code. This may make writing documentation and directing people to Settings more confusing. Can these options go in the existing Settings window? Or can we implement building to Android device as a menu item under Sketch (as Android mode does now)?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If hot loading is a new feature, could we separate that into a future patch? Or is it intended to be a replacement for Tweak Mode?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|