Is it possible to use classes compiled by Gradle buildSrc in main Groovy project?
build, gradle, groovy
Solution
`buildSrc` is its own build (not project) that gets executed before the main build. Its sole purpose is to make some classes (plugins, tasks, regular classes) available to the build scripts of the main build. Hence you could call it a "meta-build".
Technically, it would be possible to add the compiled classes of `buildSrc` to the compile or runtime class path of a project in the main build, but I don't recommend to do it. There is very likely a better way to achieve your goals (but I don't know what those are).
Problem
Classes compiled by buildSrc/build.gradle are not resolved at runtime when they are used in main PROJECT classes. ``` My Groovy project structure looks like this: -PROJECT -buildSrc/ -build.gradle -/src/main/groovy - com.company.global.test.report -src/test/groovy -build.gradle ``` Is there something I can add to the top-level PROJECT/build.gradle to allow the classes compiled by it to use the classes compiled by buildSrc/build.gradle?