[ci skip] Populate test plugin api-version from mcVersion

closes #7216
This commit is contained in:
Jason Penilla
2021-12-28 16:50:02 -08:00
parent 22d46134e3
commit 3d1ddee8a7
2 changed files with 9 additions and 3 deletions

View File

@ -10,8 +10,14 @@ dependencies {
}
tasks.processResources {
inputs.property("version", project.version)
val apiVersion = rootProject.providers.gradleProperty("mcVersion").forUseAtConfigurationTime().get()
.split(".", "-").take(2).joinToString(".")
val props = mapOf(
"version" to project.version,
"apiversion" to apiVersion,
)
inputs.properties(props)
filesMatching("plugin.yml") {
expand("version" to project.version)
expand(props)
}
}