From c5de23632c55cd9ae92a7f4067135bfec60a310a Mon Sep 17 00:00:00 2001 From: langua Date: Sun, 25 Aug 2024 21:02:42 +0200 Subject: [PATCH] (fix) plugin version not shown correctly --- build.gradle.kts | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 0283f7c..9b4f20f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -56,12 +56,25 @@ publishing { } } -// Custom tasks for publishing to specific repositories -tasks.register("publishToGithubPackage") { - dependsOn("publishMavenJavaPublicationToGithubPackageRepository") - // auto generated task: publishPublicationToRepository -} +tasks { + compileJava { + options.compilerArgs.add("-Xlint:deprecation") + options.encoding = "UTF-8" + } + + processResources { + filesMatching("**/plugin.yml") { + expand("version" to project.version) + } + } + + // Custom tasks for publishing to specific repositories + register("publishToGithubPackage") { + dependsOn("publishMavenJavaPublicationToGithubPackageRepository") + // auto generated task: publishPublicationToRepository + } -tasks.register("publishToNyaaCatCILocal") { - dependsOn("publishMavenJavaPublicationToNyaaCatCILocalRepository") + register("publishToNyaaCatCILocal") { + dependsOn("publishMavenJavaPublicationToNyaaCatCILocalRepository") + } } \ No newline at end of file