1
0
mirror of https://github.com/GeyserMC/Floodgate.git synced 2025-12-23 16:59:18 +00:00

Switched to ConfigUtils and prepared the addition of metrics

This commit is contained in:
Tim203
2022-03-11 23:35:59 +01:00
parent 7a9642ef6a
commit 440e20f5ea
17 changed files with 120 additions and 691 deletions

View File

@@ -26,6 +26,7 @@
object Versions {
const val geyserVersion = "2.0.0-SNAPSHOT"
const val cumulusVersion = "1.0-SNAPSHOT"
const val configUtilsVersion = "1.0-SNAPSHOT"
const val spigotVersion = "1.13-R0.1-SNAPSHOT"
const val fastutilVersion = "8.5.3"
const val lombokVersion = "1.18.20"
@@ -33,6 +34,7 @@ object Versions {
const val nettyVersion = "4.1.49.Final"
const val snakeyamlVersion = "1.28"
const val cloudVersion = "1.5.0"
const val bstatsVersion = "3.0.0"
const val javaWebsocketVersion = "1.5.2"

View File

@@ -36,7 +36,7 @@ fun Project.isSnapshot(): Boolean =
fun Project.fullVersion(): String {
var version = version.toString()
if (version.endsWith("-SNAPSHOT")) {
version += " (b${buildNumberAsString()}-${lastCommitHash()}}"
version += " (b${buildNumberAsString()}-${lastCommitHash()})"
}
return version
}

View File

@@ -1,5 +1,5 @@
plugins {
id("floodgate.shadow-conventions")
id("floodgate.publish-conventions")
}
tasks {

View File

@@ -0,0 +1,31 @@
plugins {
id("floodgate.shadow-conventions")
id("com.jfrog.artifactory")
id("maven-publish")
}
publishing {
publications.create<MavenPublication>("mavenJava") {
groupId = project.group as String
artifactId = "floodgate-" + project.name
version = project.version as String
artifact(tasks["shadowJar"])
artifact(tasks["sourcesJar"])
}
}
artifactory {
publish {
repository {
setRepoKey(if (isSnapshot()) "maven-snapshots" else "maven-releases")
setMavenCompatible(true)
}
defaults {
publishConfigs("archives")
setPublishArtifacts(true)
setPublishPom(true)
setPublishIvy(false)
}
}
}

View File

@@ -3,8 +3,6 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id("floodgate.base-conventions")
id("com.github.johnrengelman.shadow")
id("com.jfrog.artifactory")
id("maven-publish")
}
tasks {
@@ -31,30 +29,4 @@ tasks {
named("build") {
dependsOn(shadowJar)
}
}
publishing {
publications.create<MavenPublication>("mavenJava") {
groupId = project.group as String
artifactId = "floodgate-" + project.name
version = project.version as String
artifact(tasks["shadowJar"])
artifact(tasks["sourcesJar"])
}
}
artifactory {
publish {
repository {
setRepoKey(if (isSnapshot()) "maven-snapshots" else "maven-releases")
setMavenCompatible(true)
}
defaults {
publishConfigs("archives")
setPublishArtifacts(true)
setPublishPom(true)
setPublishIvy(false)
}
}
}