mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 22:15:08 +00:00
Add commit hash to platform versions
This commit is contained in:
1 parent
a0fcd2256d
commit
eb09819a69
6 files changed
+21
-17
No files matched your search
+10
-6
@@ -9,18 +9,15 @@ plugins {
|
||||
id("net.kyori.indra")
|
||||
id("net.kyori.indra.git")
|
||||
id("net.kyori.indra.checkstyle")
|
||||
id("net.kyori.indra.publishing")
|
||||
id("net.kyori.indra.publishing") apply false
|
||||
id("com.github.johnrengelman.shadow") apply false
|
||||
id("org.checkerframework") apply false
|
||||
}
|
||||
|
||||
ext["github"] = "https://github.com/Hexaoxide/Carbon"
|
||||
|
||||
val projectVersion: String by project
|
||||
|
||||
group = "net.draycia"
|
||||
description = "CarbonChat - A modern chat plugin"
|
||||
version = projectVersion // todo: include git hash
|
||||
val projectVersion: String by project // get from gradle.properties
|
||||
version = projectVersion
|
||||
|
||||
subprojects {
|
||||
apply<IndraPlugin>()
|
||||
@@ -28,6 +25,13 @@ subprojects {
|
||||
apply<IndraPublishingPlugin>()
|
||||
apply<CheckerFrameworkPlugin>()
|
||||
|
||||
if (projectVersion.endsWith("-SNAPSHOT")) {
|
||||
// Add git commit hash to version for platforms, but not for API
|
||||
if (this != rootProject.projects.carbonchatApi.dependencyProject) {
|
||||
version = "$projectVersion+${indraGit.commit()?.name?.substring(0, 7) ?: error("Failed to retrieve git commit hash")}"
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://oss.sonatype.org/content/groups/public/")
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
const val GITHUB_REPO_URL = "https://github.com/Hexaoxide/Carbon"
|
||||
@@ -25,7 +25,7 @@ fun ShadowJar.standardRelocations() {
|
||||
relocateDependency("it.unimi.dsi.fastutil")
|
||||
}
|
||||
|
||||
fun ShadowJar.configureShadow() {
|
||||
fun ShadowJar.configureShadowJar() {
|
||||
minimize()
|
||||
|
||||
standardRelocations()
|
||||
|
||||
@@ -29,7 +29,7 @@ tasks {
|
||||
}
|
||||
shadowJar {
|
||||
archiveFileName.set(project.name + "-" + project.version + ".jar")
|
||||
configureShadow()
|
||||
configureShadowJar()
|
||||
relocateDependency("io.papermc.lib")
|
||||
relocateDependency("io.leangen.geantyref")
|
||||
}
|
||||
@@ -44,7 +44,7 @@ bukkit {
|
||||
author = "Draycia"
|
||||
depend = listOf("PlaceholderAPI", "Vault")
|
||||
loadBefore = listOf("Essentials")
|
||||
website = rootProject.ext["github"] as String
|
||||
website = GITHUB_REPO_URL
|
||||
permissions {
|
||||
create("carbonchat.channels.global.see") {
|
||||
default = TRUE
|
||||
|
||||
@@ -18,7 +18,7 @@ versions:
|
||||
minimessage: 4.1.0-SNAPSHOT
|
||||
cloud: 1.5.0-SNAPSHOT
|
||||
configurate: 4.1.1
|
||||
typesafeConfig: 1.+
|
||||
typesafeConfig: 1.4.1
|
||||
checkerQual: 3.13.0
|
||||
stylecheck: 0.1-SNAPSHOT
|
||||
gson: 2.8.0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import java.util.Locale
|
||||
import org.spongepowered.plugin.metadata.PluginDependency
|
||||
import org.spongepowered.gradle.plugin.config.PluginLoaders
|
||||
import org.spongepowered.plugin.metadata.PluginDependency
|
||||
import java.util.Locale
|
||||
|
||||
plugins {
|
||||
id("com.github.johnrengelman.shadow")
|
||||
@@ -22,7 +22,7 @@ tasks {
|
||||
}
|
||||
shadowJar {
|
||||
archiveFileName.set(project.name + "-" + project.version + ".jar")
|
||||
configureShadow()
|
||||
configureShadowJar()
|
||||
dependencies {
|
||||
// included in sponge
|
||||
exclude(dependency("io.leangen.geantyref:geantyref"))
|
||||
@@ -38,10 +38,9 @@ sponge {
|
||||
mainClass("net.draycia.carbon.sponge.CarbonChatSponge")
|
||||
description(project.description)
|
||||
links {
|
||||
val url = rootProject.ext["github"] as String
|
||||
homepage(url)
|
||||
source(url)
|
||||
issues("$url/issues")
|
||||
homepage(GITHUB_REPO_URL)
|
||||
source(GITHUB_REPO_URL)
|
||||
issues("$GITHUB_REPO_URL/issues")
|
||||
}
|
||||
contributor("Vicarious") {
|
||||
description("Lead Developer")
|
||||
|
||||
Reference in new issue
Block a user