Interface AccessTransformersContainer.Options

Enclosing interface:
AccessTransformersContainer

@NonExtendable public static interface AccessTransformersContainer.Options
When initially registering an AccessTransformers container, the consumer must define key information regarding how AccessTransformers will be used. This interface is used to define that information.
  • Method Details

    • setClasspath

      void setClasspath(FileCollection files)
      Sets the configuration to use as the classpath for AccessTransformers.
      Parameters:
      files - The file collection to use
    • setClasspath

      void setClasspath(@DelegatesTo(value=DependencyHandler.class,strategy=1) Closure<? extends Dependency> closure)
    • setClasspath

      default void setClasspath(Function<? super DependencyHandler,? extends Dependency> dependency)
      Sets the dependency to use as the classpath for AccessTransformers.
      Parameters:
      dependency - The dependency to use
    • setClasspath

      default void setClasspath(Object dependencyNotation, @DelegatesTo(Dependency.class) Closure closure)
      Sets the dependency to use as the classpath for AccessTransformers.
      Parameters:
      dependencyNotation - The dependency (notation) to use
      closure - A configuring closure for the dependency
    • setClasspath

      default void setClasspath(Object dependencyNotation, Action<? super Dependency> action)
      Sets the dependency to use as the classpath for AccessTransformers.
      Parameters:
      dependencyNotation - The dependency (notation) to use
      action - A configuring action for the dependency
    • setClasspath

      default void setClasspath(Object dependencyNotation)
      Sets the dependency to use as the classpath for AccessTransformers.
      Parameters:
      dependencyNotation - The dependency (notation) to use
    • setClasspath

      default void setClasspath(Provider<?> dependencyNotation, @DelegatesTo(Dependency.class) Closure closure)
      Sets the dependency to use as the classpath for AccessTransformers.
      Parameters:
      dependencyNotation - The dependency (notation) to use
      closure - A configuring closure for the dependency
    • setClasspath

      default void setClasspath(Provider<?> dependencyNotation, Action<? super Dependency> action)
      Sets the dependency to use as the classpath for AccessTransformers.
      Parameters:
      dependencyNotation - The dependency (notation) to use
      action - A configuring action for the dependency
    • setClasspath

      default void setClasspath(Provider<?> dependencyNotation)
      Sets the dependency to use as the classpath for AccessTransformers.
      Parameters:
      dependencyNotation - The dependency (notation) to use
    • setClasspath

      default void setClasspath(ProviderConvertible<?> dependencyNotation, @DelegatesTo(Dependency.class) Closure closure)
      Sets the dependency to use as the classpath for AccessTransformers.
      Parameters:
      dependencyNotation - The dependency (notation) to use
      closure - A configuring closure for the dependency
    • setClasspath

      default void setClasspath(ProviderConvertible<?> dependencyNotation, Action<? super Dependency> action)
      Sets the dependency to use as the classpath for AccessTransformers.
      Parameters:
      dependencyNotation - The dependency (notation) to use
      action - A configuring action for the dependency
    • setClasspath

      default void setClasspath(ProviderConvertible<?> dependencyNotation)
      Sets the dependency to use as the classpath for AccessTransformers.
      Parameters:
      dependencyNotation - The dependency (notation) to use
    • setMainClass

      void setMainClass(Provider<String> mainClass)
      Sets the main class to invoke when running AccessTransformers.
      Parameters:
      mainClass - The main class to use
      API Note:
      This is not required if the given classpath is a single executable jar.
    • setMainClass

      void setMainClass(String mainClass)
      Sets the main class to invoke when running AccessTransformers.
      Parameters:
      mainClass - The main class to use
      API Note:
      This is not required if the given classpath is a single executable jar.
    • setJavaLauncher

      void setJavaLauncher(Provider<? extends JavaLauncher> javaLauncher)

      Sets the Java launcher to use to run AccessTransformers.

      This can be easily acquired using Java toolchains.

      Parameters:
      javaLauncher - The Java launcher to use
      See Also:
    • setJavaLauncher

      void setJavaLauncher(JavaLauncher javaLauncher)

      Sets the Java launcher to use to run AccessTransformers.

      This can be easily acquired using Java toolchains.

      Parameters:
      javaLauncher - The Java launcher to use
      See Also:
      API Note:
      This method exists in case consumers have an eagerly processed JavaLauncher object. It is recommended to use setJavaLauncher(Provider) instead.
    • setArgs

      void setArgs(Provider<? extends Iterable<String>> args)

      Sets the 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
      Parameters:
      args - The arguments to use
    • setArgs

      void setArgs(Iterable<String> args)

      Sets the 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
      Parameters:
      args - The arguments to use
    • setArgs

      default void setArgs(String... args)

      Sets the 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
      Parameters:
      args - The arguments to use
    • setConfig

      void setConfig(Provider<?> configFile)

      Sets the AccessTransformer configuration to use.

      If the given provider does not provide a file or regular file, the result will be resolved using Project.file(Object), similarly to setConfig(Object).

      Parameters:
      configFile - The configuration file to use
    • setConfig

      void setConfig(RegularFile configFile)
      Sets the AccessTransformer configuration to use.
      Parameters:
      configFile - The configuration file to use
    • setConfig

      void setConfig(File configFile)
      Sets the AccessTransformer configuration to use.
      Parameters:
      configFile - The configuration file to use
    • setConfig

      void setConfig(Object configFile)

      Sets the AccessTransformer configuration to use.

      The given object is resolved using Project.file(Object).

      Parameters:
      configFile - The configuration file to use