Package org.gradle.api.plugins

## Class JavaPluginConvention

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

-     @Deprecated
      public abstract class JavaPluginConvention
      extends java.lang.Object

  Deprecated.
  Replaced by `JavaPluginExtension`. This class is scheduled for removal in Gradle 9.0.
  Is mixed into the project when applying the `JavaBasePlugin` or the `JavaPlugin`.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `JavaPluginConvention()` | Deprecated.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `abstract void` | `disableAutoTargetJvm()` | Deprecated. If this method is called, Gradle will not automatically try to fetch dependencies which have a JVM version compatible with this module.
    `abstract boolean` | `getAutoTargetJvmDisabled()` | Deprecated. Tells if automatic JVM targeting is enabled.
    `abstract java.io.File` | `getDocsDir()` | Deprecated. Returns a file pointing to the root directory supposed to be used for all docs.
    `abstract java.lang.String` | `getDocsDirName()` | Deprecated. The name of the docs directory.
    `abstract org.gradle.api.internal.project.ProjectInternal` | `getProject()` | Deprecated.
    `abstract JavaVersion` | `getSourceCompatibility()` | Deprecated. Returns the source compatibility used for compiling Java sources.
    `abstract SourceSetContainer` | `getSourceSets()` | Deprecated. The source sets container.
    `abstract JavaVersion` | `getTargetCompatibility()` | Deprecated. Returns the target compatibility used for compiling Java sources.
    `abstract java.io.File` | `getTestReportDir()` | Deprecated. Returns a file pointing to the root directory to be used for reports.
    `abstract java.lang.String` | `getTestReportDirName()` | Deprecated. The name of the test reports directory.
    `abstract java.io.File` | `getTestResultsDir()` | Deprecated. Returns a file pointing to the root directory of the test results.
    `abstract java.lang.String` | `getTestResultsDirName()` | Deprecated. The name of the test results directory.
    `abstract Manifest` | `manifest()` | Deprecated. Creates a new instance of a `Manifest`.
    `abstract Manifest` | `manifest​(Closure closure)` | Deprecated. Creates and configures a new instance of a `Manifest`.
    `abstract Manifest` | `manifest​(Action<? super Manifest> action)` | Deprecated. Creates and configures a new instance of a `Manifest`.
    `abstract void` | `setDocsDirName​(java.lang.String docsDirName)` | Deprecated.
    `abstract void` | `setSourceCompatibility​(java.lang.Object value)` | Deprecated. Sets the source compatibility used for compiling Java sources.
    `abstract void` | `setSourceCompatibility​(JavaVersion value)` | Deprecated. Sets the source compatibility used for compiling Java sources.
    `abstract void` | `setTargetCompatibility​(java.lang.Object value)` | Deprecated. Sets the target compatibility used for compiling Java sources.
    `abstract void` | `setTargetCompatibility​(JavaVersion value)` | Deprecated. Sets the target compatibility used for compiling Java sources.
    `abstract void` | `setTestReportDirName​(java.lang.String testReportDirName)` | Deprecated.
    `abstract void` | `setTestResultsDirName​(java.lang.String testResultsDirName)` | Deprecated.
    `abstract java.lang.Object` | `sourceSets​(Closure closure)` | Deprecated. Configures the source sets of this project.

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

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

