File tree 2 files changed +14
-9
lines changed
paperweight-core/src/main/kotlin/io/papermc/paperweight/core/taskcontainers
2 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -99,25 +99,27 @@ class BundlerJarTasks(
99
99
mainClass.set(mainClassString)
100
100
extraManifestMainAttributes.convention(mapOf (" Enable-Native-Access" to " ALL-UNNAMED" ))
101
101
102
- outputZip.set(layout.buildDirectory.file(" libs/ ${rootProject. jarName(" bundler" , classifier)} " ))
102
+ outputZip.set(layout.buildDirectory.file(jarName(" bundler" , classifier).map { " libs/ $it " } ))
103
103
}
104
104
val paperclipJarTask = tasks.register<CreatePaperclipJar >(paperclipTaskName) {
105
105
group = " bundling"
106
106
description = " Build a runnable paperclip jar"
107
107
108
108
libraryChangesJson.set(bundlerJarTask.flatMap { it.libraryChangesJson })
109
- outputZip.set(layout.buildDirectory.file(" libs/ ${rootProject. jarName(" paperclip" , classifier)} " ))
109
+ outputZip.set(layout.buildDirectory.file(jarName(" paperclip" , classifier).map { " libs/ $it " } ))
110
110
}
111
111
return bundlerJarTask to paperclipJarTask
112
112
}
113
113
114
- private fun Project.jarName (kind : String , classifier : String ): String {
115
- return listOfNotNull(
116
- project.name,
117
- kind,
118
- project.version,
119
- classifier.takeIf { it.isNotBlank() },
120
- ).joinToString(" -" ) + " .jar"
114
+ private fun Project.jarName (kind : String , classifier : String ): Provider <String > {
115
+ return bundlerJarName.map {
116
+ listOfNotNull(
117
+ it,
118
+ kind,
119
+ project.version,
120
+ classifier.takeIf { c -> c.isNotBlank() },
121
+ ).joinToString(" -" ) + " .jar"
122
+ }
121
123
}
122
124
123
125
private fun TaskProvider<CreateBundlerJar>.configureWith (
Original file line number Diff line number Diff line change @@ -299,6 +299,9 @@ class SoftSpoonTasks(
299
299
)
300
300
301
301
if (activeFork) {
302
+ // setup output name conventions
303
+ project.coreExt.bundlerJarName.convention(cfg.name)
304
+
302
305
// setup aggregate -server patching tasks
303
306
upstreamConfigTasks.setupAggregateTasks(
304
307
" Server" ,
You can’t perform that action at this time.
0 commit comments