Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
0299209
Squashed commit of the following:
Stefterv Jul 1, 2025
0d1fcc4
Added documentation and todo's
Stefterv Jul 1, 2025
4cca647
Updated error reporting
Stefterv Jul 1, 2025
1c42961
Gradle Task error printing
Stefterv Jul 1, 2025
fcb554a
Rename gradle plugin and further planning
Stefterv Jul 2, 2025
bd5aba4
Allowing libraries folder to not exist, but log instead
Stefterv Jul 2, 2025
67de82f
Removed error & out streams, has been piped directly into System
Stefterv Jul 2, 2025
e6474e1
Small tweaks and wrote motivation for Gradle Build system
Stefterv Jul 2, 2025
1762b74
Simplified Gradle Service, improved sketch logging, fixed toolbar state
Stefterv Jul 2, 2025
5409912
Improved Gradle Error logging
Stefterv Jul 2, 2025
efd03db
Fixed gradle runner issues
Stefterv Jul 2, 2025
772567c
Build system indicators, Language keys and filtering SLF4J warnings
Stefterv Jul 2, 2025
b165d0a
Add all library jars
Stefterv Jul 2, 2025
e727dbf
Support for readonly sketches
Stefterv Jul 2, 2025
24cb4f4
Improved Error reporting
Stefterv Jul 4, 2025
d7c6aeb
Also copy Untitled sketches
Stefterv Jul 4, 2025
cebc352
Snap support
Stefterv Jul 4, 2025
b709fe3
Merge branch 'gradle-runner' of https://github.com/Stefterv/processin…
Stefterv Jul 4, 2025
5729e88
Show error logs to the user
Stefterv Jul 7, 2025
a11d2ff
Logging sketches to separate stream & small refactor
Stefterv Jul 7, 2025
b64505d
Gradle Service refactor
Stefterv Jul 7, 2025
7379166
Processing Plugin tests & Refactor
Stefterv Jul 8, 2025
a36c8a3
Plugin tests bugfixes
Stefterv Jul 8, 2025
b712390
Fixed rename Windres task
Stefterv Jul 8, 2025
c55e286
Speed up gradle compilations
Stefterv Jul 8, 2025
550200c
Comments and planning
Stefterv Jul 9, 2025
f916d27
Adding a settings panel to the editor
Stefterv Jul 16, 2025
0c674ad
Initial Gradle Plugin configuration
Stefterv Jul 17, 2025
fdc43dc
Hot Reloading plugin
Stefterv Jul 17, 2025
578c287
Build on save
Stefterv Jul 18, 2025
570e9db
Automatically download jdk
Stefterv Jul 18, 2025
046a216
Merge branch 'main' into gradle-runner
Stefterv Sep 8, 2025
9f7be0c
Squashed commit of the following:
Stefterv Sep 8, 2025
e0cfc91
remove the hot-reload from this plugin for now
Stefterv Sep 8, 2025
6812454
Merge branch 'gradle-runner' into gradle-runner-final
Stefterv Sep 8, 2025
bae6533
Squashed commit of the following:
Stefterv Sep 22, 2025
f46bd75
Publish Processing Gradle plugin
Stefterv Feb 3, 2026
0cf146a
Publish plugins in release workflow
Stefterv Feb 7, 2026
cc780cf
Update build.gradle.kts
Stefterv Feb 7, 2026
8b0cdaf
Set project.group system property for tests
Stefterv Feb 7, 2026
5fb43b6
Update build.gradle.kts
Stefterv Feb 7, 2026
ff6fdb3
Merge branch 'main' into gradle-runner-final
Stefterv Feb 10, 2026
79a7229
Fixes differences from `main`
Stefterv Feb 10, 2026
2e1ac47
Merge branch 'gradle-publishing' into gradle-runner-final
Stefterv Feb 10, 2026
9d6e552
Fixed group linking so now it can be build locally
Stefterv Feb 10, 2026
8d96813
Merge branch 'main' into gradle-runner-final
Stefterv Feb 10, 2026
0b58942
Add toggle to settings
Stefterv Feb 10, 2026
9680832
Merge branch 'gradle-runner-final' of https://github.com/Stefterv/pro…
Stefterv Feb 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Simplified Gradle Service, improved sketch logging, fixed toolbar state
  • Loading branch information
