From 442d0e1635aa0e6628ba5a2221f4118f238f6d9c Mon Sep 17 00:00:00 2001 From: Plopez Date: Sat, 23 Nov 2024 13:57:33 +0100 Subject: [PATCH] Update README.md on how to use the core library from Maven Central. --- core/README.md | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/core/README.md b/core/README.md index 81c77cf013..2a3fdd7fd5 100644 --- a/core/README.md +++ b/core/README.md @@ -1,3 +1,65 @@ +# Including the Processing Core library on your project +Processing’s core libraries are available through [Maven Central](https://central.sonatype.com/artifact/org.processing/core). +This allows integration of Processing into Java-based projects using build tools like Maven or Gradle. + +> [!IMPORTANT] +> Repository https://jogamp.org/deployment/maven must be added to the repository list. +> +> This is because the core library depends on some external libraries that are hosted on the aftermentioned repository. +> See the [Examples](#Examples) section on how to do this. + +## Examples +Here are some examples on how to add the Processing core library to the Maven and Gradle build systems. +All examples consist on two parts: +1. Adds the https://jogamp.org/deployment/maven repository to the build system to satisfy dependencies needed by the Processing core library. +2. Adds the Processing core library as a dependency to your project. +### Maven +```xml + + + jogamp + https://jogamp.org/deployment/maven + + + + + + org.processing + core + 4.3.1 + + +``` +### Gradle (kotlin) +```gradle +repositories { + mavenCentral() + maven { + url = uri("https://jogamp.org/deployment/maven") + } +} + +dependencies { + implementation("org.processing:core:4.3.1") +} +``` +### Gradle (groovy) +```gradle +repositories { + mavenCentral() + maven { + url = uri("https://jogamp.org/deployment/maven") + } +} + +dependencies { + implementation group: 'org.processing', name: 'core', version: '4.3.1' +} +``` +### Other +Other example snippets on including the library are included in the [Maven Central repo](https://central.sonatype.com/artifact/org.processing/core). +Please look up on how to add the custom https://jogamp.org/deployment/maven repository to your build system. + ## There are significant changes to `core` in Processing 3.