saker.java.compiler Documentation TaskDoc JavaDoc Packages

Compiler parameters

You can pass parameters which are directly interpreted by javac:

saker.java.compile(
	SourceDirectories: src,
	Parameters: [ --release, 8 ],
)

The above --release 8 arguments will be passed to javac in order to execute the compilation for JDK 8. This can be useful when cross-compiling.

For other parameters that may be passed to javac, see the javac tool documentation of the associated JDK:

Some specified parameters may be specially handled by the compiler task. E.g. the parameter --enable-preview is only available from JDK 11. If it is specified for compilations running on earlier versions, it will be silently removed.