aboutsummaryrefslogtreecommitdiff
path: root/build.gradle.kts
diff options
context:
space:
mode:
authorRoman / Linnea Gräf <roman.graef@gmail.com>2022-08-26 19:02:27 +0200
committerGitHub <noreply@github.com>2022-08-26 19:02:27 +0200
commitde15a18edab8d6e6b9e56090cbf3b82134e5c0a4 (patch)
tree15681f641c494ffe32b76f056952332ee7e1922b /build.gradle.kts
parentedbb004ce82d6595b2f4fcc5a7090c359f371003 (diff)
parent5c53801209c25c9bc8ea0263a0aa579b1c2980a9 (diff)
downloadNotEnoughUpdates-warner.tar.gz
NotEnoughUpdates-warner.tar.bz2
NotEnoughUpdates-warner.zip
Merge branch 'master' into warnerwarner
Diffstat (limited to 'build.gradle.kts')
-rw-r--r--build.gradle.kts17
1 files changed, 17 insertions, 0 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index bffe9f6d..409a8d51 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -22,6 +22,8 @@ import net.fabricmc.loom.task.RemapJarTask
import java.io.ByteArrayOutputStream
import java.nio.file.FileSystems
import java.nio.file.Files
+import java.nio.charset.StandardCharsets
+import java.util.*
plugins {
idea
@@ -173,7 +175,22 @@ tasks.shadowJar {
tasks.assemble.get().dependsOn(remapJar)
+val generateBuildFlags by tasks.creating {
+ outputs.upToDateWhen { false }
+ val t = layout.buildDirectory.file("buildflags.properties")
+ outputs.file(t)
+ val props = project.properties.filter { (name, value) -> name.startsWith("neu.buildflags.") }
+ doLast {
+ val p = Properties()
+ p.putAll(props)
+ t.get().asFile.writer(StandardCharsets.UTF_8).use {
+ p.store(it, "Store build time configuration for NEU")
+ }
+ }
+}
+
tasks.processResources {
+ from(generateBuildFlags)
filesMatching("mcmod.info") {
expand(
"version" to project.version, "mcversion" to "1.8.9"