@@ -13,7 +13,6 @@ val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
13
13
dependencies {
14
14
mache(" io.papermc:mache:1.21.4+build.6" )
15
15
paperclip(" io.papermc:paperclip:3.0.3" )
16
- remapper(" net.fabricmc:tiny-remapper:0.10.3:fat" )
17
16
}
18
17
19
18
paperweight {
@@ -23,23 +22,24 @@ paperweight {
23
22
24
23
paper {
25
24
reobfMappingsPatch = layout.projectDirectory.file(" ../build-data/reobf-mappings-patch.tiny" )
26
- reobfPackagesToFix.addAll(
27
- " co.aikar.timings" ,
28
- " com.destroystokyo.paper" ,
29
- " com.mojang" ,
30
- " io.papermc.paper" ,
31
- " ca.spottedleaf" ,
32
- " net.kyori.adventure.bossbar" ,
33
- " net.minecraft" ,
34
- " org.bukkit.craftbukkit" ,
35
- " org.spigotmc" ,
36
- )
37
25
}
38
26
39
27
spigot {
40
28
buildDataRef = " 3edaf46ec1eed4115ce1b18d2846cded42577e42"
41
29
packageVersion = " v1_21_R3" // also needs to be updated in MappingEnvironment
42
30
}
31
+
32
+ reobfPackagesToFix.addAll(
33
+ " co.aikar.timings" ,
34
+ " com.destroystokyo.paper" ,
35
+ " com.mojang" ,
36
+ " io.papermc.paper" ,
37
+ " ca.spottedleaf" ,
38
+ " net.kyori.adventure.bossbar" ,
39
+ " net.minecraft" ,
40
+ " org.bukkit.craftbukkit" ,
41
+ " org.spigotmc" ,
42
+ )
43
43
}
44
44
45
45
tasks.generateDevelopmentBundle {
@@ -58,45 +58,45 @@ abstract class Services {
58
58
}
59
59
val services = objects.newInstance<Services >()
60
60
61
- publishing {
62
- if (project.providers.gradleProperty(" publishDevBundle" ).isPresent) {
63
- val devBundleComponent = services.softwareComponentFactory.adhoc(" devBundle" )
64
- components.add(devBundleComponent)
61
+ if (project.providers.gradleProperty(" publishDevBundle" ).isPresent) {
62
+ val devBundleComponent = services.softwareComponentFactory.adhoc(" devBundle" )
63
+ components.add(devBundleComponent)
65
64
66
- val devBundle = configurations.consumable(" devBundle" ) {
67
- attributes.attribute(DevBundleOutput .ATTRIBUTE , objects.named(DevBundleOutput .ZIP ))
68
- outgoing.artifact(tasks.generateDevelopmentBundle.flatMap { it.devBundleFile })
69
- }
70
- devBundleComponent.addVariantsFromConfiguration(devBundle.get()) {}
65
+ val devBundle = configurations.consumable(" devBundle" ) {
66
+ attributes.attribute(DevBundleOutput .ATTRIBUTE , objects.named(DevBundleOutput .ZIP ))
67
+ outgoing.artifact(tasks.generateDevelopmentBundle.flatMap { it.devBundleFile })
68
+ }
69
+ devBundleComponent.addVariantsFromConfiguration(devBundle.get()) {}
71
70
72
- val runtime = configurations.consumable(" serverRuntimeClasspath" ) {
73
- attributes.attribute(DevBundleOutput .ATTRIBUTE , objects.named(DevBundleOutput .SERVER_DEPENDENCIES ))
74
- attributes.attribute(Usage .USAGE_ATTRIBUTE , objects.named(Usage .JAVA_RUNTIME ))
75
- extendsFrom(configurations.runtimeClasspath.get())
76
- }
77
- devBundleComponent.addVariantsFromConfiguration(runtime.get()) {
78
- mapToMavenScope(" runtime" )
79
- }
71
+ val runtime = configurations.consumable(" serverRuntimeClasspath" ) {
72
+ attributes.attribute(DevBundleOutput .ATTRIBUTE , objects.named(DevBundleOutput .SERVER_DEPENDENCIES ))
73
+ attributes.attribute(Usage .USAGE_ATTRIBUTE , objects.named(Usage .JAVA_RUNTIME ))
74
+ extendsFrom(configurations.runtimeClasspath.get())
75
+ }
76
+ devBundleComponent.addVariantsFromConfiguration(runtime.get()) {
77
+ mapToMavenScope(" runtime" )
78
+ }
80
79
81
- val compile = configurations.consumable(" serverCompileClasspath" ) {
82
- attributes.attribute(DevBundleOutput .ATTRIBUTE , objects.named(DevBundleOutput .SERVER_DEPENDENCIES ))
83
- attributes.attribute(Usage .USAGE_ATTRIBUTE , objects.named(Usage .JAVA_API ))
84
- extendsFrom(configurations.compileClasspath.get())
85
- }
86
- devBundleComponent.addVariantsFromConfiguration(compile.get()) {
87
- mapToMavenScope(" compile" )
88
- }
80
+ val compile = configurations.consumable(" serverCompileClasspath" ) {
81
+ attributes.attribute(DevBundleOutput .ATTRIBUTE , objects.named(DevBundleOutput .SERVER_DEPENDENCIES ))
82
+ attributes.attribute(Usage .USAGE_ATTRIBUTE , objects.named(Usage .JAVA_API ))
83
+ extendsFrom(configurations.compileClasspath.get())
84
+ }
85
+ devBundleComponent.addVariantsFromConfiguration(compile.get()) {
86
+ mapToMavenScope(" compile" )
87
+ }
89
88
90
- tasks.withType(GenerateMavenPom ::class ).configureEach {
91
- doLast {
92
- val text = destination.readText()
93
- // Remove dependencies from pom, dev bundle is designed for gradle module metadata consumers
94
- destination.writeText(
95
- text.substringBefore(" <dependencies>" ) + text.substringAfter(" </dependencies>" )
96
- )
97
- }
89
+ tasks.withType(GenerateMavenPom ::class ).configureEach {
90
+ doLast {
91
+ val text = destination.readText()
92
+ // Remove dependencies from pom, dev bundle is designed for gradle module metadata consumers
93
+ destination.writeText(
94
+ text.substringBefore(" <dependencies>" ) + text.substringAfter(" </dependencies>" )
95
+ )
98
96
}
97
+ }
99
98
99
+ publishing {
100
100
publications.create<MavenPublication >(" devBundle" ) {
101
101
artifactId = " dev-bundle"
102
102
from(devBundleComponent)
@@ -317,21 +317,21 @@ tasks.registerRunTask("runDevServer") {
317
317
318
318
tasks.registerRunTask(" runBundler" ) {
319
319
description = " Spin up a test server from the Mojang mapped bundler jar"
320
- classpath(tasks.named < io.papermc.paperweight.tasks. CreateBundlerJar > ( " createMojmapBundlerJar" ) .flatMap { it.outputZip })
320
+ classpath(tasks.createMojmapBundlerJar.flatMap { it.outputZip })
321
321
mainClass.set(null as String? )
322
322
}
323
323
tasks.registerRunTask(" runReobfBundler" ) {
324
324
description = " Spin up a test server from the reobf bundler jar"
325
- classpath(tasks.named < io.papermc.paperweight.tasks. CreateBundlerJar > ( " createReobfBundlerJar" ) .flatMap { it.outputZip })
325
+ classpath(tasks.createReobfBundlerJar.flatMap { it.outputZip })
326
326
mainClass.set(null as String? )
327
327
}
328
328
tasks.registerRunTask(" runPaperclip" ) {
329
329
description = " Spin up a test server from the Mojang mapped Paperclip jar"
330
- classpath(tasks.named < io.papermc.paperweight.tasks. CreatePaperclipJar > ( " createMojmapPaperclipJar" ) .flatMap { it.outputZip })
330
+ classpath(tasks.createMojmapPaperclipJar.flatMap { it.outputZip })
331
331
mainClass.set(null as String? )
332
332
}
333
333
tasks.registerRunTask(" runReobfPaperclip" ) {
334
334
description = " Spin up a test server from the reobf Paperclip jar"
335
- classpath(tasks.named < io.papermc.paperweight.tasks. CreatePaperclipJar > ( " createReobfPaperclipJar" ) .flatMap { it.outputZip })
335
+ classpath(tasks.createReobfPaperclipJar.flatMap { it.outputZip })
336
336
mainClass.set(null as String? )
337
337
}
0 commit comments