mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-04 14:38:49 +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")
|
||||||
id("net.kyori.indra.git")
|
id("net.kyori.indra.git")
|
||||||
id("net.kyori.indra.checkstyle")
|
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("com.github.johnrengelman.shadow") apply false
|
||||||
id("org.checkerframework") apply false
|
id("org.checkerframework") apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
ext["github"] = "https://github.com/Hexaoxide/Carbon"
|
|
||||||
|
|
||||||
val projectVersion: String by project
|
|
||||||
|
|
||||||
group = "net.draycia"
|
group = "net.draycia"
|
||||||
description = "CarbonChat - A modern chat plugin"
|
description = "CarbonChat - A modern chat plugin"
|
||||||
version = projectVersion // todo: include git hash
|
val projectVersion: String by project // get from gradle.properties
|
||||||
|
version = projectVersion
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
apply<IndraPlugin>()
|
apply<IndraPlugin>()
|
||||||
@@ -28,6 +25,13 @@ subprojects {
|
|||||||
apply<IndraPublishingPlugin>()
|
apply<IndraPublishingPlugin>()
|
||||||
apply<CheckerFrameworkPlugin>()
|
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 {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven("https://oss.sonatype.org/content/groups/public/")
|
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")
|
relocateDependency("it.unimi.dsi.fastutil")
|
||||||
}
|
}
|
||||||
|
|
||||||
fun ShadowJar.configureShadow() {
|
fun ShadowJar.configureShadowJar() {
|
||||||
minimize()
|
minimize()
|
||||||
|
|
||||||
standardRelocations()
|
standardRelocations()
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ tasks {
|
|||||||
}
|
}
|
||||||
shadowJar {
|
shadowJar {
|
||||||
archiveFileName.set(project.name + "-" + project.version + ".jar")
|
archiveFileName.set(project.name + "-" + project.version + ".jar")
|
||||||
configureShadow()
|
configureShadowJar()
|
||||||
relocateDependency("io.papermc.lib")
|
relocateDependency("io.papermc.lib")
|
||||||
relocateDependency("io.leangen.geantyref")
|
relocateDependency("io.leangen.geantyref")
|
||||||
}
|
}
|
||||||
@@ -44,7 +44,7 @@ bukkit {
|
|||||||
author = "Draycia"
|
author = "Draycia"
|
||||||
depend = listOf("PlaceholderAPI", "Vault")
|
depend = listOf("PlaceholderAPI", "Vault")
|
||||||
loadBefore = listOf("Essentials")
|
loadBefore = listOf("Essentials")
|
||||||
website = rootProject.ext["github"] as String
|
website = GITHUB_REPO_URL
|
||||||
permissions {
|
permissions {
|
||||||
create("carbonchat.channels.global.see") {
|
create("carbonchat.channels.global.see") {
|
||||||
default = TRUE
|
default = TRUE
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ versions:
|
|||||||
minimessage: 4.1.0-SNAPSHOT
|
minimessage: 4.1.0-SNAPSHOT
|
||||||
cloud: 1.5.0-SNAPSHOT
|
cloud: 1.5.0-SNAPSHOT
|
||||||
configurate: 4.1.1
|
configurate: 4.1.1
|
||||||
typesafeConfig: 1.+
|
typesafeConfig: 1.4.1
|
||||||
checkerQual: 3.13.0
|
checkerQual: 3.13.0
|
||||||
stylecheck: 0.1-SNAPSHOT
|
stylecheck: 0.1-SNAPSHOT
|
||||||
gson: 2.8.0
|
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.gradle.plugin.config.PluginLoaders
|
||||||
|
import org.spongepowered.plugin.metadata.PluginDependency
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("com.github.johnrengelman.shadow")
|
id("com.github.johnrengelman.shadow")
|
||||||
@@ -22,7 +22,7 @@ tasks {
|
|||||||
}
|
}
|
||||||
shadowJar {
|
shadowJar {
|
||||||
archiveFileName.set(project.name + "-" + project.version + ".jar")
|
archiveFileName.set(project.name + "-" + project.version + ".jar")
|
||||||
configureShadow()
|
configureShadowJar()
|
||||||
dependencies {
|
dependencies {
|
||||||
// included in sponge
|
// included in sponge
|
||||||
exclude(dependency("io.leangen.geantyref:geantyref"))
|
exclude(dependency("io.leangen.geantyref:geantyref"))
|
||||||
@@ -38,10 +38,9 @@ sponge {
|
|||||||
mainClass("net.draycia.carbon.sponge.CarbonChatSponge")
|
mainClass("net.draycia.carbon.sponge.CarbonChatSponge")
|
||||||
description(project.description)
|
description(project.description)
|
||||||
links {
|
links {
|
||||||
val url = rootProject.ext["github"] as String
|
homepage(GITHUB_REPO_URL)
|
||||||
homepage(url)
|
source(GITHUB_REPO_URL)
|
||||||
source(url)
|
issues("$GITHUB_REPO_URL/issues")
|
||||||
issues("$url/issues")
|
|
||||||
}
|
}
|
||||||
contributor("Vicarious") {
|
contributor("Vicarious") {
|
||||||
description("Lead Developer")
|
description("Lead Developer")
|
||||||
|
|||||||
Reference in new issue
Block a user