Skip to content

Commit

Permalink
GH-431 Use Versions.kt object to centralize versions. (#433)
Browse files Browse the repository at this point in the history
* GH-431 Use Versions.kt object to centralize versions.

* Remove unused random spaces from Versions.kt.

* Update minestom version in Versions.kt

Signed-off-by: Martin Sulikowski <[email protected]>

* Fix after merge.

---------

Signed-off-by: Martin Sulikowski <[email protected]>
  • Loading branch information
vLuckyyy authored Sep 16, 2024
1 parent 1383860 commit 68d80f3
Show file tree
Hide file tree
Showing 13 changed files with 60 additions and 23 deletions.
37 changes: 37 additions & 0 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
object Versions {

const val ADVENTURE_MINIMESSAGES = "4.14.0"
const val ADVENTURE_TEXT_SERIALIZER_LEGACY = "4.14.0"
const val ADVENTURE_PLATFORM_API = "4.3.1"

const val SPIGOT_API = "1.20.2-R0.1-SNAPSHOT"
const val SPIGOT = "1.8.8-R0.1-SNAPSHOT"
const val PROTOCOL_LIB = "5.1.0"

const val BUNGEECORD_API = "1.20-R0.1"

const val GSON = "2.10.1"
const val CAFFEINE = "3.1.8"
const val OKHTTP = "4.12.0"

const val EXPIRING_MAP = "0.5.11"
const val EXPRESSIBLE = "1.3.6"
const val JETBRAINS_ANNOTATIONS = "24.0.1"

const val HIBERNATE_VALIDATOR = "8.0.1.Final"
const val EXPRESSLY = "5.0.0"

const val JDA = "5.0.2"

const val MINESTOM = "4305006e6b"

const val SPONGE_API = "8.2.0"

const val VELOCITY_API = "3.2.0-SNAPSHOT"

// tests
const val JUNIT_JUPITER = "5.10.0"
const val ASSERTJ = "3.24.2"
const val MOCKITO = "5.7.0"
const val AWAITILITY = "4.2.0"
}
2 changes: 1 addition & 1 deletion litecommands-adventure-platform/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
dependencies {
api(project(":litecommands-adventure"))

compileOnly("net.kyori:adventure-platform-api:4.3.1")
compileOnly("net.kyori:adventure-platform-api:${Versions.ADVENTURE_PLATFORM_API}")
}

litecommandsPublish {
Expand Down
4 changes: 2 additions & 2 deletions litecommands-adventure/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ plugins {
dependencies {
api(project(":litecommands-framework"))

compileOnly("net.kyori:adventure-text-minimessage:4.14.0")
compileOnly("net.kyori:adventure-text-serializer-legacy:4.14.0")
compileOnly("net.kyori:adventure-text-minimessage:${Versions.ADVENTURE_MINIMESSAGES}")
compileOnly("net.kyori:adventure-text-serializer-legacy:${Versions.ADVENTURE_TEXT_SERIALIZER_LEGACY}")
}

litecommandsPublish {
Expand Down
6 changes: 3 additions & 3 deletions litecommands-bukkit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ plugins {
dependencies {
api(project(":litecommands-framework"))

compileOnly("org.spigotmc:spigot-api:1.20.2-R0.1-SNAPSHOT")
compileOnly("org.spigotmc:spigot:1.8.8-R0.1-SNAPSHOT")
compileOnly("com.comphenix.protocol:ProtocolLib:5.1.0")
compileOnly("org.spigotmc:spigot-api:${Versions.SPIGOT_API}")
compileOnly("org.spigotmc:spigot:${Versions.SPIGOT}")
compileOnly("com.comphenix.protocol:ProtocolLib:${Versions.PROTOCOL_LIB}")
}

val bukkitArtifact: String by extra
Expand Down
2 changes: 1 addition & 1 deletion litecommands-bungee/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
dependencies {
api(project(":litecommands-framework"))

compileOnly("net.md-5:bungeecord-api:1.20-R0.1")
compileOnly("net.md-5:bungeecord-api:${Versions.BUNGEECORD_API}")
}

litecommandsPublish {
Expand Down
4 changes: 2 additions & 2 deletions litecommands-chatgpt/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ dependencies {
api(project(":litecommands-framework"))
api(project(":litecommands-unit"))

implementation("com.google.code.gson:gson:2.10.1")
implementation("com.github.ben-manes.caffeine:caffeine:3.1.8")
implementation("com.google.code.gson:gson:${Versions.GSON}")
implementation("com.github.ben-manes.caffeine:caffeine:${Versions.CAFFEINE}")
implementation("com.squareup.okhttp3:okhttp:4.12.0")
}

Expand Down
2 changes: 1 addition & 1 deletion litecommands-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

dependencies {
api("org.jetbrains:annotations:24.0.1")
api("org.jetbrains:annotations:${Versions.JETBRAINS_ANNOTATIONS}")
}

litecommandsPublish {
Expand Down
4 changes: 2 additions & 2 deletions litecommands-jakarta/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ plugins {

dependencies {
api(project(":litecommands-framework"))
api("org.hibernate.validator:hibernate-validator:8.0.1.Final")
implementation("org.glassfish.expressly:expressly:5.0.0")
api("org.hibernate.validator:hibernate-validator:${Versions.HIBERNATE_VALIDATOR}")
implementation("org.glassfish.expressly:expressly:${Versions.EXPRESSLY}")
}

litecommandsUnit {
Expand Down
4 changes: 2 additions & 2 deletions litecommands-jda/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ plugins {
dependencies {
api(project(":litecommands-framework"))

compileOnly("net.dv8tion:JDA:5.0.2")
compileOnly("net.dv8tion:JDA:${Versions.JDA}")
testImplementation(project(":litecommands-annotations"))
testImplementation("net.dv8tion:JDA:5.0.2")
testImplementation("net.dv8tion:JDA:${Versions.JDA}")
}

litecommandsPublish {
Expand Down
4 changes: 2 additions & 2 deletions litecommands-minestom/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ dependencies {
api(project(":litecommands-framework"))
api(project(":litecommands-adventure"))
testImplementation(project(":litecommands-annotations"))
compileOnly("net.minestom:minestom-snapshots:4305006e6b")
testImplementation("net.minestom:minestom-snapshots:4305006e6b")
compileOnly("net.minestom:minestom-snapshots:${Versions.MINESTOM}")
testImplementation("net.minestom:minestom-snapshots:${Versions.MINESTOM}")
}

litecommandsPublish {
Expand Down
2 changes: 1 addition & 1 deletion litecommands-sponge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies {
api(project(":litecommands-framework"))
api(project(":litecommands-adventure"))

compileOnly("org.spongepowered:spongeapi:8.2.0")
compileOnly("org.spongepowered:spongeapi:${Versions.SPONGE_API}")
}

litecommandsPublish {
Expand Down
10 changes: 5 additions & 5 deletions litecommands-unit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ plugins {

dependencies {
api(project(":litecommands-framework"))
api("org.junit.jupiter:junit-jupiter-api:5.10.0")
api("org.junit.jupiter:junit-jupiter-params:5.10.0")
api("org.assertj:assertj-core:3.24.2")
api("org.mockito:mockito-core:5.7.0")
api("org.awaitility:awaitility:4.2.0")
api("org.junit.jupiter:junit-jupiter-api:${Versions.JUNIT_JUPITER}")
api("org.junit.jupiter:junit-jupiter-params:${Versions.JUNIT_JUPITER}")
api("org.assertj:assertj-core:${Versions.ASSERTJ}")
api("org.mockito:mockito-core:${Versions.MOCKITO}")
api("org.awaitility:awaitility:${Versions.AWAITILITY}")
}
2 changes: 1 addition & 1 deletion litecommands-velocity/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies {
api(project(":litecommands-framework"))
api(project(":litecommands-adventure"))

compileOnly("com.velocitypowered:velocity-api:3.2.0-SNAPSHOT")
compileOnly("com.velocitypowered:velocity-api:${Versions.VELOCITY_API}")
}

litecommandsPublish {
Expand Down

0 comments on commit 68d80f3

Please sign in to comment.