I mean you can do anything with Gradle. You would need a Java module with the annotation processor. Then you multiplatform module would depend on the Java compilation task from that other module and use its annotation processor output as a source set.