Interface MultiReleaseContainer

All Known Subinterfaces:
MultiReleaseExtension

public interface MultiReleaseContainer
A container that holds the dependencies and objects to be used for the built multi-release JAR and the publishing software component.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    add(@Range(from=9L,to=2147483647L) int version, org.gradle.api.artifacts.Dependency dependency)
    Adds a dependency to the multi-release JAR for the given version.
    default void
    add(@Range(from=9L,to=2147483647L) int version, org.gradle.api.artifacts.Dependency dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)
    Adds a dependency to the multi-release JAR for the given version.
    default void
    add(@Range(from=9L,to=2147483647L) int version, org.gradle.api.Project dependency)
    Adds a dependency to the multi-release JAR for the given version.
    default void
    add(@Range(from=9L,to=2147483647L) int version, org.gradle.api.Project dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)
    Adds a dependency to the multi-release JAR for the given version.
    default void
    add(@Range(from=9L,to=2147483647L) int version, org.gradle.api.provider.Provider<? extends org.gradle.api.artifacts.Dependency> dependency)
    Adds a dependency to the multi-release JAR for the given version.
    default void
    add(@Range(from=9L,to=2147483647L) int version, org.gradle.api.provider.Provider<? extends org.gradle.api.artifacts.Dependency> dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)
    Adds a dependency to the multi-release JAR for the given version.
    default void
    add(@Range(from=9L,to=2147483647L) int version, org.gradle.api.provider.ProviderConvertible<? extends org.gradle.api.artifacts.Dependency> dependency)
    Adds a dependency to the multi-release JAR for the given version.
    default void
    add(@Range(from=9L,to=2147483647L) int version, org.gradle.api.provider.ProviderConvertible<? extends org.gradle.api.artifacts.Dependency> dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)
    Adds a dependency to the multi-release JAR for the given version.
    default void
    add(org.gradle.api.JavaVersion version, org.gradle.api.artifacts.Dependency dependency)
    Adds a dependency to the multi-release JAR for the given version.
    default void
    add(org.gradle.api.JavaVersion version, org.gradle.api.artifacts.Dependency dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)
    Adds a dependency to the multi-release JAR for the given version.
    default void
    add(org.gradle.api.JavaVersion version, org.gradle.api.Project dependency)
    Adds a dependency to the multi-release JAR for the given version.
    default void
    add(org.gradle.api.JavaVersion version, org.gradle.api.Project dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)
    Adds a dependency to the multi-release JAR for the given version.
    default void
    add(org.gradle.api.JavaVersion version, org.gradle.api.provider.Provider<? extends org.gradle.api.artifacts.Dependency> dependency)
    Adds a dependency to the multi-release JAR for the given version.
    default void
    add(org.gradle.api.JavaVersion version, org.gradle.api.provider.Provider<? extends org.gradle.api.artifacts.Dependency> dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)
    Adds a dependency to the multi-release JAR for the given version.
    default void
    add(org.gradle.api.JavaVersion version, org.gradle.api.provider.ProviderConvertible<? extends org.gradle.api.artifacts.Dependency> dependency)
    Adds a dependency to the multi-release JAR for the given version.
    default void
    add(org.gradle.api.JavaVersion version, org.gradle.api.provider.ProviderConvertible<? extends org.gradle.api.artifacts.Dependency> dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)
    Adds a dependency to the multi-release JAR for the given version.
    default void
    add(org.gradle.jvm.toolchain.JavaLanguageVersion version, org.gradle.api.artifacts.Dependency dependency)
    Adds a dependency to the multi-release JAR for the given version.
    void
    add(org.gradle.jvm.toolchain.JavaLanguageVersion version, org.gradle.api.artifacts.Dependency dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)
    Adds a dependency to the multi-release JAR for the given version.
    default void
    add(org.gradle.jvm.toolchain.JavaLanguageVersion version, org.gradle.api.Project dependency)
    Adds a dependency to the multi-release JAR for the given version.
    void
    add(org.gradle.jvm.toolchain.JavaLanguageVersion version, org.gradle.api.Project dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)
    Adds a dependency to the multi-release JAR for the given version.
    default void
    add(org.gradle.jvm.toolchain.JavaLanguageVersion version, org.gradle.api.provider.Provider<? extends org.gradle.api.artifacts.Dependency> dependency)
    Adds a dependency to the multi-release JAR for the given version.
    void
    add(org.gradle.jvm.toolchain.JavaLanguageVersion version, org.gradle.api.provider.Provider<? extends org.gradle.api.artifacts.Dependency> dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)
    Adds a dependency to the multi-release JAR for the given version.
    default void
    add(org.gradle.jvm.toolchain.JavaLanguageVersion version, org.gradle.api.provider.ProviderConvertible<? extends org.gradle.api.artifacts.Dependency> dependency)
    Adds a dependency to the multi-release JAR for the given version.
    default void
    add(org.gradle.jvm.toolchain.JavaLanguageVersion version, org.gradle.api.provider.ProviderConvertible<? extends org.gradle.api.artifacts.Dependency> dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)
    Adds a dependency to the multi-release JAR for the given version.
    org.gradle.api.NamedDomainObjectProvider<org.gradle.api.artifacts.ConsumableConfiguration>
    Gets the consumable multi-release API elements used by getComponent().
    org.gradle.api.component.AdhocComponentWithVariants
    Gets the software component to be used to publish this container's output JAR.
    org.gradle.api.tasks.TaskProvider<org.gradle.api.tasks.bundling.Jar>
    Gets the multi-release JAR task to be used for the multi-release output.
    org.gradle.api.NamedDomainObjectProvider<org.gradle.api.artifacts.ConsumableConfiguration>
    Gets the consumable multi-release runtime elements used by getComponent().
  • Method Details

    • getJar

      org.gradle.api.tasks.TaskProvider<org.gradle.api.tasks.bundling.Jar> getJar()

      Gets the multi-release JAR task to be used for the multi-release output.

      This is not the same as the jar task passed in to register this container. However, it does parent off of its contents using AbstractCopyTask.with(CopySpec...).

      The naming convention for this task is: multiRelease${jar.capitalize()}

      Returns:
      A provider for the output multi-release JAR task
    • getApiElements

      org.gradle.api.NamedDomainObjectProvider<org.gradle.api.artifacts.ConsumableConfiguration> getApiElements()

      Gets the consumable multi-release API elements used by getComponent().

      This is not the same as the API elements configuration from the source set passed in to register this container. However, it does parent off of its attributes and dependencies using AttributeContainer.addAllLater(AttributeContainer) and Configuration.extendsFrom(Configuration...) respectively.

      The naming convention for this configuration is multiRelease${apiElements.capitalize()}, where apiElements is SourceSet.getApiElementsConfigurationName().

      Returns:
      A provider for the consumable multi-release API elements
    • getRuntimeElements

      org.gradle.api.NamedDomainObjectProvider<org.gradle.api.artifacts.ConsumableConfiguration> getRuntimeElements()

      Gets the consumable multi-release runtime elements used by getComponent().

      This is not the same as the runtime elements configuration from the source set passed in to register this container. However, it does parent off of its attributes and dependencies using AttributeContainer.addAllLater(AttributeContainer) and Configuration.extendsFrom(Configuration...) respectively.

      The naming convention for this configuration is: multiRelease${runtimeElements.capitalize()}, where runtimeElements is SourceSet.getRuntimeElementsConfigurationName().

      Returns:
      A provider for the consumable multi-release runtime elements
    • getComponent

      org.gradle.api.component.AdhocComponentWithVariants getComponent()

      Gets the software component to be used to publish this container's output JAR.

      While not a direct copy, the Multi-Release Java plugin attempts to parent off of the standard java software component as much as possible, using effective copies of API elements and runtime elements, as well as adding the input source set's sources elements and javadoc elements, if they exist.

      The naming convention for this component is multiRelease${sourceSet.name.capitalize()}Java. If the source set is the main source set, this will be multiReleaseJava.

      Returns:
      The software component containing the multi-release JAR
    • add

      default void add(@Range(from=9L,to=2147483647L) int version, org.gradle.api.Project dependency)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. To make changes to the detached configuration used to add the dependency, use add(int, Project, Action).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
    • add

      default void add(@Range(from=9L,to=2147483647L) int version, org.gradle.api.Project dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. The given action will be run on the detached configuration used to add the dependency. This can, for example, be used to force the configuration to resolve transitively using Configuration.setTransitive(boolean).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
      action - The action to run on the detached configuration to be used for the dependency
    • add

      default void add(@Range(from=9L,to=2147483647L) int version, org.gradle.api.artifacts.Dependency dependency)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. To make changes to the detached configuration used to add the dependency, use add(int, Dependency, Action).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
    • add

      default void add(@Range(from=9L,to=2147483647L) int version, org.gradle.api.artifacts.Dependency dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. The given action will be run on the detached configuration used to add the dependency. This can, for example, be used to force the configuration to resolve transitively using Configuration.setTransitive(boolean).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
      action - The action to run on the detached configuration to be used for the dependency
    • add

      default void add(@Range(from=9L,to=2147483647L) int version, org.gradle.api.provider.Provider<? extends org.gradle.api.artifacts.Dependency> dependency)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. To make changes to the detached configuration used to add the dependency, use add(int, Provider, Action).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
    • add

      default void add(@Range(from=9L,to=2147483647L) int version, org.gradle.api.provider.Provider<? extends org.gradle.api.artifacts.Dependency> dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. The given action will be run on the detached configuration used to add the dependency. This can, for example, be used to force the configuration to resolve transitively using Configuration.setTransitive(boolean).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
      action - The action to run on the detached configuration to be used for the dependency
    • add

      default void add(@Range(from=9L,to=2147483647L) int version, org.gradle.api.provider.ProviderConvertible<? extends org.gradle.api.artifacts.Dependency> dependency)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. To make changes to the detached configuration used to add the dependency, use add(int, ProviderConvertible, Action).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
    • add

      default void add(@Range(from=9L,to=2147483647L) int version, org.gradle.api.provider.ProviderConvertible<? extends org.gradle.api.artifacts.Dependency> dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. The given action will be run on the detached configuration used to add the dependency. This can, for example, be used to force the configuration to resolve transitively using Configuration.setTransitive(boolean).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
      action - The action to run on the detached configuration to be used for the dependency
    • add

      default void add(org.gradle.api.JavaVersion version, org.gradle.api.Project dependency)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. To make changes to the detached configuration used to add the dependency, use add(JavaVersion, Project, Action).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
    • add

      default void add(org.gradle.api.JavaVersion version, org.gradle.api.Project dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. The given action will be run on the detached configuration used to add the dependency. This can, for example, be used to force the configuration to resolve transitively using Configuration.setTransitive(boolean).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
      action - The action to run on the detached configuration to be used for the dependency
    • add

      default void add(org.gradle.api.JavaVersion version, org.gradle.api.artifacts.Dependency dependency)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. To make changes to the detached configuration used to add the dependency, use add(JavaVersion, Dependency, Action).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
    • add

      default void add(org.gradle.api.JavaVersion version, org.gradle.api.artifacts.Dependency dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. The given action will be run on the detached configuration used to add the dependency. This can, for example, be used to force the configuration to resolve transitively using Configuration.setTransitive(boolean).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
      action - The action to run on the detached configuration to be used for the dependency
    • add

      default void add(org.gradle.api.JavaVersion version, org.gradle.api.provider.Provider<? extends org.gradle.api.artifacts.Dependency> dependency)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. To make changes to the detached configuration used to add the dependency, use add(JavaVersion, Provider, Action).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
    • add

      default void add(org.gradle.api.JavaVersion version, org.gradle.api.provider.Provider<? extends org.gradle.api.artifacts.Dependency> dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. The given action will be run on the detached configuration used to add the dependency. This can, for example, be used to force the configuration to resolve transitively using Configuration.setTransitive(boolean).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
      action - The action to run on the detached configuration to be used for the dependency
    • add

      default void add(org.gradle.api.JavaVersion version, org.gradle.api.provider.ProviderConvertible<? extends org.gradle.api.artifacts.Dependency> dependency)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. To make changes to the detached configuration used to add the dependency, use add(JavaVersion, ProviderConvertible, Action).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
    • add

      default void add(org.gradle.api.JavaVersion version, org.gradle.api.provider.ProviderConvertible<? extends org.gradle.api.artifacts.Dependency> dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. The given action will be run on the detached configuration used to add the dependency. This can, for example, be used to force the configuration to resolve transitively using Configuration.setTransitive(boolean).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
      action - The action to run on the detached configuration to be used for the dependency
    • add

      default void add(org.gradle.jvm.toolchain.JavaLanguageVersion version, org.gradle.api.Project dependency)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. To make changes to the detached configuration used to add the dependency, use add(JavaLanguageVersion, Project, Action).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
    • add

      void add(org.gradle.jvm.toolchain.JavaLanguageVersion version, org.gradle.api.Project dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. The given action will be run on the detached configuration used to add the dependency. This can, for example, be used to force the configuration to resolve transitively using Configuration.setTransitive(boolean).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
      action - The action to run on the detached configuration to be used for the dependency
    • add

      default void add(org.gradle.jvm.toolchain.JavaLanguageVersion version, org.gradle.api.artifacts.Dependency dependency)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. To make changes to the detached configuration used to add the dependency, use add(JavaLanguageVersion, Dependency, Action).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
    • add

      void add(org.gradle.jvm.toolchain.JavaLanguageVersion version, org.gradle.api.artifacts.Dependency dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. The given action will be run on the detached configuration used to add the dependency. This can, for example, be used to force the configuration to resolve transitively using Configuration.setTransitive(boolean).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
      action - The action to run on the detached configuration to be used for the dependency
    • add

      default void add(org.gradle.jvm.toolchain.JavaLanguageVersion version, org.gradle.api.provider.Provider<? extends org.gradle.api.artifacts.Dependency> dependency)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. To make changes to the detached configuration used to add the dependency, use add(JavaLanguageVersion, Provider, Action).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
    • add

      void add(org.gradle.jvm.toolchain.JavaLanguageVersion version, org.gradle.api.provider.Provider<? extends org.gradle.api.artifacts.Dependency> dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. The given action will be run on the detached configuration used to add the dependency. This can, for example, be used to force the configuration to resolve transitively using Configuration.setTransitive(boolean).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
      action - The action to run on the detached configuration to be used for the dependency
    • add

      default void add(org.gradle.jvm.toolchain.JavaLanguageVersion version, org.gradle.api.provider.ProviderConvertible<? extends org.gradle.api.artifacts.Dependency> dependency)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. To make changes to the detached configuration used to add the dependency, use add(JavaLanguageVersion, ProviderConvertible, Action).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
    • add

      default void add(org.gradle.jvm.toolchain.JavaLanguageVersion version, org.gradle.api.provider.ProviderConvertible<? extends org.gradle.api.artifacts.Dependency> dependency, org.gradle.api.Action<? super org.gradle.api.artifacts.Configuration> action)

      Adds a dependency to the multi-release JAR for the given version.

      By default, the dependency will not be transitive. The given action will be run on the detached configuration used to add the dependency. This can, for example, be used to force the configuration to resolve transitively using Configuration.setTransitive(boolean).

      Parameters:
      version - The version to use (must be at least 9)
      dependency - The dependency to use
      action - The action to run on the detached configuration to be used for the dependency