mirror of
https://github.com/architectury/architectury-plugin.git
synced 2026-03-28 04:07:01 -05:00
Update transformers to 5.2.77
This commit is contained in:
@@ -5,5 +5,5 @@ loom_version_010Legacy=0.10.0.171
|
||||
loom_version_010=0.10.0.188
|
||||
loom_version_011=0.11.0.217
|
||||
loom_version_11=1.1.313
|
||||
transformer_version=5.2.75
|
||||
transformer_version=5.2.77
|
||||
base_version=3.4
|
||||
@@ -30,7 +30,7 @@ import java.util.jar.JarOutputStream
|
||||
import java.util.jar.Manifest
|
||||
|
||||
open class ArchitectPluginExtension(val project: Project) {
|
||||
var transformerVersion = "5.2.75"
|
||||
var transformerVersion = "5.2.77"
|
||||
var injectablesVersion = "1.0.10"
|
||||
var minecraft = ""
|
||||
private var compileOnly = false
|
||||
@@ -98,16 +98,21 @@ open class ArchitectPluginExtension(val project: Project) {
|
||||
}
|
||||
|
||||
fun properties(platform: String): Map<String, String> {
|
||||
return mutableMapOf(
|
||||
val map = mutableMapOf(
|
||||
BuiltinProperties.MIXIN_MAPPINGS to loom.allMixinMappings.joinToString(File.pathSeparator),
|
||||
BuiltinProperties.INJECT_INJECTABLES to injectInjectables.toString(),
|
||||
BuiltinProperties.UNIQUE_IDENTIFIER to project.projectUniqueIdentifier(),
|
||||
BuiltinProperties.COMPILE_CLASSPATH to getCompileClasspath().joinToString(File.pathSeparator),
|
||||
BuiltinProperties.MAPPINGS_WITH_SRG to loom.tinyMappingsWithSrg.toString(),
|
||||
BuiltinProperties.PLATFORM_NAME to platform,
|
||||
BuiltinProperties.REFMAP_NAME to loom.refmapName,
|
||||
BuiltinProperties.MCMETA_VERSION to "4"
|
||||
)
|
||||
|
||||
if (platform != "neoforge") {
|
||||
map[BuiltinProperties.REFMAP_NAME] = loom.refmapName
|
||||
map[BuiltinProperties.MAPPINGS_WITH_SRG] = loom.tinyMappingsWithSrg.toString()
|
||||
}
|
||||
|
||||
return map
|
||||
}
|
||||
|
||||
fun prepareTransformer() {
|
||||
@@ -145,7 +150,7 @@ open class ArchitectPluginExtension(val project: Project) {
|
||||
|
||||
fun transform(name: String, action: Action<Transform>) {
|
||||
transforms.getOrPut(name) {
|
||||
Transform(project, "development" + name.capitalize()).also { transform ->
|
||||
Transform(project, "development" + (if (name == "neoforge") "NeoForge" else name.capitalize())).also { transform ->
|
||||
if (!compileOnly) {
|
||||
project.configurations.maybeCreate(transform.devConfigName)
|
||||
}
|
||||
@@ -233,6 +238,11 @@ open class ArchitectPluginExtension(val project: Project) {
|
||||
loader(ModLoader.FORGE, action)
|
||||
}
|
||||
|
||||
@JvmOverloads
|
||||
fun neoForge(action: Action<Transform> = Action {}) {
|
||||
loader(ModLoader.NEOFORGE, action)
|
||||
}
|
||||
|
||||
@JvmOverloads
|
||||
fun loader(id: String, action: Action<Transform> = Action {}) {
|
||||
loader(ModLoader.valueOf(id), action)
|
||||
|
||||
@@ -4,7 +4,7 @@ import dev.architectury.plugin.loom.LoomInterface
|
||||
import dev.architectury.plugin.transformers.AddRefmapName
|
||||
import dev.architectury.transformer.transformers.*
|
||||
|
||||
class ModLoader(
|
||||
open class ModLoader(
|
||||
val id: String,
|
||||
val transformDevelopment: Transform.() -> Unit,
|
||||
val transformProduction: TransformingTask.(loom: LoomInterface) -> Unit,
|
||||
@@ -13,7 +13,7 @@ class ModLoader(
|
||||
LOADERS[id] = this
|
||||
}
|
||||
|
||||
val titledId = id.capitalize()
|
||||
open val titledId = id.capitalize()
|
||||
|
||||
companion object {
|
||||
fun valueOf(id: String): ModLoader =
|
||||
@@ -81,6 +81,38 @@ class ModLoader(
|
||||
}
|
||||
)
|
||||
|
||||
val NEOFORGE = object : ModLoader(
|
||||
id = "neoforge",
|
||||
transformDevelopment = {
|
||||
add(TransformExpectPlatform::class.java) { file ->
|
||||
this[BuiltinProperties.UNIQUE_IDENTIFIER] = projectGeneratedPackage(project, file)
|
||||
}
|
||||
add(RemapInjectables::class.java) { file ->
|
||||
this[BuiltinProperties.UNIQUE_IDENTIFIER] = projectGeneratedPackage(project, file)
|
||||
}
|
||||
this += TransformPlatformOnly::class.java
|
||||
|
||||
this += TransformNeoForgeAnnotations::class.java
|
||||
this += TransformNeoForgeEnvironment::class.java
|
||||
this += GenerateFakeNeoForgeMod::class.java
|
||||
},
|
||||
transformProduction = { loom ->
|
||||
add(TransformExpectPlatform()) { file ->
|
||||
this[BuiltinProperties.UNIQUE_IDENTIFIER] = projectGeneratedPackage(project, file)
|
||||
}
|
||||
add(RemapInjectables()) { file ->
|
||||
this[BuiltinProperties.UNIQUE_IDENTIFIER] = projectGeneratedPackage(project, file)
|
||||
}
|
||||
this += TransformPlatformOnly()
|
||||
|
||||
this += TransformNeoForgeAnnotations()
|
||||
this += TransformNeoForgeEnvironment()
|
||||
}
|
||||
) {
|
||||
override val titledId: String
|
||||
get() = "NeoForge"
|
||||
}
|
||||
|
||||
val QUILT = ModLoader(
|
||||
id = "quilt",
|
||||
transformDevelopment = {
|
||||
|
||||
Reference in New Issue
Block a user