Set Java toolchain to version 17 in library plugin

Configured the ProcessingLibraryPlugin to use Java toolchain version 17 via JavaPluginExtension. Also marked the 'createLibrary' task in dxf library build script as deprecated, recommending use of the 'bundleLibrary' task from the plugin.

Add custom Gradle plugin for Processing libraries

Introduces a new Gradle plugin module for Processing libraries, including plugin implementation, extension, and configuration classes. Updates the DXF library to use the new plugin and configuration DSL, and adjusts project settings to include and manage the plugin build.

Add bundleLibrary task and update library plugin

Introduces BundleLibraryFilesTask to handle bundling of Processing library files, replacing the removed CollectLibraryFilesTask. Updates ProcessingLibraryPlugin to register the new bundleLibrary task, which collects the jar, runtime dependencies, examples, javadoc, and generates library.properties. Also adds a 'name' property to ProcessingLibraryConfiguration and comments out the old createLibrary Copy task in dxf's build script.

Refactor library bundling logic into task class

Moved the logic for bundling Processing library files from the plugin registration into the BundleLibraryFilesTask class. The task now takes a ProcessingLibraryConfiguration and handles copying jars, dependencies, examples, javadocs, and generating library.properties internally. Also made ProcessingLibraryConfiguration serializable for safer Gradle usage.

Update library version handling and add zip task

Changed ProcessingLibraryConfiguration.version from String to Int for stricter versioning. Added a zipLibrary Gradle task to package the library folder as .zip and .pdex archives. Updated dxf library build script to use new version format and incremented version to 1.

Add installLibrary task and update DXF build config

Introduces an installLibrary Gradle task to automate Processing library installation using user preferences. Also re-enables the createLibrary copy task in the DXF library build script and removes minRevision/maxRevision constraints from the library configuration.

Only run when actually running the task -.-

Refactor library author metadata handling

Changed the authors field in ProcessingLibraryConfiguration from a list of names to a map of author names to URLs, updating related code to format authors as markdown links. Updated the DXF library build configuration to use the new authors map structure. Added documentation comments to ProcessingLibraryConfiguration properties for clarity.
This commit is contained in:
Stef Tervelde
2025-11-27 10:12:17 +01:00
parent 023bfd2896
commit eddeda4346
7 changed files with 330 additions and 12 deletions

View File

@@ -1,5 +1,23 @@
plugins{
java
id("org.processing.library")
}
processing {
library {
version = 1
prettyVersion = "1.0.0"
authors = mapOf(
"The Processing Foundation" to "https://processing.org"
)
url = "https://processing.org/"
categories = listOf("file", "exporter", "dxf")
sentence = "DXF export library for Processing"
paragraph =
"This library allows you to export your Processing drawings as DXF files, which can be opened in CAD applications."
}
}
sourceSets {
@@ -9,27 +27,23 @@ sourceSets {
}
}
}
repositories{
mavenCentral()
maven("https://jogamp.org/deployment/maven/")
}
dependencies{
compileOnly(project(":core"))
implementation("com.lowagie:itext:2.1.7")
}
tasks.register<Copy>("createLibrary"){
/**
* @deprecated Legacy task, use 'bundleLibrary' task provided by 'org.processing.library' plugin
*/
tasks.register<Copy>("createLibrary") {
dependsOn("jar")
into(layout.buildDirectory.dir("library"))
from(layout.projectDirectory){
include ("library.properties")
from(layout.projectDirectory) {
include("library.properties")
include("examples/**")
}
from(configurations.runtimeClasspath){
from(configurations.runtimeClasspath) {
into("library")
}