Java builds
Six lessons build Java with Gradle: the lifecycle tasks the java plugin adds, the source sets behind them, a program that runs with gradle run, the jar and its manifest, the JDK a toolchain picks, and the compiler options that turn warnings on.
4.1
The java plugin and its lifecycle
compileJava, test, jar, build and clean, and what each one depends on
Open
4.2
Source sets and the layout
src/main/java, src/test/java, the resources and the tasks of each source set
Open
4.3
The application plugin and gradle run
mainClass, gradle run and the distribution archives
Open
4.4
The jar and its manifest
the jar a build writes, jar tf, the manifest and java -jar
Open
4.5
Toolchains and sourceCompatibility
the JDK a build compiles with, and the release it targets
Open
4.6
Compiler options
options.release, options.compilerArgs and the warnings -Xlint:all prints
Open