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 Type
    Method
    Description
    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.
    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>
    The arguments to pass into AccessTransformers.
    org.gradle.api.file.DirectoryProperty
    The caches directory to use.
    org.gradle.api.file.ConfigurableFileCollection
    The dependency configuration to resolve where AccessTransformers will be found in.
    org.gradle.api.file.RegularFileProperty
    The 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's META-INF directory.

      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

      @Input @Optional org.gradle.api.provider.Property<String> 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

      @Input org.gradle.api.provider.Property<String> getJavaLauncher()

      The executable path of the Java launcher to use to run AccessTransformers.

      This can be acquired by mapping (a provider of) a JavaLauncher to JavaLauncher.getExecutablePath() -> RegularFile.getAsFile() -> File.getAbsolutePath().

      Returns:
      A property for the path of the Java launcher
    • getArgs

      @Input org.gradle.api.provider.ListProperty<String> getArgs()

      The arguments to pass into AccessTransformers.

      These arguments accept tokens that will be replaced when the transform action is run.

      • inJar - The input jar
      • atFile - The AccessTransformers configuration file
      • outJar - The output jar
      • logFile - 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
      Returns:
      A configuring action to use in DependencyHandler.registerTransform(Class, Action)
      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 AccessTransformers
      action - An action to run after the defaults are set
      Returns:
      A configuring action to use in DependencyHandler.registerTransform(Class, Action)
      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.