Skip to content

Commit

Permalink
build: process property updates
Browse files Browse the repository at this point in the history
* Without defining inputs, ProcessResources does not know whether the processed plugin.yml has the up-to-date versions of each referenced property. So we will define version, description and url as inputs
  • Loading branch information
ms5984 committed Nov 16, 2023
1 parent ceaa787 commit 6935f53
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ dependencies {
}

tasks.withType<ProcessResources> {
inputs.apply{
// Always check these properties for updates so that the plugin.yml is regenerated if they change (without a clean)
property("version", project.version)
property("description", project.description)
property("url", findProperty("url")!!)
}
// Include all resources...
filesMatching("plugin.yml") {
// but only expand properties for the plugin.yml
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ api-version: 1.13
depend: [ Labyrinth ]
softdepend: [ Enterprise, Vault ]
loadbefore: [ DiscordSRV, Guppy ]
description: A premium & unique player grouping plugin.
description: ${project.description}
website: ${project.url}/wiki
main: com.github.sanctum.clans.ClansJavaPlugin

0 comments on commit 6935f53

Please sign in to comment.