api / org.gradle.api.plugins / JavaPlugin

JavaPlugin

open class JavaPlugin : Plugin<ProjectInternal>

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

Constructors

<init>

JavaPlugin(objectFactory: ObjectFactory)

Properties

ANNOTATION_PROCESSOR_CONFIGURATION_NAME

static val ANNOTATION_PROCESSOR_CONFIGURATION_NAME: String

The name of the annotation processor configuration.

API_CONFIGURATION_NAME

static val API_CONFIGURATION_NAME: String

The name of the API configuration, where dependencies exported by a component at compile time should be declared.

API_ELEMENTS_CONFIGURATION_NAME

static val API_ELEMENTS_CONFIGURATION_NAME: String

The name of the configuration used by consumers to get the API elements of a component, that is to say the dependencies which are required to compile against that component.

CLASSES_TASK_NAME

static val CLASSES_TASK_NAME: String

The name of the lifecycle task which outcome is that all the classes of a component are generated.

COMPILE_CLASSPATH_CONFIGURATION_NAME

static val COMPILE_CLASSPATH_CONFIGURATION_NAME: String

The name of the compile classpath configuration.

COMPILE_CONFIGURATION_NAME

static val COMPILE_CONFIGURATION_NAME: String

The name of the configuration that is used to declare API or implementation dependencies. This configuration is deprecated.

COMPILE_JAVA_TASK_NAME

static val COMPILE_JAVA_TASK_NAME: String

The name of the task which compiles Java sources.

COMPILE_ONLY_CONFIGURATION_NAME

static val COMPILE_ONLY_CONFIGURATION_NAME: String

The name of the configuration that is used to declare dependencies which are only required to compile a component, but not at runtime.

COMPILE_TEST_JAVA_TASK_NAME

static val COMPILE_TEST_JAVA_TASK_NAME: String

The name of the task which compiles the test Java sources.

IMPLEMENTATION_CONFIGURATION_NAME

static val IMPLEMENTATION_CONFIGURATION_NAME: String

The name of the implementation configuration, where dependencies that are only used internally by a component should be declared.

JAR_TASK_NAME

static val JAR_TASK_NAME: String

The name of the task which generates the component main jar.

JAVADOC_TASK_NAME

static val JAVADOC_TASK_NAME: String

The name of the task which generates the component javadoc.

PROCESS_RESOURCES_TASK_NAME

static val PROCESS_RESOURCES_TASK_NAME: String

The name of the task that processes resources.

PROCESS_TEST_RESOURCES_TASK_NAME

static val PROCESS_TEST_RESOURCES_TASK_NAME: String

The name of the task which processes the test resources.

RUNTIME_CLASSPATH_CONFIGURATION_NAME

static val RUNTIME_CLASSPATH_CONFIGURATION_NAME: String

The name of the runtime classpath configuration, used by a component to query its own runtime classpath.

RUNTIME_CONFIGURATION_NAME

static val RUNTIME_CONFIGURATION_NAME: String

The name of the "runtime" configuration. This configuration is deprecated and doesn't represent a correct view of the runtime dependencies of a component.

RUNTIME_ELEMENTS_CONFIGURATION_NAME

static val RUNTIME_ELEMENTS_CONFIGURATION_NAME: String

The name of the runtime elements configuration, that should be used by consumers to query the runtime dependencies of a component.

RUNTIME_ONLY_CONFIGURATION_NAME

static val RUNTIME_ONLY_CONFIGURATION_NAME: String

The name of the runtime only dependencies configuration, used to declare dependencies that should only be found at runtime.

TEST_ANNOTATION_PROCESSOR_CONFIGURATION_NAME

static val TEST_ANNOTATION_PROCESSOR_CONFIGURATION_NAME: String

The name of the test annotation processor configuration.

TEST_CLASSES_TASK_NAME

static val TEST_CLASSES_TASK_NAME: String

The name of the lifecycle task which outcome is that all test classes of a component are generated.

TEST_COMPILE_CLASSPATH_CONFIGURATION_NAME

static val TEST_COMPILE_CLASSPATH_CONFIGURATION_NAME: String

The name of the test compile classpath configuration.

TEST_COMPILE_CONFIGURATION_NAME

static val TEST_COMPILE_CONFIGURATION_NAME: String

TEST_COMPILE_ONLY_CONFIGURATION_NAME

static val TEST_COMPILE_ONLY_CONFIGURATION_NAME: String

The name of the configuration that should be used to declare dependencies which are only required to compile the tests, but not when running them.

TEST_IMPLEMENTATION_CONFIGURATION_NAME

static val TEST_IMPLEMENTATION_CONFIGURATION_NAME: String

The name of the test implementation dependencies configuration.

TEST_RUNTIME_CLASSPATH_CONFIGURATION_NAME

static val TEST_RUNTIME_CLASSPATH_CONFIGURATION_NAME: String

The name of the test runtime classpath configuration.

TEST_RUNTIME_CONFIGURATION_NAME

static val TEST_RUNTIME_CONFIGURATION_NAME: String

The name of the configuration that represents the component runtime classpath. This configuration doesn't represent the exact runtime dependencies and therefore is deprecated.

TEST_RUNTIME_ONLY_CONFIGURATION_NAME

static val TEST_RUNTIME_ONLY_CONFIGURATION_NAME: String

The name of the test runtime only dependencies configuration.

TEST_TASK_NAME

static val TEST_TASK_NAME: String

The name of the task which triggers execution of tests.

Functions

apply

open fun apply(project: ProjectInternal): Unit