Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,43 @@ jobs:

ORG_GRADLE_PROJECT_version: ${{ needs.version.outputs.version }}
ORG_GRADLE_PROJECT_group: ${{ vars.GRADLE_GROUP }}

publish-gradle:
name: Publish Processing Plugins to Gradle Plugin Portal
runs-on: ubuntu-latest
needs: version
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Processing
uses: ./.github/actions/setup

- name: Publish plugins to Gradle Plugin Portal
run: ./gradlew publishPlugins
env:
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}

ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_IN_MEMORY_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_IN_MEMORY_KEY_PASSWORD }}

ORG_GRADLE_PROJECT_version: ${{ needs.version.outputs.version }}
ORG_GRADLE_PROJECT_group: ${{ vars.GRADLE_GROUP }}

- name: Publish internal plugins to Gradle Plugin Portal
run: ./gradlew -c gradle/plugins/settings.gradle.kts publishPlugins
env:
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}

ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_IN_MEMORY_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_IN_MEMORY_KEY_PASSWORD }}

ORG_GRADLE_PROJECT_version: ${{ needs.version.outputs.version }}
ORG_GRADLE_PROJECT_group: ${{ vars.GRADLE_GROUP }}
ORG_GRADLE_PROJECT_publishingGroup: ${{ vars.GRADLE_GROUP }}

release-windows:
name: (windows/${{ matrix.arch }}) Create Processing Release
runs-on: ${{ matrix.os }}
Expand Down
40 changes: 40 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions app/ant/processing/app/gradle/GradleService.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package processing.app.gradle;

import processing.app.Mode;
import processing.app.Sketch;
import processing.app.ui.Editor;

import java.io.PrintStream;

