mirror of
https://github.com/architectury/architectury-plugin.git
synced 2026-03-28 04:07:01 -05:00
Add action overloads to platform methods, add TransformPlatformOnly
Signed-off-by: shedaniel <daniel@shedaniel.me>
This commit is contained in:
@@ -54,6 +54,7 @@ class ArchitectPlugin : Plugin<Project> {
|
||||
it += TransformExpectPlatform()
|
||||
it += RemapInjectables()
|
||||
it += AddRefmapName()
|
||||
it += TransformPlatformOnly()
|
||||
}
|
||||
|
||||
project.tasks.register("transformProductionForge", TransformingTask::class.java) {
|
||||
@@ -62,6 +63,7 @@ class ArchitectPlugin : Plugin<Project> {
|
||||
it += TransformExpectPlatform()
|
||||
it += RemapInjectables()
|
||||
it += AddRefmapName()
|
||||
it += TransformPlatformOnly()
|
||||
|
||||
it += TransformForgeAnnotations()
|
||||
it += TransformForgeEnvironment()
|
||||
|
||||
@@ -153,15 +153,19 @@ open class ArchitectPluginExtension(val project: Project) {
|
||||
return this
|
||||
}
|
||||
|
||||
fun fabric() {
|
||||
@JvmOverloads
|
||||
fun fabric(action: Action<Transform> = Action {}) {
|
||||
transform("fabric", Action {
|
||||
it.setupFabricTransforms()
|
||||
action.execute(it)
|
||||
})
|
||||
}
|
||||
|
||||
fun forge() {
|
||||
@JvmOverloads
|
||||
fun forge(action: Action<Transform> = Action {}) {
|
||||
transform("forge", Action {
|
||||
it.setupForgeTransforms()
|
||||
action.execute(it)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -275,12 +279,14 @@ data class Transform(val configName: String, val transformers: MutableList<Class
|
||||
this += GenerateFakeFabricMod::class.java
|
||||
this += TransformExpectPlatform::class.java
|
||||
this += RemapInjectables::class.java
|
||||
this += TransformPlatformOnly::class.java
|
||||
}
|
||||
|
||||
fun setupForgeTransforms() {
|
||||
this += RuntimeMixinRefmapDetector::class.java
|
||||
this += TransformExpectPlatform::class.java
|
||||
this += RemapInjectables::class.java
|
||||
this += TransformPlatformOnly::class.java
|
||||
|
||||
this += TransformForgeAnnotations::class.java
|
||||
this += TransformForgeEnvironment::class.java
|
||||
|
||||
Reference in New Issue
Block a user