feat: inject build-time variables via Gradle processResources

Replace hardcoded AppProperties values with Gradle ${} placeholders,
allowing version/channel/vendor to be configured via gradle.properties
or -P flags at build time.

Also refactor webhook configuration to flatten the properties hierarchy
by removing the intermediate WebhookProperties wrapper.
This commit is contained in:
2026-06-04 17:12:48 +08:00
parent 4e2da0debc
commit 17cd87c702
10 changed files with 44 additions and 29 deletions
+12
View File
@@ -5,6 +5,8 @@ plugins {
}
val artefactVersion: String by project
val buildChannel: String by project
val vendor: String by project
group = "com.onixbyte.helix"
version = artefactVersion
@@ -61,6 +63,16 @@ dependencies {
testRuntimeOnly(libs.junit.launcher)
}
tasks.processResources {
filesMatching("application.yaml") {
expand(
"appVersion" to artefactVersion,
"channel" to buildChannel,
"vendor" to vendor
)
}
}
tasks.test {
useJUnitPlatform()
}