Kotlin DSL equivalent for Groovy DSL compileJava.options.compilerArgs

For the Java plugin, what is the Kotlin DSL equivalent for the following Groovy DSL?

compileJava {
    options.compilerArgs += ['-Xdoclint:all,-missing', '-Xlint:all']
}

I received a solution to this from Stack Overflow:

tasks.withType<JavaCompile> {
	val compilerArgs = options.compilerArgs
	compilerArgs.add("-Xdoclint:all,-missing")
	compilerArgs.add("-Xlint:all")
}