You may be familiar with this shitty error probably using Gradle 6.7:
Caused by: java.lang.ClassCastException: class java.lang.String cannot be cast to class java.util.List (java.lang.String and java.util.List are in module java.base of loader 'bootstrap')
You likely have this in your afterEvaluate block:
javadoc { inputs.property("moduleName", moduleName) doFirst { options.addStringOption('-module-path', classpath.asPath) } }
You can fix it with:
javadoc {
inputs.property("moduleName", moduleName)
options.modulePath = classpath.asList()
}