Skip to content
Merged
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
29 changes: 24 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,37 @@ plugins {
//==========================
// USER BUILD CONFIGURATIONS

// group id of your library. Often is reverse domain
group = "com.example"

// version of library, usually semver
// The group ID of your library, which uniquely identifies your project.
// It's often written in reverse domain name notation.
// For example, if your website is "myDomain.com", your group ID might be "com.myDomain".
// Replace "com.myDomain" with your own domain or organization name.
group = "com.myDomain"

// The version of your library. It usually follows semantic versioning (semver),
// which uses three numbers separated by dots: "MAJOR.MINOR.PATCH" (e.g., "1.0.0").
// - MAJOR: Increases when you make incompatible changes.
// - MINOR: Increases when you add new features that are backward-compatible.
// - PATCH: Increases when you make backward-compatible bug fixes.
// You can update these numbers as you release new versions of your library.
version = "1.0.0"

// the short name of your library. This string will name relevant files and folders.
// Such as:
// <libName>.jar will be the name of your build jar
// <libName>.zip will be the name of your release file
// this name defaults to the rootProject.name
// this name defaults to the rootProject.name, which is set in settings.gradle.kts
val libName = rootProject.name

// Sets the Java version to use for compiling your library.
// Processing4 was compiled with Java version 17, so it's recommended to compile your library with version 17.
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

// Repositories where dependencies will be fetched from.
// You can add additional repositories here if your dependencies are hosted elsewhere.
repositories {
mavenCentral()

Expand All @@ -36,13 +48,18 @@ repositories {
maven { url = uri("https://jogamp.org/deployment/maven/") }
}

// Add any external dependencies your library requires here.
// The provided example uses Apache Commons Math. Replace or add as needed.
dependencies {
// resolve Processing core
compileOnly("com.github.micycle1:processing-core-4:4.3.1")
// We are currently resolving from an unofficial, jitpack-enabled, processing4 repository.
// Eventually, this will change to an official source.

// insert your external dependencies
// TODO actually use dependency in library
implementation("org.apache.commons:commons-math3:3.6.1")
// The provided example uses org.apache.commons:commons-math3. Replace or add as needed.

// To add a dependency on a Processing library that is installed locally,
// uncomment the line below, and replace <library folder> with the location of that library
Expand All @@ -52,6 +69,8 @@ dependencies {
testImplementation("org.junit.jupiter:junit-jupiter")
}

// Settings for how the JAR file (your library) will be built.
// You want to name your jar with the library short name, aka libName.
tasks.jar {
archiveBaseName.set(libName)
archiveClassifier.set("")
Expand Down
6 changes: 5 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
rootProject.name = "mylibrary"
// the short name of your library. This string will name relevant files and folders.
// Such as:
// <rootProject.name>.jar will be the name of your build jar
// <rootProject.name>.zip will be the name of your release file
rootProject.name = "myLibrary"