Extension object for mixin configuration, actually manages the configuration of the mixin annotation processor and extensions to sourcesets
| Modifiers | Name | Description |
|---|---|---|
static class |
MixinExtension.AddMixinsToJarTask |
Task which contributes generated refmap from configured sourcesets, and configs declared by the user, to the (pre-obf) jar |
static class |
MixinExtension.ArtefactSpecificRefmap |
A simple decorated java.io.File struct which keeps the original refmap name internally, so that the relative paths can be preserved when adding the refmap to the jar |
static class |
MixinExtension.ConfigureReobfTask |
Task to contribute generated mappings from the AP to the downstream reobf tasks |
static class |
MixinExtension.ConfigureReobfTaskForPatcher |
Reobf configuration task for patcher projects |
static class |
MixinExtension.ConfigureReobfTaskForUserDev |
Reobf configuration task for userdev projects |
| Type | Name and description |
|---|---|
java.lang.Object |
checks |
java.lang.Object |
debug |
java.lang.String |
defaultObfuscationEnvThe default obfuscation environment to use when generating refMaps. |
boolean |
disableAnnotationProcessorCheckDisables the check for the annotation processor dependency on gradle 5 and above. |
boolean |
disableEclipseAddonDisables the part of this plugin that tries to add IDE integration for the AP to eclipse. |
boolean |
disableOverwriteCheckerDisables the overwrite checking functionality which raises warnings when overwrite methods are not appropriately decorated |
boolean |
disableRefMapWarningIf a refMap overlap is detected a warning will be output, however there are situations where a refMap overlap may be desired (for example if different sourceSets are going into different jars) and thus the warning can be ignored. |
boolean |
disableTargetExportDisables the target export in the mixin annotation processor, only useful if multiple compile tasks need to be separated from the point of view of the mixin AP. |
boolean |
disableTargetValidatorDisables the target validator in the mixin annotation processor. |
java.lang.Object |
dumpTargetOnFailure |
java.lang.Object |
env |
java.lang.Object |
hotSwap |
java.lang.Object |
ignoreConstraints |
java.lang.Object |
initialiserInjectionMode |
java.util.List<java.lang.Object> |
mappingTypesMapping types list to pass to the AP. |
java.util.HashMap<java.lang.String, java.lang.String> |
messagesCollection of message properties |
java.lang.Object |
overwriteErrorLevelSets the overwrite checker error level, the default is to raise WARNING however this can be set to ERROR in order to cause missing decorations to be treated as errors |
boolean |
quietInstruction for the annotation processor to suppress informational messages such as the AP version, etc. |
java.lang.Object |
reobfSrgFileBy default we will attempt to find the SRG file to feed to the AP by querying the genSrgs task, however the user can override the file by setting this argument |
boolean |
showMessageTypesInstruction for the annotation processor to decorate all messages with the message type. |
| Constructor and description |
|---|
MixinExtension
(org.gradle.api.Project project)ctor |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
add(java.lang.String set)Add a sourceSet for mixin processing by name, the sourceSet must exist and define the refMap property. |
|
void |
add(org.gradle.api.tasks.SourceSet set)Add a sourceSet for mixin processing, the sourceSet must define the refMap property. |
|
void |
add(java.lang.String set, java.lang.Object refMapName)Add a sourceSet by name for mixin processing and specify the refMap name, the SourceSet must exist |
|
void |
add(org.gradle.api.tasks.SourceSet set, java.lang.Object refMapName)Add a sourceSet for mixin processing and specify the refMap name, the SourceSet must exist |
|
void |
config(java.lang.String path)Register a mixin config which will be added to all reobf'd jar manifests and all run configurations |
|
void |
configure(org.gradle.api.tasks.SourceSet set, java.lang.String projectType)Configure a sourceSet for mixin processing and specify the refMap name, the SourceSet must exist |
|
void |
disableAnnotationProcessorCheck()Directive version of disableAnnotationProcessorCheck |
|
void |
disableEclipseAddon()Directive version of disableEclipseAddon |
|
void |
disableOverwriteChecker()Directive version of disableOverwriteChecker |
|
void |
disableRefMapWarning()Directive version of disableRefMapWarning |
|
void |
disableTargetExport()Directive version of disableTargetExport |
|
void |
disableTargetValidator()Directive version of disableTargetValidator |
|
void |
extraMappings(java.lang.Object file)Adds an additional TSRG file for the AP to consume. |
|
java.lang.Object |
getChecks()Accessor for system properties starting with mixin.checks |
|
java.lang.Object |
getDebug()Accessor for system properties starting with mixin.debug |
|
java.lang.Object |
getDumpTargetOnFailure()Accessor for system property mixin.dumpTargetOnFailure |
|
java.lang.Object |
getEnv()Accessor for system properties starting with mixin.env |
|
java.lang.Object |
getHotSwap()Accessor for system property mixin.hotSwap |
|
java.lang.Object |
getIgnoreConstraints()Accessor for system property mixin.ignoreConstraints |
|
java.lang.Object |
getInitialiserInjectionMode()Accessor for system property mixin.initialiserInjectionMode |
|
java.lang.Object |
getMappings()Getter for reobfSrgFile, fetch from the genSrgs task if not configured |
|
java.util.Map<java.lang.String, java.lang.String> |
getTokens()Return current tokens as an unmodifyable map |
|
void |
importConfig(java.lang.Object config) |
|
void |
importLibrary(java.lang.Object lib) |
|
void |
manuallyAdd(org.gradle.api.tasks.SourceSet set)We need to disable the flag early, because our main after evaluate happens before the one we are adding now. |
|
java.lang.Object |
messages(groovy.lang.Closure closure) |
|
void |
overwriteErrorLevel(java.lang.Object errorLevel)Directive version of overwriteErrorLevel |
|
void |
quiet()Directive version of quiet |
|
java.lang.Object |
setChecks(java.lang.Object value)Accessor for system property mixin.checks |
|
java.lang.Object |
setDebug(java.lang.Object value)Accessor for system property mixin.debug |
|
java.lang.Object |
setDumpTargetOnFailure(java.lang.Object value)Accessor for system property mixin.dumpTargetOnFailure |
|
java.lang.Object |
setEnv(java.lang.Object value)Accessor for system property mixin.env |
|
java.lang.Object |
setHotSwap(java.lang.Object value)Accessor for system property mixin.hotSwap |
|
java.lang.Object |
setIgnoreConstraints(java.lang.Object value)Accessor for system property mixin.ignoreConstraints |
|
java.lang.Object |
setInitialiserInjectionMode(java.lang.Object mode)Accessor for system property mixin.initialiserInjectionMode |
|
void |
showMessageTypes()Directive version of showMessageTypes |
|
void |
token(java.lang.Object name)Adds a boolean token with the value true |
|
void |
token(java.lang.Object name, java.lang.Object value)Adds a token with the specified value |
|
MixinExtension |
tokens(java.util.Map<java.lang.String, ?> map)Add multiple tokens in one go by providing a map |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
The default obfuscation environment to use when generating refMaps. This is the obfuscation set which will end up in the mappings node in the generated refMap.
Disables the check for the annotation processor dependency on gradle 5 and above. Potential reasons for doing so being that the AP is present but in a different dep, or the detection has just failed for some reason and the user wants to override
Disables the part of this plugin that tries to add IDE integration for the AP to eclipse. Useful if something goes wrong, or you want to manage that part yourself.
Disables the overwrite checking functionality which raises warnings when overwrite methods are not appropriately decorated
If a refMap overlap is detected a warning will be output, however there are situations where a refMap overlap may be desired (for example if different sourceSets are going into different jars) and thus the warning can be ignored. Setting this value to true will suppress the warning.
Disables the target export in the mixin annotation processor, only useful if multiple compile tasks need to be separated from the point of view of the mixin AP.
Disables the target validator in the mixin annotation processor.
Mapping types list to pass to the AP. Mapping services may parse the supplied options to determine whether they should activate.
Collection of message properties
Sets the overwrite checker error level, the default is to raise WARNING however this can be set to ERROR in order to cause missing decorations to be treated as errors
Instruction for the annotation processor to suppress informational messages such as the AP version, etc.
By default we will attempt to find the SRG file to feed to the AP by querying the genSrgs task, however the user can override the file by setting this argument
Instruction for the annotation processor to decorate all messages with the message type. This can be used to determine the type for messages you wish to specify custom levels for.
ctor
project - reference to the containing projectAdd a sourceSet for mixin processing by name, the sourceSet must exist and define the refMap property.
set - SourceSet nameAdd a sourceSet for mixin processing, the sourceSet must define the refMap property.
set - SourceSet to addAdd a sourceSet by name for mixin processing and specify the refMap name, the SourceSet must exist
set - SourceSet namerefMapName - RefMap nameAdd a sourceSet for mixin processing and specify the refMap name, the SourceSet must exist
set - SourceSet to addrefMapName - RefMap nameRegister a mixin config which will be added to all reobf'd jar manifests and all run configurations
Configure a sourceSet for mixin processing and specify the refMap name, the SourceSet must exist
set - SourceSet to addDirective version of disableAnnotationProcessorCheck
Directive version of disableEclipseAddon
Directive version of disableOverwriteChecker
Directive version of disableRefMapWarning
Directive version of disableTargetExport
Directive version of disableTargetValidator
Adds an additional TSRG file for the AP to consume.
file - Object which resolves to a fileAccessor for system properties starting with mixin.checks
Accessor for system properties starting with mixin.debug
Accessor for system property mixin.dumpTargetOnFailure
Accessor for system properties starting with mixin.env
Accessor for system property mixin.hotSwap
Accessor for system property mixin.ignoreConstraints
Accessor for system property mixin.initialiserInjectionMode
Getter for reobfSrgFile, fetch from the genSrgs task if not configured
Return current tokens as an unmodifyable map
We need to disable the flag early, because our main after evaluate happens before the one we are adding now.
Directive version of overwriteErrorLevel
Directive version of quiet
Accessor for system property mixin.checks
Accessor for system property mixin.debug
Accessor for system property mixin.dumpTargetOnFailure
Accessor for system property mixin.env
Accessor for system property mixin.hotSwap
Accessor for system property mixin.ignoreConstraints
Accessor for system property mixin.initialiserInjectionMode
Directive version of showMessageTypes
Adds a boolean token with the value true
name - boolean token nameAdds a token with the specified value
name - Token namevalue - Token valueAdd multiple tokens in one go by providing a map
map - map of tokens to addGroovy Documentation