Build one kotlin class before gradle task

I have gradle task that fullfils codegeneration by jaxb. But code generation needs my handmade annotation class (on Kotlin) that is in source directory of project. Please suggest me how I can compile and put in classpath just one this file before codegeneration task

in gradle project I have this lines:
configurations {

So in code generation task I pass as param configurations.jaxb.asPath
I suggest that compiled class must be included in this classpath