Interface AccessTransformersContainer.Options

All Superinterfaces:
AccessTransformersConfiguration
Enclosing interface:
AccessTransformersContainer

public static sealed interface AccessTransformersContainer.Options extends AccessTransformersConfiguration
When initially registering an AccessTransformers container, the consumer should define key information regarding how AccessTransformers will be used. This interface is used to define that information.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.gradle.api.provider.ListProperty<Object>
    Gets the list of arguments to use when running AccessTransformers.
    org.gradle.api.file.ConfigurableFileCollection
    Gets the classpath to use for AccessTransformers.
    org.gradle.api.provider.Property<org.gradle.jvm.toolchain.JavaLauncher>
    Gets the Java launcher used to run AccessTransformers.
    org.gradle.api.provider.Property<org.gradle.api.logging.LogLevel>
    Gets the log level to pipe the output of AccessTransformers to.
    org.gradle.api.provider.Property<String>
    Gets the main class to invoke when running AccessTransformers.

    Methods inherited from interface net.minecraftforge.accesstransformers.gradle.AccessTransformersConfiguration

    getConfig
  • Method Details

    • getLogLevel

      @Experimental org.gradle.api.provider.Property<org.gradle.api.logging.LogLevel> getLogLevel()
      Gets the log level to pipe the output of AccessTransformers to.
      Returns:
      The property log level to use
      API Note:
      This is experimental due to the fact that AccessTransformers treats both System.out and System.err equally, while preferring to use the latter. This will be addressed in a future version of AccessTransformers.
    • getClasspath

      org.gradle.api.file.ConfigurableFileCollection getClasspath()
      Gets the classpath to use for AccessTransformers. By default, this contains the default AccessTransformers shadow JAR.
      Returns:
      The classpath
      API Note:
      This is not the dependency's classpath. This is the classpath used in JavaExecSpec.setClasspath(FileCollection) to invoke AccessTransformers.
    • getMainClass

      org.gradle.api.provider.Property<String> getMainClass()
      Gets the main class to invoke when running AccessTransformers.
      Returns:
      The property for the main class.
      API Note:
      This is not required if the classpath is a single executable jar.
    • getJavaLauncher

      org.gradle.api.provider.Property<org.gradle.jvm.toolchain.JavaLauncher> getJavaLauncher()

      Gets the Java launcher used to run AccessTransformers.

      This can be easily acquired using Java toolchains.

      Returns:
      The property for the Java launcher
      See Also:
      • JavaToolchainService.launcherFor(Action)
    • getArgs

      org.gradle.api.provider.ListProperty<Object> getArgs()

      Gets the list of arguments to use when running AccessTransformers.

      When processed by the transform action, these arguments will have specific tokens in them replaced.

      • {inJar} - The input jar
      • {atFile} - The AccessTransformers configuration file
      • {outJar} - The output jar
      • {logFile} - The log file
      Returns:
      The property for the arguments.