From 3dab44717805b103f2b258ab8cfdfaf62635a5d7 Mon Sep 17 00:00:00 2001 From: MiniDay <372403923@qq.com> Date: Fri, 9 Aug 2024 01:23:54 +0800 Subject: [PATCH] =?UTF-8?q?build:=20=E4=BC=98=E5=8C=96=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle.kts | 19 +++++++++---------- settings.gradle.kts | 1 - 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index ac94b41..1da63c7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -24,27 +24,26 @@ dependencies { compileOnly("org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT") } +java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + withSourcesJar() +} + tasks { - java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - withSourcesJar() - } processResources { filesMatching("plugin.yml") { expand(project.properties) } duplicatesStrategy = DuplicatesStrategy.EXCLUDE } - jar { - destinationDirectory = rootProject.layout.buildDirectory - } - withType().configureEach { + withType { options.encoding = "UTF-8" } - withType().configureEach { + withType { archiveBaseName = "HamsterScript" from(rootProject.file("LICENSE")) duplicatesStrategy = DuplicatesStrategy.EXCLUDE + destinationDirectory = rootProject.layout.buildDirectory } } diff --git a/settings.gradle.kts b/settings.gradle.kts index 637f022..1c22674 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,2 +1 @@ rootProject.name = "hamster-script" -