org.gradle.api.plugins

## Class JavaPlugin

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

- All Implemented Interfaces:
    Plugin<org.gradle.api.internal.project.ProjectInternal>

      public class JavaPlugin
      extends Object
      implements Plugin<org.gradle.api.internal.project.ProjectInternal>

  A `Plugin` which compiles and tests Java source, and assembles it into a JAR file.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `CLASSES_TASK_NAME`
    `static String` | `COMPILE_CLASSPATH_CONFIGURATION_NAME`
    `static String` | `COMPILE_CONFIGURATION_NAME`
    `static String` | `COMPILE_JAVA_TASK_NAME`
    `static String` | `COMPILE_ONLY_CONFIGURATION_NAME`
    `static String` | `COMPILE_TEST_JAVA_TASK_NAME`
    `static String` | `JAR_TASK_NAME`
    `static String` | `JAVADOC_TASK_NAME`
    `static String` | `PROCESS_RESOURCES_TASK_NAME`
    `static String` | `PROCESS_TEST_RESOURCES_TASK_NAME`
    `static String` | `RUNTIME_CONFIGURATION_NAME`
    `static String` | `TEST_CLASSES_TASK_NAME`
    `static String` | `TEST_COMPILE_CLASSPATH_CONFIGURATION_NAME`
    `static String` | `TEST_COMPILE_CONFIGURATION_NAME`
    `static String` | `TEST_COMPILE_ONLY_CONFIGURATION_NAME`
    `static String` | `TEST_RUNTIME_CONFIGURATION_NAME`
    `static String` | `TEST_TASK_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JavaPlugin()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `apply(org.gradle.api.internal.project.ProjectInternal project)` Apply this plugin to the given target object.

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

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

- - ### Field Detail

    - #### PROCESS_RESOURCES_TASK_NAME

          public static final String PROCESS_RESOURCES_TASK_NAME

      See Also:
        Constant Field Values

    - #### CLASSES_TASK_NAME

          public static final String CLASSES_TASK_NAME

      See Also:
        Constant Field Values

    - #### COMPILE_JAVA_TASK_NAME

          public static final String COMPILE_JAVA_TASK_NAME

      See Also:
        Constant Field Values

    - #### PROCESS_TEST_RESOURCES_TASK_NAME

          public static final String PROCESS_TEST_RESOURCES_TASK_NAME

      See Also:
        Constant Field Values

    - #### TEST_CLASSES_TASK_NAME

          public static final String TEST_CLASSES_TASK_NAME

      See Also:
        Constant Field Values

    - #### COMPILE_TEST_JAVA_TASK_NAME

          public static final String COMPILE_TEST_JAVA_TASK_NAME

      See Also:
        Constant Field Values

    - #### TEST_TASK_NAME

          public static final String TEST_TASK_NAME

      See Also:
        Constant Field Values

    - #### JAR_TASK_NAME

          public static final String JAR_TASK_NAME

      See Also:
        Constant Field Values

    - #### JAVADOC_TASK_NAME

          public static final String JAVADOC_TASK_NAME

      See Also:
        Constant Field Values

    - #### COMPILE_CONFIGURATION_NAME

          public static final String COMPILE_CONFIGURATION_NAME

      See Also:
        Constant Field Values

    - #### COMPILE_ONLY_CONFIGURATION_NAME

          public static final String COMPILE_ONLY_CONFIGURATION_NAME

      See Also:
        Constant Field Values

    - #### RUNTIME_CONFIGURATION_NAME

          public static final String RUNTIME_CONFIGURATION_NAME

      See Also:
        Constant Field Values

    - #### COMPILE_CLASSPATH_CONFIGURATION_NAME

          public static final String COMPILE_CLASSPATH_CONFIGURATION_NAME

      See Also:
        Constant Field Values

    - #### TEST_COMPILE_CONFIGURATION_NAME

          public static final String TEST_COMPILE_CONFIGURATION_NAME

      See Also:
        Constant Field Values

    - #### TEST_COMPILE_ONLY_CONFIGURATION_NAME

          public static final String TEST_COMPILE_ONLY_CONFIGURATION_NAME

      See Also:
        Constant Field Values

    - #### TEST_RUNTIME_CONFIGURATION_NAME

          public static final String TEST_RUNTIME_CONFIGURATION_NAME

      See Also:
        Constant Field Values

    - #### TEST_COMPILE_CLASSPATH_CONFIGURATION_NAME

          public static final String TEST_COMPILE_CLASSPATH_CONFIGURATION_NAME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### JavaPlugin

          public JavaPlugin()

  - ### Method Detail

    - #### apply

          public void apply(org.gradle.api.internal.project.ProjectInternal project)

      Description copied from interface: `Plugin`
      Apply this plugin to the given target object.
      Specified by:
        `apply` in interface `Plugin<org.gradle.api.internal.project.ProjectInternal>`
      Parameters:
        `project` - The target object