Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 7 additions & 2 deletions gradle/plugins/library/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
plugins {
`java-gradle-plugin`
id("com.gradle.plugin-publish") version "2.0.0"
kotlin("jvm") version "2.2.20"
}

gradlePlugin {
website = "https://processing.org/"
vcsUrl = "https://github.com/processing/processing4"
plugins {
create("processing.library") {
id = "org.processing.library"
id = project.properties.getOrElse("publishingGroup", { "org.processing" }).toString() + ".library"
displayName = "Processing Library Plugin"
description = "Gradle plugin for building Processing libraries"
tags = listOf("processing", "library", "dsl")
implementationClass = "ProcessingLibraryPlugin"
}
}
Expand Down
14 changes: 12 additions & 2 deletions java/gradle/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,20 @@ dependencies{
testImplementation(libs.junit)
}

// TODO: CI/CD for publishing the plugin to the Gradle Plugin Portal
gradlePlugin{
website = "https://processing.org/"
vcsUrl = "https://github.com/processing/processing4"
plugins{
create("processing.java"){
id = "org.processing.java"
id = "$group.java"
displayName = "Processing Plugin"
description = "Gradle plugin for building Processing sketches"
tags = listOf("processing", "sketch", "dsl")
implementationClass = "org.processing.java.gradle.ProcessingPlugin"
}
}
}

publishing{
repositories{
mavenLocal()
Expand All @@ -38,4 +43,9 @@ publishing{
url = uri(project(":app").layout.buildDirectory.dir("resources-bundled/common/repository").get().asFile.absolutePath)
}
}
}
// Grab the group before running tests, since the group is used in the test configuration and may be modified by the publishing configuration
val testGroup = group.toString()
tasks.withType<Test>().configureEach {
systemProperty("project.group", testGroup)
}
2 changes: 1 addition & 1 deletion java/gradle/src/test/kotlin/ProcessingPluginTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ProcessingPluginTest{
val sketchFolder = directory.newFolder("sketch")
directory.newFile("sketch/build.gradle.kts").writeText("""
plugins {
id("org.processing.java")
id("${System.getProperty("project.group")}.java")
}
""".trimIndent())
directory.newFile("sketch/settings.gradle.kts")
Expand Down