mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-04 14:38:49 +00:00
misc: Applied suggestions review
This commit is contained in:
3 files changed
+20
-47
No files matched your search
@@ -1,16 +1,9 @@
|
||||
import java.util.*
|
||||
import java.util.Locale
|
||||
|
||||
plugins {
|
||||
id("carbon.shadow-platform")
|
||||
id("net.kyori.blossom")
|
||||
}
|
||||
|
||||
val velocityRun: Configuration by configurations.creating {
|
||||
attributes {
|
||||
attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage::class, Usage.JAVA_RUNTIME))
|
||||
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category::class, Category.LIBRARY))
|
||||
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(LibraryElements::class, LibraryElements.JAR))
|
||||
}
|
||||
id("xyz.jpenilla.run-velocity")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -20,9 +13,6 @@ dependencies {
|
||||
annotationProcessor(libs.velocityApi)
|
||||
|
||||
implementation(libs.cloudVelocity)
|
||||
|
||||
velocityRun("com.velocitypowered", "velocity-proxy", libs.versions.velocityApi.get())
|
||||
|
||||
compileOnly(libs.miniplaceholders)
|
||||
}
|
||||
|
||||
@@ -37,32 +27,14 @@ tasks {
|
||||
exclude(dependency("javax.inject:javax.inject"))
|
||||
}
|
||||
}
|
||||
register<JavaExec>("runProxy") {
|
||||
group = "carbon"
|
||||
standardInput = System.`in`
|
||||
classpath(velocityRun.asFileTree)
|
||||
workingDir = layout.projectDirectory.dir("run").asFile
|
||||
|
||||
val pluginJar = shadowJar.flatMap { it.archiveFile }
|
||||
inputs.file(pluginJar)
|
||||
|
||||
doFirst {
|
||||
if (!workingDir.exists()) {
|
||||
workingDir.mkdirs()
|
||||
}
|
||||
val plugins = workingDir.resolve("plugins")
|
||||
if (!plugins.exists()) {
|
||||
plugins.mkdirs()
|
||||
}
|
||||
|
||||
pluginJar.get().asFile.copyTo(plugins.resolve("carbon.jar"), overwrite = true)
|
||||
}
|
||||
runVelocity {
|
||||
velocityVersion(libs.versions.velocityApi.get())
|
||||
}
|
||||
}
|
||||
|
||||
blossom {
|
||||
mapOf(
|
||||
"ID" to rootProject.name.toLowerCase(Locale.ROOT),
|
||||
"ID" to rootProject.name.lowercase(Locale.ROOT),
|
||||
"NAME" to rootProject.name,
|
||||
"VERSION" to version,
|
||||
"DESCRIPTION" to description,
|
||||
|
||||
Reference in new issue
Block a user