Gradle Java Plugin
Jump to navigation
Jump to search
External
Internal
TODEPLETE
Overview
The Java plugin adds Java compilation, testing and packaging capabilities to a project. It also serves as the basis for many of the other JVM language Gradle plugins.
plugins {
id 'java'
}
However, Java Library plugin and not Java plugin should be used by default with Java projects.
Concepts
Source Set
Also see:
Tasks
assemble
build
buildDependents
buildNeeded
check
classes
clean
compileJava
The "compileJava" task is backed by the JavaCompile type.
compileTestJava
jar
Assembles the JAR file, based on the classes and resources attached to the main source set. Depends on classes. The task is backed by the Jar type. Configuration details in:
javadoc
processResources
processTestResources
test
testClasses
Java Plugin Predefined Task Types
JavaCompile
JavaCompile exposed as "compileJava" task