Skip to content

Commit

Permalink
构建输出改进 (原来我tm写的什么垃圾东西啊,麻烦的要死还tm丑死了)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheFloodDragon committed Jul 26, 2023
1 parent 436247a commit 05b273b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 54 deletions.
7 changes: 2 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ subprojects {
archiveAppendix.set("")
archiveClassifier.set("")
archiveVersion.set(rootVersion)
//archiveBaseName.set("$rootName-Bukkit")
destinationDirectory.set(file("$rootDir/outs")) //输出路径
// Exclude
exclude("META-INF/**")
exclude("com/**", "org/**")
Expand All @@ -77,7 +77,4 @@ subprojects {

}

buildDirClean()

//工件输出
output()
buildDirClean()
49 changes: 0 additions & 49 deletions buildSrc/src/main/kotlin/CompiledOutputer.kt

This file was deleted.

5 changes: 5 additions & 0 deletions plugin/all/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

dependencies {
parent!!.childProjects.values.filter {
it.name.contains("platform")
Expand All @@ -8,4 +10,7 @@ tasks {
build {
dependsOn(shadowJar)
}
withType<ShadowJar> {
archiveFileName.set("$rootName-$rootVersion.jar") //输出名称
}
}
5 changes: 5 additions & 0 deletions plugin/platform-bukkit/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

dependencies { implementation(project(":project:runtime-bukkit")) }

tasks {
build {
dependsOn(shadowJar)
}
withType<ShadowJar> {
archiveFileName.set("$rootName-Bukkit-$rootVersion.jar") //输出名称
}
}
15 changes: 15 additions & 0 deletions script/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

subprojects {
tasks {
build {
dependsOn(shadowJar)
}
withType<ShadowJar> {
archiveFileName.set("Script-${project.name.uppercase()}-${project.version}.jar") //输出名称
}
}

}

buildDirClean()

0 comments on commit 05b273b

Please sign in to comment.