How to add a classes directory (including *.class) as a dependency

How to add a classes directory (including *.class) as a dependency

I have a directory (.class) dependency and need to be added to the project compilation

example

<java-bug01: Gradle -> buildSrc >

A/build.gradle