From b4afc51b64aa382ce07a5956a4bc291e79fca296 Mon Sep 17 00:00:00 2001 From: Stef Tervelde Date: Sun, 15 Dec 2024 10:46:18 +0100 Subject: [PATCH] Dependencies centralisation 2 --- core/build.gradle.kts | 14 +++++++------- gradle/libs.versions.toml | 15 ++++++++++++++- java/build.gradle.kts | 18 +++++++++--------- java/preprocessor/build.gradle.kts | 9 ++++----- 4 files changed, 34 insertions(+), 22 deletions(-) diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 5f1ee2c66..f3e7bda5f 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -2,7 +2,7 @@ import com.vanniktech.maven.publish.SonatypeHost plugins { id("java") - id("com.vanniktech.maven.publish") version "0.30.0" + alias(libs.plugins.mavenPublish) } group = "org.processing" @@ -25,10 +25,10 @@ sourceSets{ } dependencies { - implementation("org.jogamp.gluegen:gluegen-rt-main:2.5.0") - implementation("org.jogamp.jogl:jogl-all-main:2.5.0") + implementation(libs.jogl) + implementation(libs.gluegen) - testImplementation("junit:junit:4.13.2") + testImplementation(libs.junit) } mavenPublishing{ @@ -56,9 +56,9 @@ mavenPublishing{ } } scm{ - url.set("https://github.com/processing/processing4-carbon-aug-19") - connection.set("scm:git:git://github.com/processing/processing4-carbon-aug-19.git") - developerConnection.set("scm:git:ssh://git@github.com/processing/processing4-carbon-aug-19.git") + url.set("https://github.com/processing/processing4") + connection.set("scm:git:git://github.com/processing/processing4.git") + developerConnection.set("scm:git:ssh://git@github.com/processing/processing4.git") } } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 477af209b..3be5870de 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,17 +1,30 @@ [versions] kotlin = "2.0.20" compose-plugin = "1.7.1" +jogl = "2.5.0" [libraries] +jogl = { module = "org.jogamp.jogl:jogl-all-main", version.ref = "jogl" } +gluegen = { module = "org.jogamp.gluegen:gluegen-rt-main", version.ref = "jogl" } flatlaf = { module = "com.formdev:flatlaf", version = "3.4.1" } jna = { module = "net.java.dev.jna:jna", version = "5.12.1" } jnaplatform = { module = "net.java.dev.jna:jna-platform", version = "5.12.1" } compottie = { module = "io.github.alexzhirkevich:compottie", version = "2.0.0-rc02" } kaml = { module = "com.charleskorn.kaml:kaml", version = "0.65.0" } +junit = { module = "junit:junit", version = "4.13.2" } +mockito = { module = "org.mockito:mockito-core", version = "4.11.0" } +antlr = { module = "org.antlr:antlr4", version = "4.7.2" } +eclipseJDT = { module = "org.eclipse.jdt:org.eclipse.jdt.core", version = "3.40.0" } +classpathExplorer = { module = "com.google.classpath-explorer:classpath-explorer", version = "1.0" } +netbeansSwing = { module = "org.netbeans.api:org-netbeans-swing-outline", version = "RELEASE210" } +ant = { module = "org.apache.ant:ant", version = "1.10.14" } +lsp4j = { module = "org.eclipse.lsp4j:org.eclipse.lsp4j", version = "0.22.0" } +jsoup = { module = "org.jsoup:jsoup", version = "1.17.2" } [plugins] jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" } kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } -download = { id = "de.undercouch.download", version = "5.6.0" } \ No newline at end of file +download = { id = "de.undercouch.download", version = "5.6.0" } +mavenPublish = { id = "com.vanniktech.maven.publish", version = "0.30.0" } \ No newline at end of file diff --git a/java/build.gradle.kts b/java/build.gradle.kts index 71dbffe69..773b55fa1 100644 --- a/java/build.gradle.kts +++ b/java/build.gradle.kts @@ -27,16 +27,16 @@ dependencies{ implementation(project(":core")) implementation(project(":java:preprocessor")) - implementation("org.eclipse.jdt:org.eclipse.jdt.core:3.37.0") - implementation("com.google.classpath-explorer:classpath-explorer:1.0") - implementation("org.netbeans.api:org-netbeans-swing-outline:RELEASE210") - implementation("org.apache.ant:ant:1.10.14") - implementation("org.eclipse.lsp4j:org.eclipse.lsp4j:0.22.0") - implementation("org.jsoup:jsoup:1.17.2") - implementation("org.antlr:antlr4:4.7.2") + implementation(libs.eclipseJDT) + implementation(libs.classpathExplorer) + implementation(libs.netbeansSwing) + implementation(libs.ant) + implementation(libs.lsp4j) + implementation(libs.jsoup) + implementation(libs.antlr) - testImplementation("junit:junit:4.13.2") - testImplementation("org.mockito:mockito-core:4.11.0") + testImplementation(libs.junit) + testImplementation(libs.mockito) } tasks.compileJava{ diff --git a/java/preprocessor/build.gradle.kts b/java/preprocessor/build.gradle.kts index b682c4edd..e859a2b12 100644 --- a/java/preprocessor/build.gradle.kts +++ b/java/preprocessor/build.gradle.kts @@ -2,11 +2,10 @@ import com.vanniktech.maven.publish.SonatypeHost plugins{ id("java") - id("com.vanniktech.maven.publish") version "0.30.0" + alias(libs.plugins.mavenPublish) } group = "org.processing" -version = "4.3.1" repositories{ mavenCentral() @@ -25,10 +24,10 @@ sourceSets{ } dependencies{ - implementation("org.antlr:antlr4:4.7.2") - implementation("org.eclipse.jdt:org.eclipse.jdt.core:3.40.0") + implementation(libs.antlr) + implementation(libs.eclipseJDT) - implementation("org.processing:core:${version}") + implementation(project(":core")) } mavenPublishing{