diff options
author | Linnea Gräf <nea@nea.moe> | 2024-12-13 17:42:27 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-12-13 17:42:27 +0100 |
commit | c4e4985b8b96ed156851c6be6d4a8d5e110c3040 (patch) | |
tree | 4dc7d19ccff486a9f612738db7ea196beffb38d1 /build.gradle.kts | |
parent | 4e986409ad65aa5c11baf7e8571b78b89ec260a4 (diff) | |
download | LocalTransactionLedger-c4e4985b8b96ed156851c6be6d4a8d5e110c3040.tar.gz LocalTransactionLedger-c4e4985b8b96ed156851c6be6d4a8d5e110c3040.tar.bz2 LocalTransactionLedger-c4e4985b8b96ed156851c6be6d4a8d5e110c3040.zip |
Add error reporting framework
Diffstat (limited to 'build.gradle.kts')
-rw-r--r-- | build.gradle.kts | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index def2fdd..15311b5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,4 @@ +import com.github.gmazzo.buildconfig.BuildConfigExtension import org.apache.commons.lang3.SystemUtils import java.io.ByteArrayOutputStream @@ -7,6 +8,7 @@ plugins { id("gg.essential.loom") version "0.10.0.+" id("dev.architectury.architectury-pack200") version "0.1.3" id("com.github.johnrengelman.shadow") version "8.1.1" + id("com.github.gmazzo.buildconfig") version "5.5.0" kotlin("jvm") version "2.0.20" } @@ -22,7 +24,9 @@ fun cmd(vararg args: String): String { val baseGroup: String by project val mcVersion: String by project -val version: String = project.property("mod_version").toString() + "-" + cmd("git", "rev-parse", "--short", "HEAD") +val gitVersion = cmd("git", "rev-parse", "--short", "HEAD") +val fullVersion = project.property("mod_version").toString() +val version: String = "$fullVersion-$gitVersion" val mixinGroup = "$baseGroup.mixin" project.version = version val modid: String by project @@ -156,3 +160,10 @@ tasks.shadowJar { tasks.assemble.get().dependsOn(tasks.remapJar) +configure<BuildConfigExtension> { + packageName("moe.nea.ledger.gen") + buildConfigField<String>("VERSION", version) + buildConfigField<String>("FULL_VERSION", fullVersion) + buildConfigField<String>("GIT_COMMIT", gitVersion) +} + |