Application plugin generates wrong classpath for bare .class files

I consider the sourceSets of dependent project to be private and should never be accessed like this. Eg:

runtime project(':rsaquery').sourceSets.filter.output

A couple of options

  1. Create another jar in :rsaquery with a classifier of “filter” and depend on that instead.
  2. Create a “filter” configuration in :rsaquery and depend on it via
runtime project(path: ':rsaquery', configuration: 'filter')

More info here and here