api / org.gradle.api.tasks.compile / CompileOptions / getCompilerArgs

getCompilerArgs

@Input open fun getCompilerArgs(): MutableList<String>

Returns any additional arguments to be passed to the compiler. Defaults to the empty list. Compiler arguments not supported by the DSL can be added here. For example, it is possible to pass the --release option of JDK 9:

compilerArgs.addAll(['--release', '7'])
Note that if --release is added then -target and -source are ignored.