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:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user