uschindler edited a comment on issue #1242: LUCENE-9201: Port documentation-lint task to Gradle build URL: https://github.com/apache/lucene-solr/pull/1242#issuecomment-584631168 Hi @mocobeta, what's the problem with the source folder? Here it is: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.SourceSet.html#org.gradle.api.tasks.SourceSet:java The second problem is the "joining" classpath: This won't work on windows (":" is only valid on Linux). With sourceSets, use the following method: `getAsPath()` https://docs.gradle.org/current/javadoc/org/gradle/api/file/FileCollection.html#getAsPath-- (also the compileClassPath for the test sourceset really also contains the classes from the main sourceset). The problem may only be incorrect dependencies. The bug is that you have to define a separate task per sourceset. So don't add a global lintJavadocs path and instead just register a new task for each project named `sourceLint` (remove Javadocs from it, the javadocs in the ECJ call is obsolete, its just from former times. We now primarily use it to find obsolete imports) that depends on the per-sourceset `sourceLintMain`(autogenerated, see forbiddenapis source code) and `sourceLintTest`. I think you can more or less copypaste the whole task installation from forbiddenapis (see previous comments). If you then execute sourceLint from top-level it will execute the task for every project separately. You should also be able to call it separately for a single unit. Ideally that task should then be depended on each project's "check". I'd rewrite the whole thing - should I work on it? (I don't have much time, but spending too much time here in explaining what to do costs more time). IMHO, the current setup is very gradle-unlike. You'd never do it like that, feels like Ant. :-)
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org