mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 08:14:00 +02:00
fix spigot and refactor some gradlew things (#101)
This commit is contained in:
commit
87f7ed6538
3 changed files with 26 additions and 61 deletions
|
|
@ -31,6 +31,9 @@ repositories {
|
||||||
maven(url = "https://repo.nightexpressdev.com/releases")
|
maven(url = "https://repo.nightexpressdev.com/releases")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val reobfNMS = providers.gradleProperty("subprojects.reobfnms")
|
||||||
|
.get().split(",")
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// Spigot api
|
// Spigot api
|
||||||
compileOnly("org.spigotmc:spigot-api:1.18-R0.1-SNAPSHOT")
|
compileOnly("org.spigotmc:spigot-api:1.18-R0.1-SNAPSHOT")
|
||||||
|
|
@ -73,23 +76,9 @@ dependencies {
|
||||||
|
|
||||||
// Include nms
|
// Include nms
|
||||||
implementation(project(":nms:nms-common"))
|
implementation(project(":nms:nms-common"))
|
||||||
implementation(project(":nms:v1_17R1", configuration = "reobf"))
|
for (nmsPart in reobfNMS) {
|
||||||
implementation(project(":nms:v1_18R1", configuration = "reobf"))
|
implementation(project(":nms:$nmsPart", configuration = "reobf"))
|
||||||
implementation(project(":nms:v1_18R2", configuration = "reobf"))
|
}
|
||||||
implementation(project(":nms:v1_19R1", configuration = "reobf"))
|
|
||||||
implementation(project(":nms:v1_19R2", configuration = "reobf"))
|
|
||||||
implementation(project(":nms:v1_19R3", configuration = "reobf"))
|
|
||||||
implementation(project(":nms:v1_20R1", configuration = "reobf"))
|
|
||||||
implementation(project(":nms:v1_20R2", configuration = "reobf"))
|
|
||||||
implementation(project(":nms:v1_20R3", configuration = "reobf"))
|
|
||||||
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"))
|
|
||||||
implementation(project(":nms:v1_21R4", configuration = "reobf"))
|
|
||||||
implementation(project(":nms:v1_21R5", configuration = "reobf"))
|
|
||||||
implementation(project(":nms:v1_21R6", configuration = "reobf"))
|
|
||||||
implementation(project(":nms:v1_21R7", configuration = "reobf"))
|
|
||||||
|
|
||||||
// include kotlin for the offline jar
|
// include kotlin for the offline jar
|
||||||
implementation(kotlin("stdlib"))
|
implementation(kotlin("stdlib"))
|
||||||
|
|
@ -169,7 +158,8 @@ tasks {
|
||||||
filesMatching("plugin.yml") {
|
filesMatching("plugin.yml") {
|
||||||
expand(
|
expand(
|
||||||
"version" to effectiveVersion,
|
"version" to effectiveVersion,
|
||||||
"libraries" to " \"org.jetbrains.kotlin:kotlin-stdlib:2.1.0\" "
|
"libraries" to " \"org.jetbrains.kotlin:kotlin-stdlib:2.1.0\" " +
|
||||||
|
", \"net.kyori:adventure-platform-bukkit:4.4.1\""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -259,13 +249,9 @@ object Meta {
|
||||||
const val snapshot = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
|
const val snapshot = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
|
||||||
}
|
}
|
||||||
|
|
||||||
val disalowedDependency = setOf(
|
val disallowedDependency = HashSet<String>()
|
||||||
"nms-common", "kotlin-stdlib",
|
disallowedDependency.addAll(reobfNMS)
|
||||||
"v1_17R1",
|
disallowedDependency.addAll(listOf("nms-common", "nms-paper", "kotlin-stdlib"))
|
||||||
"v1_18R1", "v1_18R2", "v1_19R1", "v1_19R2", "v1_19R3",
|
|
||||||
"v1_20R1", "v1_20R2", "v1_20R3", "v1_20R4",
|
|
||||||
"v1_21R1", "v1_21R2", "v1_21R3", "v1_21R4", "v1_21R5"
|
|
||||||
)
|
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
repositories {
|
repositories {
|
||||||
|
|
@ -333,7 +319,7 @@ publishing {
|
||||||
val artifactNode = ((child as Node).get("artifactId") as NodeList)[0] as Node
|
val artifactNode = ((child as Node).get("artifactId") as NodeList)[0] as Node
|
||||||
val artifactID = artifactNode.value() as String
|
val artifactID = artifactNode.value() as String
|
||||||
|
|
||||||
if(disalowedDependency.contains(artifactID)) {
|
if(disallowedDependency.contains(artifactID)) {
|
||||||
toRemove.add(child)
|
toRemove.add(child)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,7 @@ kotlin.code.style=official
|
||||||
# Signing
|
# Signing
|
||||||
signing.secretKeyRingFile=~/.gnupg/secring.gpg
|
signing.secretKeyRingFile=~/.gnupg/secring.gpg
|
||||||
|
|
||||||
kotlin.daemon.jvmargs=-Xmx8G
|
kotlin.daemon.jvmargs=-Xmx8G
|
||||||
|
|
||||||
|
# list of nms
|
||||||
|
subprojects.reobfnms=v1_17R1,v1_18R1,v1_18R2,v1_19R1,v1_19R2,v1_19R3,v1_20R1,v1_20R2,v1_20R3,v1_20R4,v1_21R1,v1_21R2,v1_21R3,v1_21R4,v1_21R5,v1_21R6,v1_21R7
|
||||||
|
|
@ -3,41 +3,17 @@ rootProject.name = "CustomAnvil"
|
||||||
// NMS subproject
|
// NMS subproject
|
||||||
include("nms:nms-common")
|
include("nms:nms-common")
|
||||||
findProject(":nms:nms-common")?.name = "nms-common"
|
findProject(":nms:nms-common")?.name = "nms-common"
|
||||||
include("nms:v1_17R1")
|
|
||||||
findProject(":nms:v1_17R1")?.name = "v1_17R1"
|
|
||||||
include("nms:v1_18R1")
|
|
||||||
findProject(":nms:v1_18R1")?.name = "v1_18R1"
|
|
||||||
include("nms:v1_18R2")
|
|
||||||
findProject(":nms:v1_18R2")?.name = "v1_18R2"
|
|
||||||
include("nms:v1_19R1")
|
|
||||||
findProject(":nms:v1_19R1")?.name = "v1_19R1"
|
|
||||||
include("nms:v1_19R2")
|
|
||||||
findProject(":nms:v1_19R2")?.name = "v1_19R2"
|
|
||||||
include("nms:v1_19R3")
|
|
||||||
findProject(":nms:v1_19R3")?.name = "v1_19R3"
|
|
||||||
include("nms:v1_20R1")
|
|
||||||
findProject(":nms:v1_20R1")?.name = "v1_20R1"
|
|
||||||
include("nms:v1_20R2")
|
|
||||||
findProject(":nms:v1_20R2")?.name = "v1_20R2"
|
|
||||||
include("nms:v1_20R3")
|
|
||||||
findProject(":nms:v1_20R3")?.name = "v1_20R3"
|
|
||||||
include("nms:v1_20R4")
|
|
||||||
findProject(":nms:v1_20R4")?.name = "v1_20R4"
|
|
||||||
include("nms:v1_21R1")
|
|
||||||
findProject(":nms:v1_21R1")?.name = "v1_21R1"
|
|
||||||
include("nms:v1_21R2")
|
|
||||||
findProject(":nms:v1_21R2")?.name = "v1_21R2"
|
|
||||||
include("nms:v1_21R3")
|
|
||||||
findProject(":nms:v1_21R3")?.name = "v1_21R3"
|
|
||||||
include("nms:v1_21R4")
|
|
||||||
findProject(":nms:v1_21R4")?.name = "v1_21R4"
|
|
||||||
include("nms:v1_21R5")
|
|
||||||
findProject(":nms:v1_21R5")?.name = "v1_21R5"
|
|
||||||
include("nms:v1_21R6")
|
|
||||||
findProject(":nms:v1_21R6")?.name = "v1_21R6"
|
|
||||||
include("nms:v1_21R7")
|
|
||||||
findProject(":nms:v1_21R7")?.name = "v1_21R7"
|
|
||||||
|
|
||||||
|
|
||||||
|
val reobfNMS = providers.gradleProperty("subprojects.reobfnms")
|
||||||
|
.get().split(",")
|
||||||
|
|
||||||
|
for (nmsPart in reobfNMS) {
|
||||||
|
include("nms:$nmsPart")
|
||||||
|
findProject(":nms:$nmsPart")?.name = nmsPart
|
||||||
|
}
|
||||||
|
|
||||||
|
// compatibility subprojects
|
||||||
include(":impl:LegacyEcoEnchant")
|
include(":impl:LegacyEcoEnchant")
|
||||||
findProject(":impl:LegacyEcoEnchant")?.name = "LegacyEcoEnchant"
|
findProject(":impl:LegacyEcoEnchant")?.name = "LegacyEcoEnchant"
|
||||||
include("impl:ExcellentEnchant5_3")
|
include("impl:ExcellentEnchant5_3")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue