Most of the tasks included in Java plug-ins cannot be executed by themselves and have dependencies. Therefore, there is a task that should be executed first.
Targets the main source set. Compile the Java source and copy the resources to the build file.
Run the compileJava and processResources tasks.
Generate a Javadoc based on the product that is the result of executing the classes task.
test Targets the source set. Compile the Java source and copy the resources to the build file.
Run the compileTestJava task and the processTestResources task.
Run the testClasses, compileTestJava, processTestResources tasks, Generate a report of test execution results in XML format.
Determine whether the build is possible based on the XML file generated by the test task.
classes Files, resources, libraries, etc. that are the products of tasks To a JAR file.
Upload archives such as JAR files to repositories.
In the default setting, the execution content is the same as the jar task.
Run the check and assemble tasks.
JavaCompile type task. Compile Java source with the javac command. Under the directory specified by the java.srcDirs property Compile a file with a .java extension.
Copy type task. Copy the resource to the class output destination. Files under the directory specified by the resources.srcDirs property with a non-.java extension Copy to the output destination of the source set (setting value of output property).
Jar type task. Generate a JAR file. output property of main source set (= output of compileJava task and processResources task) Generate a JAR file for archiving.
Javadoc type task. Generate Javadoc.
This article is written with reference to the following books.