Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gradle version catalogue #5237

Merged
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
251 changes: 76 additions & 175 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ plugins {
id "application"
id "base"
id "java"
id "org.ajoberstar.grgit" version "5.2.1"
id 'org.openjfx.javafxplugin' version '0.0.14'
id 'org.beryx.runtime' version '1.13.1'
id "com.google.protobuf" version "0.9.4"
id 'com.github.johnrengelman.shadow' version '8.1.1'

id "com.diffplug.spotless" version "6.25.0" apply false
alias(libs.plugins.grgit)
alias(libs.plugins.javafx)
alias(libs.plugins.jpackage.runtime)
alias(libs.plugins.protobuf)
alias(libs.plugins.shadow)

alias(libs.plugins.spotless) apply false
}

allprojects {
Expand Down Expand Up @@ -354,177 +355,77 @@ def zipJpackageImage = tasks.register('zipJpackageImage', Zip) {

// In this section you declare the dependencies for your production and test code
dependencies {
forms group: 'com.jetbrains.intellij.java', name: 'java-compiler-ant-tasks', version: '233.14475.56'

implementation project(':clientserver')

implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.22.1'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.22.1'
implementation group: 'org.apache.logging.log4j', name: 'log4j-1.2-api', version: '2.20.0' // Bridges v1 to v2 for other code in other libs
implementation group: 'org.slf4j', name: 'slf4j-simple', version: '2.0.16'
implementation group: 'commons-logging', name: 'commons-logging', version: '1.3.0'

// Image processing lib
implementation group: 'com.twelvemonkeys.imageio', name: 'imageio-core', version: '3.10.1' // https://mvnrepository.com/artifact/com.twelvemonkeys.imageio/imageio-core
implementation group: 'com.twelvemonkeys.imageio', name: 'imageio-jpeg', version: '3.12.0' // https://mvnrepository.com/artifact/com.twelvemonkeys.imageio/imageio-core
implementation group: 'com.twelvemonkeys.imageio', name: 'imageio-psd', version: '3.10.1' // https://mvnrepository.com/artifact/com.twelvemonkeys.imageio/imageio-psd
implementation group: 'com.twelvemonkeys.imageio', name: 'imageio-tiff', version: '3.12.0'
implementation group: 'com.twelvemonkeys.imageio', name: 'imageio-batik', version: '3.12.0'
implementation group: 'com.twelvemonkeys.imageio', name: 'imageio-tga', version: '3.12.0'
implementation group: 'com.twelvemonkeys.imageio', name: 'imageio-bmp', version: '3.10.1'
// For Twelvemonkey SVG
implementation 'org.apache.xmlgraphics:batik-all:1.17'


// For Sentry bug reporting
implementation group: 'io.sentry', name: 'sentry', version: '1.7.29'
implementation group: 'io.sentry', name: 'sentry-log4j2', version: '1.7.29'

// parsing of configuration data
implementation group: 'org.apache.commons', name: 'commons-configuration2', version: '2.11.0'
// Specialized collections: ReferenceMap, LinkedMap.
implementation 'org.apache.commons:commons-collections4:4.4'
// Various file utilities
implementation 'commons-io:commons-io:2.15.1'
// ftp client
implementation 'commons-net:commons-net:3.11.1'
// commandline parsing
implementation 'commons-cli:commons-cli:1.6.0'
implementation 'org.apache.commons:commons-lang3:3.17.0'

// needed for preference dialog at runtime
implementation 'commons-beanutils:commons-beanutils:1.9.4'

// RPTool Libs
// default ressources (token, textures etc.)
implementation 'com.github.RPTools:maptool-resources:1.6.0'
// parser for macros
implementation 'com.github.RPTools:parser:1.8.3'

// Currently hosted on nerps.net/repo
implementation group: 'com.jidesoft', name: 'jide-common', version: '3.7.9'
implementation group: 'com.jidesoft', name: 'jide-components', version: '3.7.9'
implementation group: 'com.jidesoft', name: 'jide-dialogs', version: '3.7.9'
implementation group: 'com.jidesoft', name: 'jide-dock', version: '3.7.9'
implementation group: 'com.jidesoft', name: 'jide-editor', version: '3.7.9'
implementation group: 'com.jidesoft', name: 'jide-grids', version: '3.7.9'
implementation group: 'com.jidesoft', name: 'jide-properties', version: '3.7.9'
implementation group: 'com.jidesoft', name: 'jide-shortcut', version: '3.7.9'

// utils for handling reflection
implementation 'org.reflections:reflections:0.10.2'

// find running instances in LAN
implementation 'net.tsc.servicediscovery:servicediscovery:1.0.b5'

//maybe replace with jupnp
implementation 'commons-jxpath:commons-jxpath:1.3'
implementation 'com.github.fishface60:upnplib:0351d7502a57f6c5dc8653220bc03ad99af58b21'

// custom binding stuff, should probably be replace with Beans Binding (JSR 295)
implementation 'yasb:yasb:0.2-21012007'

implementation 'de.muntjak.tinylookandfeel:tinylaf-nocp:1.4.0'

// serialize to and from xml
implementation 'com.thoughtworks.xstream:xstream:1.4.21'

// themes
implementation 'com.formdev:flatlaf:3.5.4'
implementation 'com.formdev:flatlaf-intellij-themes:3.5.4'
implementation 'com.formdev:flatlaf-extras:3.5.4'
implementation 'com.github.weisj:jsvg:1.4.0'
implementation 'com.formdev:flatlaf-jide-oss:3.5.4'

// JS support for macros
implementation group: 'org.graalvm.js', name: 'js', version: '21.2.0'
implementation group: 'org.graalvm.js', name: 'js-scriptengine', version: '21.1.0'

implementation 'com.jayway.jsonpath:json-path:2.9.0'

// For PDF image extraction
implementation 'org.apache.pdfbox:pdfbox:3.0.0'
implementation 'org.apache.pdfbox:pdfbox-tools:3.0.0'
implementation 'org.bouncycastle:bcmail-jdk15on:1.70' // To decrypt passworded/secured pdf's
implementation 'com.github.jai-imageio:jai-imageio-core:1.4.0' // For pdf image extraction, specifically for jpeg2000 (jpx) support.
implementation 'com.github.jai-imageio:jai-imageio-jpeg2000:1.4.0' // For pdf image extraction, specifically for jpeg2000 (jpx) support.

implementation 'com.github.gotson:webp-imageio:0.2.2' // webp support https://search.maven.org/artifact/com.github.gotson/webp-imageio/0.2.2/jar

// For syntax highlighting in macro editor
implementation "com.fifesoft:rsyntaxtextarea:3.5.3" // https://mvnrepository.com/artifact/com.fifesoft/rsyntaxtextarea
implementation "com.fifesoft:rstaui:3.3.1" // https://mvnrepository.com/artifact/com.fifesoft/rstaui
implementation "com.fifesoft:autocomplete:3.3.1" // https://mvnrepository.com/artifact/com.fifesoft/autocomplete
implementation "com.fifesoft:languagesupport:3.3.0"

// For simple xml work in Hero Lab integration
implementation group: 'com.jcabi', name: 'jcabi-xml', version: '0.33.5' // https://mvnrepository.com/artifact/com.jcabi/jcabi-xml

// For some math functions used in the A* Pathfinding
// https://locationtech.github.io/jts/jts-features.html
implementation group: 'org.locationtech.jts', name: 'jts-core', version: '1.19.0' // https://mvnrepository.com/artifact/org.locationtech.jts/jts-core

// For RESTful functions
implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '4.12.0'

// Better JSON functions...
implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1' // https://mvnrepository.com/artifact/com.google.code.gson/gson

// Declare the dependency for your favourite test framework you want to use in your tests.
// TestNG is also supported by the Gradle Test task. Just change the
// testimplementation dependency to testimplementation 'org.testng:testng:6.8.1' and add
// 'test.useTestNG()' to your build script.
//testCompile 'junit:junit:4.12'
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.4'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1' // https://mvnrepository.com/artifact/com.google.code.gson/gson

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.4'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.11.4'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.2'

// For mocking features during unit tests
testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.15.2'

// flexmark markdown parsing / conversion
implementation 'com.vladsch.flexmark:flexmark-all:0.64.8'

// Apache Tika Parsers for determining file type
implementation 'org.apache.tika:tika-core:3.0.0'

// Noise Generator
implementation 'com.github.cwisniew:NoiseLib:1.0.0' // The most recent version, 1.0.0 is build for a later java version: major version 55 is newer than 54, the highest major version supported by this compiler

// protobuf
implementation "io.grpc:grpc-protobuf:1.61.1"
implementation "com.google.protobuf:protobuf-java-util:4.29.1"

// Java Tuples
implementation 'com.flipkart.utils:javatuples:3.0'

// HTTP End Point
implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1'

// HTML Parsing
implementation 'org.jsoup:jsoup:1.17.2'
// eventbus
implementation 'com.google.guava:guava:33.0.0-jre'
// intellij forms runtime
implementation 'com.jetbrains.intellij.java:java-gui-forms-rt:241.12019'
// layout for forms created in code
implementation 'com.miglayout:miglayout-swing:11.3'

implementation 'com.github.jknack:handlebars:4.3.1'
implementation 'com.github.jknack:handlebars-helpers:4.4.0'

implementation 'org.jgrapht:jgrapht-core:1.5.2'


// Built In Add-on Libraries
implementation 'com.github.RPTools:maptool-builtin-addons:1.3'

// For advanced dice roller
implementation 'com.github.RPTools:advanced-dice-roller:1.0.3'
implementation(libs.bundles.log4j)
implementation(libs.slf4j.simple)
implementation(libs.apache.commons.logging)
implementation(libs.bundles.sentry)

implementation(libs.servicediscovery)
implementation(libs.upnplib)
implementation(libs.okhttp)
implementation(libs.protobuf.grpc)
implementation(libs.protobuf.java.util)

implementation(libs.bundles.imageio)
implementation(libs.batik)
implementation(libs.bundles.pdfbox)
implementation(libs.bcmail)
implementation(libs.bundles.jai.imageio)
implementation(libs.webp.imageio)

implementation(libs.bundles.jide) // Currently hosted on nerps.net/repo
implementation(libs.fifesoft.rsyntaxtexxtarea)
implementation(libs.fifesoft.rstaui)
implementation(libs.fifesoft.autocomplete)
implementation(libs.fifesoft.languagesupport)
implementation(libs.bundles.flatlaf)
implementation(libs.tinylaf.nocp)
implementation(libs.jsvg)

implementation(libs.bundles.handlebars)

implementation(libs.apache.commons.configuration)
implementation(libs.apache.commons.collections)
implementation(libs.apache.commons.io)
implementation(libs.apache.commons.net)
implementation(libs.apache.commons.cli)
implementation(libs.apache.commons.lang)
implementation(libs.apache.commons.beanutils)
implementation(libs.apache.commons.jxpath)
implementation(libs.apache.tika)

implementation(libs.gson)
implementation(libs.jsonpath)
implementation(libs.jsoup)
implementation(libs.jcabi.xml)
implementation(libs.xstream)

implementation(libs.javatuples)
implementation(libs.guava)
implementation(libs.jts.core)
implementation(libs.jgrapht.core)
implementation(libs.flexmark.all)
implementation(libs.reflections)
implementation(libs.yasb)

implementation(libs.bundles.graalvm.js)

forms(libs.intellij.forms.tasks)
implementation(libs.intellij.forms.runtime)
implementation(libs.miglayout.swing)

implementation(libs.rptools.maptool.resources)
implementation(libs.rptools.parser)
implementation(libs.rptools.maptool.addons)
implementation(libs.rptools.dice.roller)
implementation(libs.noiselib)

testRuntimeOnly(libs.junit.platform.launcher)
testRuntimeOnly(libs.junit.engine)
testImplementation(libs.bundles.junit)
testImplementation(libs.mockito.core)
}

processResources {
Expand Down
41 changes: 17 additions & 24 deletions clientserver/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,32 @@ apply from: rootProject.file('buildSrc/shared.gradle')

// In this section you declare the dependencies for your production and test code
dependencies {
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2'
implementation(libs.findbugs.jsr305)

implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.22.1'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.22.1'
implementation group: 'org.apache.logging.log4j', name: 'log4j-1.2-api', version: '2.20.0' // Bridges v1 to v2 for other code in other libs
implementation group: 'org.slf4j', name: 'slf4j-simple', version: '2.0.16'
implementation group: 'commons-logging', name: 'commons-logging', version: '1.3.0'
implementation(libs.bundles.log4j)
implementation(libs.slf4j.simple)
implementation(libs.apache.commons.logging)

// Better JSON functions...
implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1' // https://mvnrepository.com/artifact/com.google.code.gson/gson
implementation(libs.gson)

// webrtc
implementation group: 'org.java-websocket', name: 'Java-WebSocket', version: '1.5.7'
// Needs to be API since WebRTCConnection implements PeerConnectionObserver and RTCDataChannelObserver.
implementation 'dev.onvoid.webrtc:webrtc-java:0.9.0'
implementation(libs.websocket)
implementation(libs.webrtc)
if (osdetector.os.is('windows'))
implementation 'dev.onvoid.webrtc:webrtc-java:0.9.0:windows-x86_64'
implementation(variantOf(libs.webrtc) { classifier('windows-x86_64')})
else if (osdetector.os.is('osx'))
implementation 'dev.onvoid.webrtc:webrtc-java:0.9.0:macos-x86_64'
implementation(variantOf(libs.webrtc) { classifier('macos-x86_64')})
else if (osdetector.os.is('linux'))
implementation 'dev.onvoid.webrtc:webrtc-java:0.9.0:linux-x86_64'
implementation(variantOf(libs.webrtc) { classifier('linux-x86_64')})

// compression of messages between client and server
implementation 'org.apache.commons:commons-compress:1.27.1'
implementation 'com.github.luben:zstd-jni:1.5.5-11'

testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.4'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.4'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.11.4'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
// For mocking features during unit tests
testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.15.2'
implementation(libs.apache.commons.compress)
implementation(libs.zstd)

testRuntimeOnly(libs.junit.platform.launcher)
testRuntimeOnly(libs.junit.engine)
testImplementation(libs.bundles.junit)
testImplementation(libs.mockito.core)
}

test {
Expand Down
Loading
Loading