Interface ArtifactAccessTransformer.Parameters
- All Superinterfaces:
org.gradle.api.artifacts.transform.TransformParameters
- Enclosing class:
ArtifactAccessTransformer
public static interface ArtifactAccessTransformer.Parameters
extends org.gradle.api.artifacts.transform.TransformParameters
The parameters for the transform action.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.artifacts.transform.TransformParameters
org.gradle.api.artifacts.transform.TransformParameters.None -
Method Summary
Modifier and TypeMethodDescriptionstatic org.gradle.api.Action<? super ArtifactAccessTransformer.Parameters> defaults(org.gradle.api.Project project) Returns an action that sets the default values for the parameters of the artifact access transformer.static org.gradle.api.Action<? super ArtifactAccessTransformer.Parameters> defaults(org.gradle.api.Project project, org.gradle.api.Action<? super ArtifactAccessTransformer.Parameters> action) Returns an action that sets the default values for the parameters of the artifact access transformer.org.gradle.api.provider.ListProperty<String> getArgs()The arguments to pass into AccessTransformers.org.gradle.api.file.DirectoryPropertyThe caches directory to use.org.gradle.api.file.ConfigurableFileCollectionThe dependency configuration to resolve where AccessTransformers will be found in.org.gradle.api.file.RegularFilePropertyThe AccessTransformer configuration to use.org.gradle.api.provider.Property<String> The executable path of the Java launcher to use to run AccessTransformers.org.gradle.api.provider.Property<org.gradle.api.logging.LogLevel> The log level to pipe the output of AccessTransformers to.org.gradle.api.provider.Property<String> The main class for AccessTransformers.
-
Method Details
-
getConfig
@InputFile org.gradle.api.file.RegularFileProperty getConfig()The AccessTransformer configuration to use.
This is usually named
accesstransformer.cfg. In Forge, it is required in production that this file exists in the mod jar'sMETA-INFdirectory.- Returns:
- A property for the AccessTransformer configuration
-
getLogLevel
@Console org.gradle.api.provider.Property<org.gradle.api.logging.LogLevel> getLogLevel()The log level to pipe the output of AccessTransformers to.- Returns:
- The log level
-
getClasspath
@InputFiles @Classpath org.gradle.api.file.ConfigurableFileCollection getClasspath()The dependency configuration to resolve where AccessTransformers will be found in.- Returns:
- A property for the AccessTransformers dependency
-
getMainClass
The main class for AccessTransformers.- Returns:
- A property for the main class to use
- API Note:
- This is only required if you are providing a custom AccessTransformers which is not a single jar.
-
getJavaLauncher
The executable path of the Java launcher to use to run AccessTransformers.
This can be acquired by mapping (a provider of) a
JavaLaunchertoJavaLauncher.getExecutablePath()->RegularFile.getAsFile()->File.getAbsolutePath().- Returns:
- A property for the path of the Java launcher
-
getArgs
The arguments to pass into AccessTransformers.
These arguments accept tokens that will be replaced when the transform action is run.
inJar- The input jaratFile- The AccessTransformers configuration fileoutJar- The output jarlogFile- The log file
- Returns:
- A property for the arguments
-
getCachesDir
@InputDirectory org.gradle.api.file.DirectoryProperty getCachesDir()The caches directory to use.
This will include non-transform output files, such as in-house caching for the transformation process.
- Returns:
- A property for the caches directory
-
defaults
static org.gradle.api.Action<? super ArtifactAccessTransformer.Parameters> defaults(org.gradle.api.Project project) Returns an action that sets the default values for the parameters of the artifact access transformer.- Parameters:
project- The project using AccessTransformers- API Note:
- Using this in
DependencyHandler.registerTransform(Class, Action)after the project has evaluated will not populate some crucial defaults, as the project is inaccessible after configuration. If you use this, make sure you do before the project has finished evaluation so that the property values can be finalized into the cache.
-
defaults
static org.gradle.api.Action<? super ArtifactAccessTransformer.Parameters> defaults(org.gradle.api.Project project, org.gradle.api.Action<? super ArtifactAccessTransformer.Parameters> action) Returns an action that sets the default values for the parameters of the artifact access transformer.- Parameters:
project- The project using AccessTransformersaction- An action to run after the defaults are set- API Note:
- Using this in
DependencyHandler.registerTransform(Class, Action)after the project has evaluated will not populate some crucial defaults, as the project is inaccessible after configuration. If you use this, make sure you do before the project has finished evaluation so that the property values can be finalized into the cache.
-