Some changes for this version:
- Tried to make compatible with some legacy version of eco enchant (not assumed to work)
- Fix some enchantment test from other plugin not being taken into account. 
Should work as expected now, but that mean it may not work as currently.
- Made Heaven bag works
- Updated Disenchantment, should work with disenchantment version >= 6.1.0. But break support for previous versions
This commit is contained in:
alexcrea 2025-01-20 18:20:46 +01:00 committed by GitHub
parent 4147f018a9
commit 5f557e3d49
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 503 additions and 102 deletions

View file

@ -3,20 +3,20 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
kotlin("jvm") version "2.0.21"
kotlin("jvm") version "2.1.0"
java
id("org.jetbrains.dokka").version("1.9.20")
id("com.gradleup.shadow").version("8.3.3")
id("com.gradleup.shadow").version("8.3.5")
// Maven publish
`maven-publish`
signing
id("cn.lalaki.central").version("1.2.5")
// Paper
id("io.papermc.paperweight.userdev") version "1.7.3" apply false
id("io.papermc.paperweight.userdev") version "2.0.0-beta.14" apply false
}
group = "xyz.alexcrea"
version = "1.6.13"
version = "1.7.0"
repositories {
// EcoEnchants
@ -37,16 +37,20 @@ dependencies {
compileOnly(files("libs/EnchantsSquared.jar"))
// EcoEnchants
compileOnly("com.willfp:EcoEnchants:12.5.1")
compileOnly("com.willfp:eco:6.70.1")
compileOnly("com.willfp:EcoEnchants:12.11.1")
compileOnly("com.willfp:eco:6.74.5")
compileOnly(project(":impl:LegacyEcoEnchant"))
// ExcellentEnchants
compileOnly(files("libs/nightcore-2.6.4.jar"))
compileOnly(files("libs/ExcellentEnchants-4.2.2.jar"))
compileOnly(files("libs/ExcellentEnchants 4.1.0-striped.jar"))
compileOnly(files("libs/nightcore-2.7.3.jar"))
compileOnly(files("libs/ExcellentEnchants-4.3.1.jar"))
compileOnly(files("libs/ExcellentEnchants 4.1.0-striped.jar")) // For legacy excellent enchants
// Disenchantment
compileOnly("cz.kominekjan:Disenchantment:v5.4.0")
compileOnly(files("libs/Disenchantment-6.1.0.jar"))
// HavenBags
compileOnly(files("libs/HavenBags-1.30.1.1729.jar"))
// Include nms
implementation(project(":nms:nms-common"))
@ -62,13 +66,13 @@ dependencies {
implementation(project(":nms:v1_20R4", configuration = "reobf"))
implementation(project(":nms:v1_21R1", configuration = "reobf"))
implementation(project(":nms:v1_21R2", configuration = "reobf"))
implementation(project(":nms:v1_21R3"))//, configuration = "reobf")) // TODO add again when paperweigh 1.21.4 update
implementation(project(":nms:v1_21R3", configuration = "reobf"))
// include kotlin for the offline jar
implementation(kotlin("stdlib"))
// Test dependency
testImplementation("org.mockbukkit.mockbukkit:mockbukkit-v1.21:4.9.3") //lower bound: 4.9.2 upper bound: 4.9.3
testImplementation("org.mockbukkit.mockbukkit:mockbukkit-v1.21:4.21.0")
testRuntimeOnly("commons-lang:commons-lang:2.6")
}
@ -150,7 +154,7 @@ tasks {
filesMatching("plugin.yml") {
expand(
"version" to project.version,
"libraries" to " \"org.jetbrains.kotlin:kotlin-stdlib:2.0.21\" "
"libraries" to " \"org.jetbrains.kotlin:kotlin-stdlib:2.1.0\" "
)
}
@ -159,27 +163,34 @@ tasks {
}
// Offline jar (include kotlin std in the final jar fine)
val offlineJar by creating(ShadowJar::class) {
archiveClassifier.set("offline")
// Shadow necessary dependency
relocate("com.github.stefvanschie.inventoryframework", "xyz.alexcrea.inventoryframework")
filesMatching("plugin.yml") {
expand(
"version" to "${project.version}-offline",
"libraries" to ""
)
}
val offlineJar by // Shadow necessary dependency
registering(
// Include all project other dependencies
from(project.configurations.runtimeClasspath)
ShadowJar
// Add custom anvil compiled
from(sourceSets.main.get().output)
::class, fun ShadowJar.() {
archiveClassifier.set("offline")
dependsOn(processResources)
}
// Shadow necessary dependency
relocate("com.github.stefvanschie.inventoryframework", "xyz.alexcrea.inventoryframework")
filesMatching("plugin.yml") {
expand(
"version" to "${project.version}-offline",
"libraries" to ""
)
}
// Include all project other dependencies
from(project.configurations.runtimeClasspath)
// Add custom anvil compiled
from(sourceSets.main.get().output)
dependsOn(processResources)
})
// Make the online and offline jar on build
named("build") {
@ -193,12 +204,12 @@ val sourcesJar by tasks.registering(Jar::class) {
from(kotlin.sourceSets.main.get().kotlin)
}
val javadocJar by tasks.creating(Jar::class) {
val javadocJar by tasks.registering(Jar::class, fun Jar.() {
group = JavaBasePlugin.DOCUMENTATION_GROUP
description = "Assembles Javadoc JAR"
archiveClassifier.set("javadoc")
from(tasks.named("dokkaHtml"))
}
})
signing {
useGpgCmd()