public class GradleService {
public GradleService(Mode mode, Editor editor) { }

public void setEnabled(boolean enabled) {}
public boolean getEnabled() { return false; }
public void prepare(){}
public void run() {}
public void export(){}
public void stop() {}
public void startService() {}
public void setSketch(Sketch sketch) {}
public void setErr(PrintStream err) {}
public void setOut(PrintStream out) {}
}
78 changes: 64 additions & 14 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,66 @@ compose.desktop {
application {
mainClass = "processing.app.ProcessingKt"

jvmArgs(*listOf(
jvmArgs(
*listOf(
Pair("processing.group", group),
Pair("processing.version", rootProject.version),
Pair("processing.revision", findProperty("revision") ?: Int.MAX_VALUE),
Pair("processing.contributions.source", "https://contributions.processing.org/contribs"),
Pair("processing.download.page", "https://processing.org/download/"),
Pair("processing.download.latest", "https://processing.org/download/latest.txt"),
Pair("processing.tutorials", "https://processing.org/tutorials/"),
).map { "-D${it.first}=${it.second}" }.toTypedArray())
).map { "-D${it.first}=${it.second}" }.toTypedArray()
)

nativeDistributions{
modules("jdk.jdi", "java.compiler", "jdk.accessibility", "jdk.zipfs", "java.management.rmi", "java.scripting", "jdk.httpserver")
modules(
"jdk.jdi",
"java.compiler",
"jdk.accessibility",
"jdk.zipfs",
"java.management.rmi",
"java.scripting",
"jdk.httpserver"
)
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "Processing"




fileAssociation("application/x-processing","pde", "Processing Source Code",rootProject.file("build/shared/lib/icons/pde-512.png"), rootProject.file("build/windows/pde.ico"), rootProject.file("build/macos/pde.icns"))
fileAssociation("application/x-processing","pyde", "Processing Python Source Code",rootProject.file("build/shared/lib/icons/pde-512.png"), rootProject.file("build/windows/pde.ico"), rootProject.file("build/macos/pde.icns"))
fileAssociation("application/x-processing","pdez", "Processing Sketch Bundle",rootProject.file("build/shared/lib/icons/pde-512.png"), rootProject.file("build/windows/pdze.ico"), rootProject.file("build/macos/pdez.icns"))
fileAssociation("application/x-processing","pdex", "Processing Contribution Bundle", rootProject.file("build/shared/lib/icons/pde-512.png"), rootProject.file("build/windows/pdex.ico"), rootProject.file("build/macos/pdex.icns"))
fileAssociation(
"application/x-processing",
"pde",
"Processing Source Code",
rootProject.file("build/shared/lib/icons/pde-512.png"),
rootProject.file("build/windows/pde.ico"),
rootProject.file("build/macos/pde.icns")
)
fileAssociation(
"application/x-processing",
"pyde",
"Processing Python Source Code",
rootProject.file("build/shared/lib/icons/pde-512.png"),
rootProject.file("build/windows/pde.ico"),
rootProject.file("build/macos/pde.icns")
)
fileAssociation(
"application/x-processing",
"pdez",
"Processing Sketch Bundle",
rootProject.file("build/shared/lib/icons/pde-512.png"),
rootProject.file("build/windows/pdze.ico"),
rootProject.file("build/macos/pdez.icns")
)
fileAssociation(
"application/x-processing",
"pdex",
"Processing Contribution Bundle",
rootProject.file("build/shared/lib/icons/pde-512.png"),
rootProject.file("build/windows/pdex.ico"),
rootProject.file("build/macos/pdex.icns")
)

macOS{
bundleID = "${rootProject.group}.app"
Expand Down Expand Up @@ -126,6 +165,9 @@ dependencies {
implementation(libs.kaml)
implementation(libs.markdown)
implementation(libs.markdownJVM)
implementation(gradleApi())
implementation(libs.clikt)
implementation(libs.kotlinxSerializationJson)

implementation(libs.clikt)
implementation(libs.kotlinxSerializationJson)
Expand All @@ -136,7 +178,6 @@ dependencies {
testImplementation(libs.mockitoKotlin)
testImplementation(libs.junitJupiter)
testImplementation(libs.junitJupiterParams)

}

tasks.test {
Expand Down Expand Up @@ -265,7 +306,7 @@ tasks.register("generateSnapConfiguration"){
)
}
}
tasks.register("generateFlatpakConfiguration"){
tasks.register("generateFlatpakConfiguration") {
val identifier = findProperty("flathubidentifier") as String? ?: "org.processing.pde"

val dir = distributable().destinationDir.get()
Expand All @@ -289,7 +330,7 @@ fun replaceVariablesInFile(
target: RegularFile,
variables: Map<String, String>,
sections: List<String>
){
) {
var content = source.asFile.readText()
for ((key, value) in variables) {
content = content.replace("\$$key", value)
Expand Down Expand Up @@ -318,7 +359,7 @@ tasks.register<Exec>("packageSnap"){
commandLine("snapcraft")
}

tasks.register<Exec>("buildFlatpak"){
tasks.register<Exec>("buildFlatpak") {
onlyIf { OperatingSystem.current().isLinux }
dependsOn("generateFlatpakConfiguration")
group = "compose desktop"
Expand All @@ -338,7 +379,7 @@ tasks.register<Exec>("buildFlatpak"){
)
}

tasks.register<Exec>("packageFlatpak"){
tasks.register<Exec>("packageFlatpak") {
onlyIf { OperatingSystem.current().isLinux }
dependsOn("buildFlatpak")
group = "compose desktop"
Expand Down Expand Up @@ -468,7 +509,7 @@ tasks.register<Copy>("includeJavaModeResources") {
}
// TODO: Move to java mode
tasks.register<Copy>("renameWindres") {
dependsOn("includeSharedAssets","includeJavaModeResources")
dependsOn("includeSharedAssets", "includeJavaModeResources")
val dir = composeResources("modes/java/application/launch4j/bin/")
val os = DefaultNativePlatform.getCurrentOperatingSystem()
val platform = when {
Expand Down Expand Up @@ -571,9 +612,9 @@ tasks.register("signResources"){
}
file(composeResources("Info.plist")).delete()
}
}


}
tasks.register("setExecutablePermissions") {
description = "Sets executable permissions on binaries in Processing.app resources"
group = "compose desktop"
Expand All @@ -598,6 +639,15 @@ tasks.register("setExecutablePermissions") {
afterEvaluate {
tasks.named("prepareAppResources").configure {
dependsOn("includeProcessingResources")
// Make sure all libraries are bundled in the maven repository distributed with the app
dependsOn(
listOf(
"core",
"java:preprocessor",
"java:gradle",
"java:gradle:hotreload",
"app:utils"
).map { project(":$it").tasks.named("publishAllPublicationsToAppRepository") })
}
tasks.named("createDistributable").configure {
dependsOn("includeJdk")
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/resources/defaults.txt
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ console.temp.days = 7
console.scrollback.lines = 500
console.scrollback.chars = 40000

# run java sketches with Gradle aka the Modern Build System
run.use_gradle = false

# Any additional Java options when running.
# If you change this and can't run things, it's your own durn fault.
run.options =
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/resources/languages/PDE.properties
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ preferences.editor.window.height.min=Minimum editor window height
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)

# Sketchbook Location (Frame)
sketchbook_location = Select new sketchbook folder
Expand Down Expand Up @@ -377,6 +378,13 @@ debugger.name = Name
debugger.value = Value
debugger.type = Type

# Gradle
gradle.instructions = About this file: \nProcessing creates this file when you run your sketch. \nIt configures the tools needed to build and export your code. \nLearn more: [Gradle Primer link]\n \nTo customize this file: \n1. Delete the line above that begins with '@processing-auto-generated'. \nThis will prevent Processing from overwriting this file in the future. \n2. Make your desired changes.
gradle.using_gradle = Building sketch using the new build system. (See settings to switch to the legacy build system.)
gradle.using_eclipse = Building sketch using the legacy build system. (See settings to switch to the new build system.)
gradle.settings = Settings
gradle.settings.plugins = Plugins (experimental)

# ---------------------------------------
# Toolbars

Expand Down
1 change: 0 additions & 1 deletion app/src/processing/app/Language.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ static public Language init() {
return instance;
}


static private String get(String key) {
LanguageBundle bundle = init().bundle;

Expand Down
2 changes: 2 additions & 0 deletions app/src/processing/app/Preferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ static public String getSketchbookPath() {


static protected void setSketchbookPath(String path) {
// Unify path seperator for all platforms
path = path.replace(File.separatorChar, '/');
set("sketchbook.path.four", path); //$NON-NLS-1$
}
}
4 changes: 3 additions & 1 deletion app/src/processing/app/Processing.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import com.github.ajalt.clikt.parameters.options.option
import processing.app.api.Contributions
import processing.app.api.SketchCommand
import processing.app.api.Sketchbook
import processing.app.gradle.api.Sketch
import processing.app.ui.Start
import java.io.File
import java.util.prefs.Preferences
Expand All @@ -34,7 +35,8 @@ suspend fun main(args: Array<String>){
LegacyCLI(args),
Contributions(),
Sketchbook(),
SketchCommand()
SketchCommand(),
Sketch()
)
.main(args)
}
Expand Down
4 changes: 3 additions & 1 deletion app/src/processing/app/Sketch.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
* Stores information about files in the current sketch.
*/
public class Sketch {
public static final String PROPERTIES_NAME = "sketch.properties";

private final Editor editor;
private final Mode mode;

Expand Down Expand Up @@ -1305,7 +1307,7 @@ static protected Settings loadProperties(File folder) throws IOException {
}
return null;
*/
return new Settings(new File(folder, "sketch.properties"));
return new Settings(new File(folder, PROPERTIES_NAME));
}


Expand Down
Loading