Stefterv committed Jul 2, 2025
commit 1762b74c90cb98d6cf28e15b944c5474882780e8
5 changes: 4 additions & 1 deletion app/src/processing/app/gradle/GradleJob.kt
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ class GradleJob{
withCancellationToken(cancel.token())
addStateListener()
addDebugging()
setStandardOutput(System.out)
if(Base.DEBUG) {
setStandardOutput(System.out)
setStandardError(System.err)
}
run()
Expand All @@ -83,6 +83,7 @@ class GradleJob{
":run" -> {
state.value = State.RUNNING
Messages.log("Start run")
service?.editor?.toolbar?.activateRun()
}
}

Expand All @@ -99,6 +100,8 @@ class GradleJob{
}
":run"->{
state.value = State.NONE
service?.editor?.toolbar?.deactivateRun()
service?.editor?.toolbar?.deactivateStop()
}
}
}
Expand Down
34 changes: 16 additions & 18 deletions app/src/processing/app/gradle/GradleService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ package processing.app.gradle

import androidx.compose.runtime.mutableStateListOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.snapshotFlow
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import org.gradle.tooling.BuildLauncher
import processing.app.Base
import processing.app.Language
Expand Down Expand Up @@ -46,38 +50,32 @@ class GradleService(
val workingDir = createTempDirectory()
val debugPort = (30_000..60_000).random()

// TODO: Add support for present
fun run(){
stopActions()

val job = GradleJob()
job.service = this
job.configure = {
setup()
forTasks("run")
}
jobs.add(job)
job.start()
startAction("run")
}

fun export(){
startAction("runDistributable")
}

fun stop(){
stopActions()
}

private fun startAction(vararg tasks: String) {
if(!active.value) return

val job = GradleJob()
job.service = this
job.configure = {
setup()
forTasks("runDistributable")
forTasks(tasks.joinToString(" "))
}
jobs.add(job)
job.start()
}

fun stop(){
stopActions()
}

fun stopActions(){
private fun stopActions(){
jobs
.forEach(GradleJob::cancel)
}
Expand Down Expand Up @@ -108,7 +106,7 @@ class GradleService(
"settings" to Platform.getSettingsFolder().absolutePath.toString(),
"unsaved" to unsaved.joinToString(","),
"debugPort" to debugPort.toString(),
"fullscreen" to false, // TODO: Implement
"fullscreen" to System.getProperty("processing.fullscreen", "false").equals("true"),
"display" to 1, // TODO: Implement
"external" to true,
"location" to null, // TODO: Implement
Expand Down
4 changes: 4 additions & 0 deletions app/src/processing/app/ui/EditorConsole.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,11 @@ private boolean suppressMessage(String what, boolean err) {
// "java.lang.NoSuchMethodError: accessibilityHitTest"
// https://github.com/processing/processing4/issues/368
return true;
} else if (what.contains("__MOVE__")) {
// Don't display the "Move" message that is used to position the sketch window
return true;
}

} else { // !err
if (what.contains("Listening for transport dt_socket at address")) {
// Message from the JVM about the socket launch for debug
Expand Down
7 changes: 2 additions & 5 deletions java/src/processing/mode/java/JavaEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,8 @@ protected void handleLaunch(boolean present, boolean tweak) {
toolbar.activateRun();

if(this.service.getEnabled()){
System.setProperty("processing.fullscreen", present ? "true" : "false");
System.setProperty("processing.tweak", tweak ? "true" : "false");
this.service.run();
return;
}
Expand Down Expand Up @@ -676,12 +678,7 @@ protected void handleLaunch(boolean present, boolean tweak) {
*/
public void handleStop() {
if(this.service.getEnabled()){
// TODO: Improve Gradle UI Feedback
toolbar.activateStop();
this.service.stop();

toolbar.deactivateStop();
toolbar.deactivateRun();
return;
}

Expand Down