Skip to content

Commit

Permalink
buildscripts: move library version information to a version catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed May 18, 2024
1 parent a411559 commit 8747ea0
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 42 deletions.
18 changes: 9 additions & 9 deletions apps/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@ if (!hasProperty('mainClass')) {
jar.manifest.attributes('Main-Class': application.mainClass)

dependencies {
implementation acorusCoordinates
implementation gsonCoordinates
implementation heartCoordinates
implementation wesCoordinates
implementation(libs.acorus)
implementation(libs.gson)
implementation(libs.heart)
implementation(libs.wes)

implementation 'org.jmonkeyengine:jme3-plugins:' + jme3Version
implementation 'org.jmonkeyengine:jme3-blender:3.3.2-stable'
runtimeOnly 'org.jmonkeyengine:jme3-desktop:' + jme3Version
runtimeOnly 'org.jmonkeyengine:jme3-lwjgl3:' + jme3Version
implementation(libs.jme3.plugins)
implementation(libs.jme3.blender)
runtimeOnly(libs.jme3.desktop)
runtimeOnly(libs.jme3.lwjgl3)

// MonkeyWrench doesn't use jme3-jogg
// -- it is included solely to avoid warnings from AssetConfig.
runtimeOnly 'org.jmonkeyengine:jme3-jogg:' + jme3Version
runtimeOnly(libs.jme3.jogg)

//implementation 'com.github.stephengold:MonkeyWrench:' + wrenchVersion // for the published library
implementation project(':lib') // for latest sourcecode
Expand Down
17 changes: 0 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,6 @@ ext {

jmeTarget = '' // distinguish non-JME libraries built for specific JME releases

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

// production versions of libraries:
gsonCoordinates = 'com.google.code.gson:gson:2.9.1'
imageioVersion = '3.10.1'
//jme3Version = '3.6.1-stable'
//lwjglVersion = '3.3.2'

// advanced versions of libraries:
//gsonCoordinates = 'com.google.code.gson:gson:2.10.1'
jme3Version = '3.7.0-beta1'
lwjglVersion = '3.3.3'
//lwjglVersion = '3.3.4-SNAPSHOT'

wrenchVersion = '0.6.1' + jmeTarget
}

Expand Down
2 changes: 1 addition & 1 deletion common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ java {
}

checkstyle {
toolVersion '9.3'
toolVersion libs.versions.checkstyle.get()
}

tasks.withType(JavaCompile).configureEach { // Java compile-time options:
Expand Down
32 changes: 32 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## TOML version catalog for the MonkeyWrench project

[versions]
checkstyle = "9.3"
imageio = "3.10.1"

## production versions:
gson = "2.9.1"
#jme = "3.6.1-stable"
#lwjgl = '3.3.2'

## advanced versions:
#gson = "2.10.1"
jme = "3.7.0-beta1"
lwjgl = '3.3.3'
#lwjgl = '3.3.4-SNAPSHOT'

[libraries]
acorus = { module = "com.github.stephengold:Acorus", version = "2.0.0" }
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
heart = { module = "com.github.stephengold:Heart", version = "9.0.0" }
imageio-tga = { module = "com.twelvemonkeys.imageio:imageio-tga", version.ref = "imageio" }
imageio-webp = { module = "com.twelvemonkeys.imageio:imageio-webp", version.ref = "imageio" }
jme3-blender = { module = "org.jmonkeyengine:jme3-blender", version = "3.3.2-stable" }
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" }
lwjgl-assimp = { module = "org.lwjgl:lwjgl-assimp", version.ref = "lwjgl" }
wes = { module = "com.github.stephengold:Wes", version = "0.8.1" }

[plugins]
29 changes: 14 additions & 15 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,23 @@ ext {
}

dependencies {
implementation heartCoordinates
implementation wesCoordinates
implementation 'org.jmonkeyengine:jme3-desktop:' + jme3Version
runtimeOnly 'org.jmonkeyengine:jme3-lwjgl3:' + jme3Version
implementation(libs.heart)
implementation(libs.wes)
implementation(libs.jme3.desktop)
runtimeOnly(libs.jme3.lwjgl3)

api "org.lwjgl:lwjgl-assimp:${lwjglVersion}"

runtimeOnly "org.lwjgl:lwjgl-assimp:${lwjglVersion}:natives-windows"
runtimeOnly "org.lwjgl:lwjgl-assimp:${lwjglVersion}:natives-windows-x86"
runtimeOnly "org.lwjgl:lwjgl-assimp:${lwjglVersion}:natives-linux"
runtimeOnly "org.lwjgl:lwjgl-assimp:${lwjglVersion}:natives-linux-arm32"
runtimeOnly "org.lwjgl:lwjgl-assimp:${lwjglVersion}:natives-linux-arm64"
runtimeOnly "org.lwjgl:lwjgl-assimp:${lwjglVersion}:natives-macos"
runtimeOnly "org.lwjgl:lwjgl-assimp:${lwjglVersion}:natives-macos-arm64"
api(libs.lwjgl.assimp)
runtimeOnly(variantOf(libs.lwjgl.assimp){classifier("natives-windows")})
runtimeOnly(variantOf(libs.lwjgl.assimp){classifier("natives-windows-x86")})
runtimeOnly(variantOf(libs.lwjgl.assimp){classifier("natives-linux")})
runtimeOnly(variantOf(libs.lwjgl.assimp){classifier("natives-linux-arm32")})
runtimeOnly(variantOf(libs.lwjgl.assimp){classifier("natives-linux-arm64")})
runtimeOnly(variantOf(libs.lwjgl.assimp){classifier("natives-macos")})
runtimeOnly(variantOf(libs.lwjgl.assimp){classifier("natives-macos-arm64")})

// Add ImageIO support for the TGA and WebP file formats:
runtimeOnly 'com.twelvemonkeys.imageio:imageio-tga:' + imageioVersion
runtimeOnly 'com.twelvemonkeys.imageio:imageio-webp:' + imageioVersion
runtimeOnly(libs.imageio.tga)
runtimeOnly(libs.imageio.webp)
}

// Register publishing tasks:
Expand Down

0 comments on commit 8747ea0

Please sign in to comment.