From 602176c540b5da790a7afc435faf72b183bb5b80 Mon Sep 17 00:00:00 2001 From: MiniDay <372403923@qq.com> Date: Sun, 4 Jun 2023 15:19:52 +0800 Subject: [PATCH] =?UTF-8?q?build:=20=E6=9B=B4=E6=96=B0=20adventure=20?= =?UTF-8?q?=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 3 +++ hamster-core-bukkit/build.gradle | 25 ++++++++----------- .../src/main/resources/plugin.yml | 2 +- hamster-core-bungeecord/build.gradle | 12 ++++----- hamster-core-common/build.gradle | 10 ++++---- 5 files changed, 26 insertions(+), 26 deletions(-) create mode 100644 gradle.properties diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..b1a9852 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx2G +adventure_version=4.3.0 +HikariCP_version=5.0.1 \ No newline at end of file diff --git a/hamster-core-bukkit/build.gradle b/hamster-core-bukkit/build.gradle index c7bc80a..c408ef5 100644 --- a/hamster-core-bukkit/build.gradle +++ b/hamster-core-bukkit/build.gradle @@ -7,18 +7,15 @@ configurations { } dependencies { - api(project(":hamster-core-common")) { transitive = false } - shade(project(":hamster-core-common")) { transitive = false } + api project(":hamster-core-common") transitive false + shade project(":hamster-core-common") transitive false //noinspection VulnerableLibrariesLocal - compileOnly('org.spigotmc:spigot-api:1.19.4-R0.1-SNAPSHOT') { - exclude group: "com.google.code.gson" - } + compileOnly 'org.spigotmc:spigot-api:1.19.4-R0.1-SNAPSHOT' exclude group: "com.google.code.gson" -// shade 'net.kyori:adventure-platform-bukkit:4.1.2' - compileOnly('net.milkbowl.vault:VaultAPI:1.7') { transitive = false } - compileOnly('org.black_ixx:playerpoints:2.1.3') { transitive = false } - compileOnly("com.comphenix.protocol:ProtocolLib-API:4.4.0") { transitive = false } + compileOnly 'net.milkbowl.vault:VaultAPI:1.7' transitive false + compileOnly 'org.black_ixx:playerpoints:2.1.3' transitive false + compileOnly "com.comphenix.protocol:ProtocolLib-API:4.4.0" transitive false // https://mvnrepository.com/artifact/com.google.code.gson/gson //noinspection GradlePackageUpdate @@ -26,23 +23,23 @@ dependencies { compileOnly 'com.google.code.gson:gson:2.8.0' // https://mvnrepository.com/artifact/net.kyori/adventure-platform-bukkit - api 'net.kyori:adventure-platform-bukkit:4.1.2' - oldJar 'net.kyori:adventure-platform-bukkit:4.1.2' + api "net.kyori:adventure-platform-bukkit:${adventure_version}" + oldJar "net.kyori:adventure-platform-bukkit:${adventure_version}" // // https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp // api 'com.squareup.okhttp3:okhttp:4.10.0' // oldJar 'com.squareup.okhttp3:okhttp:4.10.0' // https://mvnrepository.com/artifact/com.zaxxer/HikariCP - compileOnly 'com.zaxxer:HikariCP:5.0.1' + compileOnly "com.zaxxer:HikariCP:${HikariCP_version}" //noinspection GradlePackageUpdate - oldJar('com.zaxxer:HikariCP:4.0.3') exclude group: "org.slf4j" + oldJar 'com.zaxxer:HikariCP:4.0.3' } processResources { inputs.property "version", project.version filesMatching("plugin.yml") { - expand "version": project.version + expand "version": project.version, "adventure_version": adventure_version, "HikariCP_version": HikariCP_version } } diff --git a/hamster-core-bukkit/src/main/resources/plugin.yml b/hamster-core-bukkit/src/main/resources/plugin.yml index 7e45e9e..c2995fb 100644 --- a/hamster-core-bukkit/src/main/resources/plugin.yml +++ b/hamster-core-bukkit/src/main/resources/plugin.yml @@ -18,7 +18,7 @@ loadbefore: - HamsterAPI libraries: - - 'net.kyori:adventure-platform-bukkit:4.1.2' + - 'net.kyori:adventure-platform-bukkit:${adventure_version}' - 'com.squareup.okhttp3:okhttp:4.10.0' - 'com.zaxxer:HikariCP:5.0.1' diff --git a/hamster-core-bungeecord/build.gradle b/hamster-core-bungeecord/build.gradle index 8981a68..4dcc337 100644 --- a/hamster-core-bungeecord/build.gradle +++ b/hamster-core-bungeecord/build.gradle @@ -7,17 +7,17 @@ configurations { } dependencies { - api(project(":hamster-core-common")) { transitive = false } - shade(project(":hamster-core-common")) { transitive = false } - oldJar(project(":hamster-core-common")) { transitive = false } + api project(":hamster-core-common") transitive false + shade project(":hamster-core-common") transitive false + oldJar project(":hamster-core-common") transitive false //noinspection VulnerableLibrariesLocal compileOnly 'net.md-5:bungeecord-api:1.19-R0.1-SNAPSHOT' // https://mvnrepository.com/artifact/net.kyori/adventure-platform-bungeecord - api 'net.kyori:adventure-platform-bungeecord:4.1.2' - shade 'net.kyori:adventure-platform-bungeecord:4.1.2' - oldJar 'net.kyori:adventure-platform-bungeecord:4.1.2' + api "net.kyori:adventure-platform-bungeecord:${adventure_version}" + shade "net.kyori:adventure-platform-bungeecord:${adventure_version}" + oldJar "net.kyori:adventure-platform-bungeecord:${adventure_version}" // // https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp // api 'com.squareup.okhttp3:okhttp:4.10.0' diff --git a/hamster-core-common/build.gradle b/hamster-core-common/build.gradle index fda18ed..50d84df 100644 --- a/hamster-core-common/build.gradle +++ b/hamster-core-common/build.gradle @@ -10,16 +10,16 @@ dependencies { compileOnly 'com.squareup.okhttp3:okhttp:4.10.0' // https://mvnrepository.com/artifact/net.kyori/adventure-api - compileOnly 'net.kyori:adventure-api:4.11.0' + compileOnly 'net.kyori:adventure-api:4.13.0' // https://mvnrepository.com/artifact/net.kyori/adventure-text-minimessage - compileOnly 'net.kyori:adventure-text-minimessage:4.11.0' + compileOnly 'net.kyori:adventure-text-minimessage:4.13.0' // https://mvnrepository.com/artifact/net.kyori/adventure-platform-api - compileOnly 'net.kyori:adventure-platform-api:4.1.2' + compileOnly "net.kyori:adventure-platform-api:${adventure_version}" // https://mvnrepository.com/artifact/net.kyori/adventure-text-serializer-gson - compileOnly 'net.kyori:adventure-text-serializer-gson:4.11.0' + compileOnly 'net.kyori:adventure-text-serializer-gson:4.13.0' // https://mvnrepository.com/artifact/net.kyori/adventure-text-serializer-legacy - compileOnly 'net.kyori:adventure-text-serializer-legacy:4.11.0' + compileOnly 'net.kyori:adventure-text-serializer-legacy:4.13.0' testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0'