mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 08:14:00 +02:00
fix spigot and refactor some gradlew things
This commit is contained in:
parent
ee4936ecf5
commit
87c9971626
3 changed files with 26 additions and 61 deletions
|
|
@ -31,6 +31,9 @@ repositories {
|
|||
maven(url = "https://repo.nightexpressdev.com/releases")
|
||||
}
|
||||
|
||||
val reobfNMS = providers.gradleProperty("subprojects.reobfnms")
|
||||
.get().split(",")
|
||||
|
||||
dependencies {
|
||||
// Spigot api
|
||||
compileOnly("org.spigotmc:spigot-api:1.18-R0.1-SNAPSHOT")
|
||||
|
|
@ -73,23 +76,9 @@ dependencies {
|
|||
|
||||
// Include nms
|
||||
implementation(project(":nms:nms-common"))
|
||||
implementation(project(":nms:v1_17R1", configuration = "reobf"))
|
||||
implementation(project(":nms:v1_18R1", 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"))
|
||||
for (nmsPart in reobfNMS) {
|
||||
implementation(project(":nms:$nmsPart", configuration = "reobf"))
|
||||
}
|
||||
|
||||
// include kotlin for the offline jar
|
||||
implementation(kotlin("stdlib"))
|
||||
|
|
@ -169,7 +158,8 @@ tasks {
|
|||
filesMatching("plugin.yml") {
|
||||
expand(
|
||||
"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/"
|
||||
}
|
||||
|
||||
val disalowedDependency = setOf(
|
||||
"nms-common", "kotlin-stdlib",
|
||||
"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"
|
||||
)
|
||||
val disallowedDependency = HashSet<String>()
|
||||
disallowedDependency.addAll(reobfNMS)
|
||||
disallowedDependency.addAll(listOf("nms-common", "nms-paper", "kotlin-stdlib"))
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
|
|
@ -333,7 +319,7 @@ publishing {
|
|||
val artifactNode = ((child as Node).get("artifactId") as NodeList)[0] as Node
|
||||
val artifactID = artifactNode.value() as String
|
||||
|
||||
if(disalowedDependency.contains(artifactID)) {
|
||||
if(disallowedDependency.contains(artifactID)) {
|
||||
toRemove.add(child)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,4 +3,7 @@ kotlin.code.style=official
|
|||
# Signing
|
||||
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
|
||||
include("nms: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")
|
||||
findProject(":impl:LegacyEcoEnchant")?.name = "LegacyEcoEnchant"
|
||||
include("impl:ExcellentEnchant5_3")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue