org.gradle.api.plugins

## Class LegacyJavaComponentPlugin

- java.lang.Object
- - org.gradle.api.plugins.LegacyJavaComponentPlugin

- All Implemented Interfaces:
    Plugin<Project>

      @Incubating
      public class LegacyJavaComponentPlugin
      extends Object
      implements Plugin<Project>

  Plugin for compiling Java code. Applies the `LanguageBasePlugin`. Base plugin for Java language support. Applies the `LanguageBasePlugin`. Registers the `ClassDirectoryBinarySpec` element type for the `BinaryContainer`. Adds a lifecycle task named `classes` for each `ClassDirectoryBinarySpec`. Adds a `JavaCompile` task for each `JavaSourceSet` added to a `ClassDirectoryBinarySpec`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LegacyJavaComponentPlugin(org.gradle.internal.reflect.Instantiator instantiator, JavaToolChain toolChain)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `apply(Project target)` Apply this plugin to the given target object.
    `void` | `configureCompileTask(AbstractCompile compile, JavaSourceSet sourceSet, ClassDirectoryBinarySpec binary)` Preconfigures the specified compile task based on the specified source set and class directory binary.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LegacyJavaComponentPlugin

          @Inject
          public LegacyJavaComponentPlugin(org.gradle.internal.reflect.Instantiator instantiator,
                                          JavaToolChain toolChain)

  - ### Method Detail

    - #### apply

          public void apply(Project target)

      Description copied from interface: `Plugin`
      Apply this plugin to the given target object.
      Specified by:
        `apply` in interface `Plugin<Project>`
      Parameters:
        `target` - The target object

    - #### configureCompileTask

          public void configureCompileTask(AbstractCompile compile,
                                  JavaSourceSet sourceSet,
                                  ClassDirectoryBinarySpec binary)

      Preconfigures the specified compile task based on the specified source set and class directory binary.
      Parameters:
        `compile` - the compile task to be preconfigured
        `sourceSet` - the source set for the compile task
        `binary` - the binary for the compile task