Test task sources

NO-SOURCE is a generic term used by Gradle to represent a task that was skipped when “skip-when-empty” inputs are in fact empty. It is not specifically related to “source code”.
https://docs.gradle.org/current/userguide/more_about_tasks.html#sec:task_input_output_annotations

It appears that if the testClassesDirs contain classes, then the task should not be skipped. If you have test classes in those dirs then I’m not sure why it’s reporting NO-SOURCE.

Side note; You mentioned test jars, AFAIK Gradle still doesn’t support running tests from jars. An old post about it Gradle junit runs: pick tests (test class names) from jar file