Skip to content

Commit

Permalink
buildscripts: move library/plugin version information to a catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed May 21, 2024
1 parent 8f03754 commit 108cd30
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 19 deletions.
5 changes: 0 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,9 @@ ext {
group = 'com.github.stephengold'
websiteUrl = 'https://github.com/stephengold/jme3-utilities'

// module coordinates of external dependencies:
acorusCoordinates = 'com.github.stephengold:Acorus:2.0.0'
heartCoordinates = 'com.github.stephengold:Heart:9.0.0'

// current versions of libraries:
jme3utilitiesniftyVersion = '0.9.38-SNAPSHOT'
jme3utilitiesxVersion = '0.3.3-SNAPSHOT'
jme3Version = '3.7.0-beta1'
}

subprojects {
Expand Down
25 changes: 25 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## catalog of libraries and plugins used to build the jme3-utilities project

[versions]

checkstyle = "9.3"
jme = "3.7.0-beta1"
nifty = "1.4.3"

[libraries]

acorus = "com.github.stephengold:Acorus:2.0.0"
commons-exec = "org.apache.commons:commons-exec:1.3"
heart = "com.github.stephengold:Heart:9.0.0"
jme3-awt-dialogs = { module = "org.jmonkeyengine:jme3-awt-dialogs", version.ref = "jme" }
jme3-desktop = { module = "org.jmonkeyengine:jme3-desktop", version.ref = "jme" }
jme3-jogg = { module = "org.jmonkeyengine:jme3-jogg", version.ref = "jme" }
jme3-lwjgl3 = { module = "org.jmonkeyengine:jme3-lwjgl3", version.ref = "jme" }
jme3-plugins = { module = "org.jmonkeyengine:jme3-plugins", version.ref = "jme" }
nifty = { module = "com.github.nifty-gui:nifty", version.ref = "nifty" }
nifty-controls = { module = "com.github.nifty-gui:nifty-default-controls", version.ref = "nifty" }
nifty-style-black = { module = "com.github.nifty-gui:nifty-style-black", version.ref = "nifty" }

[bundles]

[plugins]
8 changes: 4 additions & 4 deletions nifty/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ ext {
}

dependencies {
api 'com.github.nifty-gui:nifty:1.4.3'
api 'com.github.nifty-gui:nifty-default-controls:1.4.3'
api(libs.nifty)
api(libs.nifty.controls)

api heartCoordinates
api acorusCoordinates
api(libs.heart)
api(libs.acorus)
}

java {
Expand Down
18 changes: 9 additions & 9 deletions tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ plugins {
}

dependencies {
implementation 'org.apache.commons:commons-exec:1.3'
implementation(libs.commons.exec)

implementation heartCoordinates
implementation acorusCoordinates
runtimeOnly 'com.github.nifty-gui:nifty-style-black:1.4.3'
runtimeOnly 'org.jmonkeyengine:jme3-awt-dialogs:' + jme3Version
runtimeOnly 'org.jmonkeyengine:jme3-desktop:' + jme3Version
implementation 'org.jmonkeyengine:jme3-lwjgl3:' + jme3Version
implementation(libs.heart)
implementation(libs.acorus)
runtimeOnly(libs.nifty.style.black)
runtimeOnly(libs.jme3.awt.dialogs)
runtimeOnly(libs.jme3.desktop)
implementation(libs.jme3.lwjgl3)

// "tests" doesn't use jme3-jogg nor jme3-plugins
// -- they are included solely to avoid warnings from AssetConfig.
runtimeOnly 'org.jmonkeyengine:jme3-jogg:' + jme3Version
runtimeOnly 'org.jmonkeyengine:jme3-plugins:' + jme3Version
runtimeOnly(libs.jme3.jogg)
runtimeOnly(libs.jme3.plugins)

//implementation "com.github.stephengold:jme3-utilities-nifty:$jme3utilitiesniftyVersion" // for published library
implementation project(':nifty') // for local library build
Expand Down
2 changes: 1 addition & 1 deletion x/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ext {
}

dependencies {
api heartCoordinates
api(libs.heart)
}

java {
Expand Down

0 comments on commit 108cd30

Please sign in to comment.