Package org.gradle.api.plugins

# Class JavaBasePlugin

java.lang.Object
org.gradle.api.plugins.JavaBasePlugin

All Implemented Interfaces:
  `Plugin<Project>`

public abstract class JavaBasePlugin extends Object implements Plugin<Project>

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

This plugin is automatically applied to most projects that build any JVM language source. It creates a `JavaPluginExtension` extension named `java` that is used to configure all jvm-related components in the project. It is responsible for configuring the conventions of any `SourceSet`s that are present and used by (for example) the Java, Groovy, or Kotlin plugins.

See Also:
  - Java plugin reference

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `BUILD_DEPENDENTS_TASK_NAME`
  `static final String`
  `BUILD_NEEDED_TASK_NAME`
  `static final String`
  `BUILD_TASK_NAME`
  `static final String`
  `CHECK_TASK_NAME`
  `static final String`
  `COMPILE_CLASSPATH_PACKAGING_SYSTEM_PROPERTY`
  Set this property to use JARs build from subprojects, instead of the classes folder from these project, on the compile classpath.
  `static final String`
  `DOCUMENTATION_GROUP`
  Task group name for documentation-related tasks.
  `static final Set<String>`
  `UNPUBLISHABLE_VARIANT_ARTIFACTS`
  A list of known artifact types which are known to prevent from publication.
  `static final String`
  `VERIFICATION_GROUP`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JavaBasePlugin(ObjectFactory objectFactory, org.gradle.api.plugins.jvm.internal.JvmPluginServices jvmPluginServices)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `apply(Project project)`
  Apply this plugin to the given target object.
  `protected abstract org.gradle.api.plugins.jvm.internal.JvmLanguageUtilities`
  `getJvmLanguageUtils()`

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

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

- ## Field Details

  - ### CHECK_TASK_NAME

    public static final String CHECK_TASK_NAME
    See Also:
      - Constant Field Values

  - ### VERIFICATION_GROUP

    public static final String VERIFICATION_GROUP
    See Also:
      - Constant Field Values

  - ### BUILD_TASK_NAME

    public static final String BUILD_TASK_NAME
    See Also:
      - Constant Field Values

  - ### BUILD_DEPENDENTS_TASK_NAME

    public static final String BUILD_DEPENDENTS_TASK_NAME
    See Also:
      - Constant Field Values

  - ### BUILD_NEEDED_TASK_NAME

    public static final String BUILD_NEEDED_TASK_NAME
    See Also:
      - Constant Field Values

  - ### DOCUMENTATION_GROUP

    public static final String DOCUMENTATION_GROUP
    Task group name for documentation-related tasks.
    See Also:
      - Constant Field Values

  - ### COMPILE_CLASSPATH_PACKAGING_SYSTEM_PROPERTY

    public static final String COMPILE_CLASSPATH_PACKAGING_SYSTEM_PROPERTY
    Set this property to use JARs build from subprojects, instead of the classes folder from these project, on the compile classpath. The main use case for this is to mitigate performance issues on very large multi-projects building on Windows. Setting this property will cause the 'jar' task of all subprojects in the dependency tree to always run during compilation.
    Since:
      5.6
    See Also:
      - Constant Field Values

  - ### UNPUBLISHABLE_VARIANT_ARTIFACTS

    public static final Set<String> UNPUBLISHABLE_VARIANT_ARTIFACTS
    A list of known artifact types which are known to prevent from publication.
    Since:
      5.3

- ## Constructor Details

  - ### JavaBasePlugin

    @Inject public JavaBasePlugin(ObjectFactory objectFactory, org.gradle.api.plugins.jvm.internal.JvmPluginServices jvmPluginServices)

- ## Method Details

  - ### getJvmLanguageUtils

    @Inject protected abstract org.gradle.api.plugins.jvm.internal.JvmLanguageUtilities getJvmLanguageUtils()

  - ### apply

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