diff options
author | Jason Penilla <[email protected]> | 2021-12-28 16:50:02 -0800 |
---|---|---|
committer | Jason Penilla <[email protected]> | 2021-12-28 16:50:02 -0800 |
commit | aa8a8359125d698886bac0fe6dab03a84cde52f7 (patch) | |
tree | 8c42c2bdb03486bcf1802144c392000ba6f19dac /test-plugin | |
parent | 1931bb53bfdb7395f8214c9a7b6d4d65046efdee (diff) | |
download | Paper-aa8a8359125d698886bac0fe6dab03a84cde52f7.tar.gz Paper-aa8a8359125d698886bac0fe6dab03a84cde52f7.zip |
[ci skip] Populate test plugin api-version from mcVersion
closes #7216
Diffstat (limited to 'test-plugin')
-rw-r--r-- | test-plugin/build.gradle.kts | 10 | ||||
-rw-r--r-- | test-plugin/src/main/resources/plugin.yml | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/test-plugin/build.gradle.kts b/test-plugin/build.gradle.kts index e83e3406a4..72f79b682e 100644 --- a/test-plugin/build.gradle.kts +++ b/test-plugin/build.gradle.kts @@ -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) } } diff --git a/test-plugin/src/main/resources/plugin.yml b/test-plugin/src/main/resources/plugin.yml index 67793405f4..1e6adb9ff6 100644 --- a/test-plugin/src/main/resources/plugin.yml +++ b/test-plugin/src/main/resources/plugin.yml @@ -3,5 +3,5 @@ version: ${version} main: io.papermc.paper.testplugin.TestPlugin description: Paper Test Plugin author: PaperMC -api-version: 1.17 +api-version: ${apiversion} load: STARTUP |