Package 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
Modifier and TypeFieldDescriptionstatic final String
The name of the API configuration, where dependencies exported by a component at compile time should be declared.static final 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.static final String
The name of the lifecycle task which outcome is that all the classes of a component are generated.static final String
The name of the compile classpath configuration.static final String
Deprecated.static final String
The name of the task which compiles Java sources.static final String
The name of the configuration that is used to declare dependencies which are only required to compile a component, but not at runtime.static final String
The name of the task which compiles the test Java sources.static final String
The name of the implementation configuration, where dependencies that are only used internally by a component should be declared.static final String
The name of the task which generates the component main jar.static final String
The name of the task which generates the component javadoc.static final String
The name of the task that processes resources.static final String
The name of the task which processes the test resources.static final String
The name of the runtime classpath configuration, used by a component to query its own runtime classpath.static final String
Deprecated.Consumers should useRUNTIME_ELEMENTS_CONFIGURATION_NAME
instead.static final String
The name of the runtime elements configuration, that should be used by consumers to query the runtime dependencies of a component.static final String
The name of the runtime only dependencies configuration, used to declare dependencies that should only be found at runtime.static final String
The name of the lifecycle task which outcome is that all test classes of a component are generated.static final String
The name of the test compile classpath configuration.static final String
static final 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.static final String
The name of the test implementation dependencies configuration.static final String
The name of the test runtime classpath configuration.static final String
Deprecated.UseTEST_RUNTIME_CLASSPATH_CONFIGURATION_NAME
instead.static final String
The name of the test runtime only dependencies configuration.static final String
The name of the task which triggers execution of tests. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(org.gradle.api.internal.project.ProjectInternal project) Apply this plugin to the given target object.
-
Field Details
-
PROCESS_RESOURCES_TASK_NAME
The name of the task that processes resources.- See Also:
-
CLASSES_TASK_NAME
The name of the lifecycle task which outcome is that all the classes of a component are generated.- See Also:
-
COMPILE_JAVA_TASK_NAME
The name of the task which compiles Java sources.- See Also:
-
PROCESS_TEST_RESOURCES_TASK_NAME
The name of the task which processes the test resources.- See Also:
-
TEST_CLASSES_TASK_NAME
The name of the lifecycle task which outcome is that all test classes of a component are generated.- See Also:
-
COMPILE_TEST_JAVA_TASK_NAME
The name of the task which compiles the test Java sources.- See Also:
-
TEST_TASK_NAME
The name of the task which triggers execution of tests.- See Also:
-
JAR_TASK_NAME
The name of the task which generates the component main jar.- See Also:
-
JAVADOC_TASK_NAME
The name of the task which generates the component javadoc.- See Also:
-
API_CONFIGURATION_NAME
The name of the API configuration, where dependencies exported by a component at compile time should be declared.- Since:
- 3.4
- See Also:
-
IMPLEMENTATION_CONFIGURATION_NAME
The name of the implementation configuration, where dependencies that are only used internally by a component should be declared.- Since:
- 3.4
- See Also:
-
API_ELEMENTS_CONFIGURATION_NAME
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.- Since:
- 3.4
- See Also:
-
COMPILE_CONFIGURATION_NAME
Deprecated.Users should preferAPI_CONFIGURATION_NAME
orIMPLEMENTATION_CONFIGURATION_NAME
.The name of the configuration that is used to declare API or implementation dependencies. This configuration is deprecated.- See Also:
-
COMPILE_ONLY_CONFIGURATION_NAME
The name of the configuration that is used to declare dependencies which are only required to compile a component, but not at runtime.- See Also:
-
RUNTIME_CONFIGURATION_NAME
Deprecated.Consumers should useRUNTIME_ELEMENTS_CONFIGURATION_NAME
instead.The name of the "runtime" configuration. This configuration is deprecated and doesn't represent a correct view of the runtime dependencies of a component.- See Also:
-
RUNTIME_ONLY_CONFIGURATION_NAME
The name of the runtime only dependencies configuration, used to declare dependencies that should only be found at runtime.- Since:
- 3.4
- See Also:
-
RUNTIME_CLASSPATH_CONFIGURATION_NAME
The name of the runtime classpath configuration, used by a component to query its own runtime classpath.- Since:
- 3.4
- See Also:
-
RUNTIME_ELEMENTS_CONFIGURATION_NAME
The name of the runtime elements configuration, that should be used by consumers to query the runtime dependencies of a component.- Since:
- 3.4
- See Also:
-
COMPILE_CLASSPATH_CONFIGURATION_NAME
The name of the compile classpath configuration.- Since:
- 3.4
- See Also:
-
TEST_COMPILE_CONFIGURATION_NAME
- See Also:
-
TEST_IMPLEMENTATION_CONFIGURATION_NAME
The name of the test implementation dependencies configuration.- Since:
- 3.4
- See Also:
-
TEST_COMPILE_ONLY_CONFIGURATION_NAME
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.- See Also:
-
TEST_RUNTIME_CONFIGURATION_NAME
Deprecated.UseTEST_RUNTIME_CLASSPATH_CONFIGURATION_NAME
instead.The name of the configuration that represents the component runtime classpath. This configuration doesn't represent the exact runtime dependencies and therefore is deprecated.- See Also:
-
TEST_RUNTIME_ONLY_CONFIGURATION_NAME
The name of the test runtime only dependencies configuration.- Since:
- 3.4
- See Also:
-
TEST_COMPILE_CLASSPATH_CONFIGURATION_NAME
The name of the test compile classpath configuration.- Since:
- 3.4
- See Also:
-
TEST_RUNTIME_CLASSPATH_CONFIGURATION_NAME
The name of the test runtime classpath configuration.- Since:
- 3.4
- See Also:
-
-
Constructor Details
-
JavaPlugin
-
-
Method Details
API_CONFIGURATION_NAME
orIMPLEMENTATION_CONFIGURATION_NAME
.