JavaPlugin

abstract class JavaPlugin : Plugin<T> (source)

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

This plugin creates a built-in test suite named test that represents the Test task for Java projects.

See also

<a href="https://docs.gradle.org/current/userguide/java_plugin.html">Java plugin reference</a>
<a href="https://docs.gradle.org/current/userguide/jvm_test_suite_plugin.html">JVM test suite plugin reference</a>

Constructors

Link copied to clipboard
@Inject
constructor()

Properties

Link copied to clipboard
val ANNOTATION_PROCESSOR_CONFIGURATION_NAME: String = "annotationProcessor"
The name of the annotation processor configuration.
Link copied to clipboard
The name of the API configuration, where dependencies exported by a component at compile time should be declared.
Link copied to clipboard
The name of the configuration to define the API elements of a component.
Link copied to clipboard
val CLASSES_TASK_NAME: String = "classes"
The name of the lifecycle task which outcome is that all the classes of a component are generated.
Link copied to clipboard
The name of the compile classpath configuration.
Link copied to clipboard
val COMPILE_JAVA_TASK_NAME: String = "compileJava"
The name of the task which compiles Java sources.
Link copied to clipboard
The name of the configuration to define the API elements of a component that are required to compile a component, but not at runtime.
Link copied to clipboard
The name of the configuration that is used to declare dependencies which are only required to compile a component, but not at runtime.
Link copied to clipboard
val COMPILE_TEST_JAVA_TASK_NAME: String = "compileTestJava"
The name of the task which compiles the test Java sources.
Link copied to clipboard
The name of the implementation configuration, where dependencies that are only used internally by a component should be declared.
Link copied to clipboard
val JAR_TASK_NAME: String = "jar"
The name of the task which generates the component main jar.
Link copied to clipboard
The name of the javadoc elements configuration.
Link copied to clipboard
val JAVADOC_TASK_NAME: String = "javadoc"
The name of the task which generates the component javadoc.
Link copied to clipboard
val PROCESS_RESOURCES_TASK_NAME: String = "processResources"
The name of the task that processes resources.
Link copied to clipboard
val PROCESS_TEST_RESOURCES_TASK_NAME: String = "processTestResources"
The name of the task which processes the test resources.
Link copied to clipboard
The name of the runtime classpath configuration, used by a component to query its own runtime classpath.
Link copied to clipboard
The name of the runtime elements configuration, that should be used by consumers to query the runtime dependencies of a component.
Link copied to clipboard
The name of the runtime only dependencies configuration, used to declare dependencies that should only be found at runtime.
Link copied to clipboard
The name of the sources elements configuration.
val TEST_ANNOTATION_PROCESSOR_CONFIGURATION_NAME: String = "testAnnotationProcessor"
The name of the test annotation processor configuration.
Link copied to clipboard
val TEST_CLASSES_TASK_NAME: String = "testClasses"
The name of the lifecycle task which outcome is that all test classes of a component are generated.
The name of the test compile classpath configuration.
Link copied to clipboard
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.
Link copied to clipboard
The name of the test implementation dependencies configuration.
The name of the test runtime classpath configuration.
Link copied to clipboard
The name of the test runtime only dependencies configuration.
Link copied to clipboard
val TEST_TASK_NAME: String = "test"
The name of the task which triggers execution of tests.

Functions

Link copied to clipboard
open fun apply(project: Project)