- - ### Constructor Detail

    - #### JavaPluginConvention

          public JavaPluginConvention()

      Deprecated.

  - ### Method Detail

    - #### sourceSets

          public abstract java.lang.Object sourceSets​(Closure closure)

      Deprecated.
      Configures the source sets of this project.

      The given closure is executed to configure the `SourceSetContainer`. The `SourceSetContainer` is passed to the closure as its delegate.

      See the example below how `SourceSet` 'main' is accessed and how the `SourceDirectorySet` 'java' is configured to exclude some package from compilation.

           plugins {
               id 'java'
           }

           sourceSets {
             main {
               java {
                 exclude 'some/unwanted/package/**'
               }
             }
           }

      Parameters:
        `closure` - The closure to execute.
      Returns:
        NamedDomainObjectContainer<org.gradle.api.tasks.SourceSet>

    - #### getDocsDir

          public abstract java.io.File getDocsDir()

      Deprecated.
      Returns a file pointing to the root directory supposed to be used for all docs.

    - #### getTestResultsDir

          public abstract java.io.File getTestResultsDir()

      Deprecated.
      Returns a file pointing to the root directory of the test results.

    - #### getTestReportDir

          public abstract java.io.File getTestReportDir()

      Deprecated.
      Returns a file pointing to the root directory to be used for reports.

    - #### getSourceCompatibility

          public abstract JavaVersion getSourceCompatibility()

      Deprecated.
      Returns the source compatibility used for compiling Java sources.

    - #### setSourceCompatibility

          public abstract void setSourceCompatibility​(java.lang.Object value)

      Deprecated.
      Sets the source compatibility used for compiling Java sources.
      Parameters:
        `value` - The value for the source compatibility as defined by `JavaVersion.toVersion(Object)`

    - #### setSourceCompatibility

          public abstract void setSourceCompatibility​(JavaVersion value)

      Deprecated.
      Sets the source compatibility used for compiling Java sources.
      Parameters:
        `value` - The value for the source compatibility

    - #### getTargetCompatibility

          public abstract JavaVersion getTargetCompatibility()

      Deprecated.
      Returns the target compatibility used for compiling Java sources.

    - #### setTargetCompatibility

          public abstract void setTargetCompatibility​(java.lang.Object value)

      Deprecated.
      Sets the target compatibility used for compiling Java sources.
      Parameters:
        `value` - The value for the target compatibility as defined by `JavaVersion.toVersion(Object)`

    - #### setTargetCompatibility

          public abstract void setTargetCompatibility​(JavaVersion value)

      Deprecated.
      Sets the target compatibility used for compiling Java sources.
      Parameters:
        `value` - The value for the target compatibility

    - #### manifest

          public abstract Manifest manifest()

      Deprecated.
      Creates a new instance of a `Manifest`.

    - #### manifest

          public abstract Manifest manifest​(@DelegatesTo(Manifest.class)
                                            Closure closure)

      Deprecated.
      Creates and configures a new instance of a `Manifest`. The given closure configures the new manifest instance before it is returned.
      Parameters:
        `closure` - The closure to use to configure the manifest.

    - #### manifest

          public abstract Manifest manifest​(Action<? super Manifest> action)

      Deprecated.
      Creates and configures a new instance of a `Manifest`.
      Parameters:
        `action` - The action to use to configure the manifest.
      Since:
        3.5

    - #### getDocsDirName

          public abstract java.lang.String getDocsDirName()

      Deprecated.
      The name of the docs directory. Can be a name or a path relative to the build dir.

    - #### setDocsDirName

          public abstract void setDocsDirName​(java.lang.String docsDirName)

      Deprecated.

    - #### getTestResultsDirName

          public abstract java.lang.String getTestResultsDirName()

      Deprecated.
      The name of the test results directory. Can be a name or a path relative to the build dir.

    - #### setTestResultsDirName

          public abstract void setTestResultsDirName​(java.lang.String testResultsDirName)

      Deprecated.

    - #### getTestReportDirName

          public abstract java.lang.String getTestReportDirName()

      Deprecated.
      The name of the test reports directory. Can be a name or a path relative to `ReportingExtension.getBaseDir()`.

    - #### setTestReportDirName

          public abstract void setTestReportDirName​(java.lang.String testReportDirName)

      Deprecated.

    - #### getSourceSets

          public abstract SourceSetContainer getSourceSets()

      Deprecated.
      The source sets container.

    - #### getProject

          public abstract org.gradle.api.internal.project.ProjectInternal getProject()

      Deprecated.

    - #### disableAutoTargetJvm

          public abstract void disableAutoTargetJvm()

      Deprecated.
      If this method is called, Gradle will not automatically try to fetch dependencies which have a JVM version compatible with this module. This should be used whenever the default behavior is not applicable, in particular when for some reason it's not possible to split a module and that this module only has some classes which require dependencies on higher versions.
      Since:
        5.3

    - #### getAutoTargetJvmDisabled

          public abstract boolean getAutoTargetJvmDisabled()

      Deprecated.
      Tells if automatic JVM targeting is enabled. When disabled, Gradle will not automatically try to get dependencies corresponding to the same (or compatible) level as the target compatibility of this module.
      Since:
        5.3