forked from Arasple/TrChat
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
72 changed files
with
285 additions
and
309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,41 @@ | ||
@file:Suppress("PropertyName", "SpellCheckingInspection") | ||
|
||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar | ||
|
||
val taboolib_version: String by project | ||
taboolib { | ||
description { | ||
name(rootProject.name) | ||
desc("Advanced Minecraft Chat Control") | ||
links { | ||
name("homepage").url("https://trchat.trixey.cc/") | ||
} | ||
contributors { | ||
name("Arasple") | ||
name("ItsFlicker") | ||
} | ||
dependencies { | ||
name("PlaceholderAPI").with("bukkit") | ||
name("DiscordSRV").with("bukkit").optional(true) | ||
name("EcoEnchants").with("bukkit").optional(true) | ||
name("ItemsAdder").with("bukkit").optional(true) | ||
name("Nova").with("bukkit").optional(true) | ||
name("Multiverse-Core").with("bukkit").loadafter(true) | ||
} | ||
} | ||
relocate("com.eatthepath.uuid.", "${rootProject.group}.library.uuid.") | ||
} | ||
|
||
dependencies { | ||
implementation(project(":project:common")) | ||
implementation(project(":project:module-adventure")) | ||
implementation(project(":project:module-nms")) | ||
implementation(project(":project:runtime-bukkit")) | ||
implementation(project(":project:runtime-bungee")) | ||
implementation(project(":project:runtime-velocity")) | ||
taboo("com.eatthepath:fast-uuid:0.2.0") | ||
} | ||
|
||
tasks { | ||
withType<ShadowJar> { | ||
archiveBaseName.set(rootProject.name) | ||
archiveClassifier.set("") | ||
// 删除一些不必要的文件 | ||
exclude("META-INF/maven/**") | ||
exclude("META-INF/tf/**") | ||
exclude("module-info.java") | ||
jar { | ||
// 构件名 | ||
archiveFileName.set("${rootProject.name}-${archiveFileName.get().substringAfter('-')}") | ||
// 打包子项目源代码 | ||
rootProject.subprojects.forEach { from(it.sourceSets["main"].output) } | ||
} | ||
sourcesJar { | ||
// 构件名 | ||
archiveFileName.set("${rootProject.name}-${archiveFileName.get().substringAfter('-')}") | ||
// 打包子项目源代码 | ||
rootProject.subprojects.forEach { from(it.sourceSets["main"].allSource) } | ||
} | ||
build { | ||
dependsOn(shadowJar) | ||
} | ||
} | ||
|
||
gradle.buildFinished { | ||
File(buildDir, "libs/${project.name}-${rootProject.version}.jar").delete() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
dependencies { | ||
compileOnly("com.eatthepath:fast-uuid:0.2.0") | ||
} | ||
|
||
taboolib { subproject = true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
project/common/src/main/kotlin/me/arasple/mc/trchat/util/ArrayConverter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package me.arasple.mc.trchat.util | ||
|
||
import taboolib.common.util.asList | ||
import taboolib.library.configuration.Converter | ||
|
||
class ArrayConverter : Converter<Array<String>, Any> { | ||
override fun convertToField(value: Any): Array<String> { | ||
return value.asList().toTypedArray() | ||
} | ||
|
||
override fun convertFromField(value: Array<String>): Any { | ||
return if (value.size == 1) value[0] else value.toList() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.