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 23a5fd7 commit f44b475
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 18 deletions.
16 changes: 8 additions & 8 deletions HeartExamples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ if (!hasProperty('mainClass')) {
jar.manifest.attributes('Main-Class': 'jme3utilities.test.AppChooser')

dependencies {
implementation 'org.apache.commons:commons-exec:1.3'
implementation ('com.github.stephengold:Acorus:2.0.0') {
implementation(libs.commons.exec)
implementation(libs.acorus) {
exclude group: 'com.github.stephengold', module: 'Heart'
}
runtimeOnly 'org.jmonkeyengine:jme3-desktop:' + jme3Version
runtimeOnly 'org.jmonkeyengine:jme3-effects:' + jme3Version
runtimeOnly 'org.jmonkeyengine:jme3-lwjgl3:' + jme3Version
runtimeOnly 'org.jmonkeyengine:jme3-testdata:' + jme3Version // for Jaime
runtimeOnly(libs.jme3.desktop)
runtimeOnly(libs.jme3.effects)
runtimeOnly(libs.jme3.lwjgl3)
runtimeOnly(libs.jme3.testdata) // for Jaime

// HeartExamples 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:Heart:' + heartVersion // for published library
implementation project(':HeartLibrary') // for local library build
Expand Down
8 changes: 4 additions & 4 deletions HeartLibrary/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ ext {
}

dependencies {
api 'org.jmonkeyengine:jme3-core:' + jme3Version
api(libs.jme3.core)

testImplementation 'junit:junit:4.13.2'
testImplementation 'org.jmonkeyengine:jme3-desktop:' + jme3Version
testRuntimeOnly 'org.jmonkeyengine:jme3-testdata:' + jme3Version
testImplementation(libs.junit)
testImplementation(libs.jme3.desktop)
testImplementation(libs.jme3.testdata)
}

// Register publishing tasks:
Expand Down
4 changes: 2 additions & 2 deletions J3oDump/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ tasks.register('j3odump', JavaExec) {
}

dependencies {
implementation 'org.jmonkeyengine:jme3-desktop:' + jme3Version
implementation 'org.jmonkeyengine:jme3-plugins:' + jme3Version
implementation(libs.jme3.desktop)
implementation(libs.jme3.plugins)

//implementation 'com.github.stephengold:Heart:' + heartVersion // for published library
implementation project(':HeartLibrary') // for latest sourcecode
Expand Down
3 changes: 0 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ plugins {
ext {
jmeTarget = '' // distinguish non-JME libraries built for specific JME releases

// current version of the JMonkeyEngine libraries:
jme3Version = '3.7.0-beta1'

heartSnapshot = '-SNAPSHOT' // for development builds
//heartSnapshot = '' // for release builds
heartVersion = '9.0.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
19 changes: 19 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## TOML version catalog for the Heart project

[versions]
checkstyle = "9.3"
jme = "3.7.0-beta1"

[libraries]
acorus = { module = "com.github.stephengold:Acorus", version = "2.0.0" }
commons-exec = { module = "org.apache.commons:commons-exec", version = "1.3" }
jme3-core = { module = "org.jmonkeyengine:jme3-core", version.ref = "jme" }
jme3-desktop = { module = "org.jmonkeyengine:jme3-desktop", version.ref = "jme" }
jme3-effects = { module = "org.jmonkeyengine:jme3-effects", 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" }
jme3-testdata = { module = "org.jmonkeyengine:jme3-testdata", version.ref = "jme" }
junit = { module = "junit:junit", version = "4.13.2" }

[plugins]

0 comments on commit f44b475

Please sign in to comment.