name.remal.gradle_plugins.toolkit.build_logic.javadoc.gradle Maven / Gradle / Ivy
allprojects {
pluginManager.withPlugin('java') {
tasks.withType(Javadoc).configureEach { Javadoc task ->
task.exclude('**/internal', '**/internal/**/*')
task.options.addBooleanOption('Xdoclint:none', true)
task.onlyIf {
int languageVersion = task.javadocTool.getOrNull()?.metadata?.languageVersion?.asInt()
?: Integer.parseInt(JavaVersion.current().majorVersion)
if (languageVersion >= 9) {
task.options.addBooleanOption('html5', true)
}
return true
}
}
}
}