-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
So, I heard you like polymorphism...
- Loading branch information
1 parent
ec2ff69
commit 83a995b
Showing
12 changed files
with
137 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 29 additions & 1 deletion
30
src/api/kotlin/xyz/wagyourtail/unimined/api/minecraft/task/RemapJarTask.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,33 @@ | ||
package xyz.wagyourtail.unimined.api.minecraft.task | ||
|
||
import groovy.lang.Closure | ||
import groovy.lang.DelegatesTo | ||
import org.gradle.api.provider.Property | ||
import org.gradle.api.tasks.Input | ||
import org.gradle.api.tasks.Optional | ||
import xyz.wagyourtail.unimined.api.mapping.mixin.MixinRemapOptions | ||
import xyz.wagyourtail.unimined.util.JarInterface | ||
|
||
interface RemapJarTask : JarInterface<AbstractRemapJarTask> | ||
interface RemapJarTask : JarInterface<AbstractRemapJarTask>, RemapOptions { | ||
|
||
/** | ||
* whether to remap AccessTransformers to the legacy format (<=1.7.10) | ||
*/ | ||
@get:Input | ||
@get:Optional | ||
val remapATToLegacy: Property<Boolean?> | ||
|
||
fun mixinRemap(action: MixinRemapOptions.() -> Unit) | ||
|
||
fun mixinRemap( | ||
@DelegatesTo(value = MixinRemapOptions::class, strategy = Closure.DELEGATE_FIRST) | ||
action: Closure<*> | ||
) { | ||
mixinRemap { | ||
action.delegate = this | ||
action.resolveStrategy = Closure.DELEGATE_FIRST | ||
action.call() | ||
} | ||
} | ||
|
||
} |
37 changes: 37 additions & 0 deletions
37
src/api/kotlin/xyz/wagyourtail/unimined/api/minecraft/task/RemapOptions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package xyz.wagyourtail.unimined.api.minecraft.task | ||
|
||
import org.gradle.api.file.RegularFileProperty | ||
import org.gradle.api.tasks.InputFile | ||
import org.gradle.api.tasks.Internal | ||
import org.jetbrains.annotations.ApiStatus | ||
import xyz.wagyourtail.unimined.api.mapping.MappingNamespaceTree | ||
|
||
interface RemapOptions { | ||
|
||
@get:InputFile | ||
val inputFile: RegularFileProperty | ||
|
||
@get:Internal | ||
@set:Internal | ||
var devNamespace: MappingNamespaceTree.Namespace? | ||
|
||
@get:Internal | ||
@set:Internal | ||
var devFallbackNamespace: MappingNamespaceTree.Namespace? | ||
|
||
@get:Internal | ||
@set:Internal | ||
var prodNamespace: MappingNamespaceTree.Namespace? | ||
|
||
@get:Internal | ||
@set:Internal | ||
@set:ApiStatus.Experimental | ||
var allowImplicitWildcards: Boolean | ||
|
||
fun devNamespace(namespace: String) | ||
|
||
fun devFallbackNamespace(namespace: String) | ||
|
||
fun prodNamespace(namespace: String) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.