When using Kotlin /BOOT-INF/classes/META-INF/spring.components is not generated when annotationProcessor context-indexer is used.

Just create Kotlin/Gradle demo project using https://start.spring.io/ and then add annotationProcessor("org.springframework:spring-context-indexer") to dependencies { }

After gradlew build spring.components does not exist in JAR

But if I create Java project and add annotationProcessor 'org.springframework:spring-context-indexer' then spring.components appears

Comment From: jhoeller

This is indeed only designed for regular Java classes at this point, and such an annotation processor is effectively a Java compiler plugin. I'm not familiar with how to accomplish the same post-processing approach for Kotlin files. @sdeleuze have you encountered this before?

Comment From: snicoll

You need to configure the kapt plugin to make sure the annotation processor works. There's nothing specific in this annotation processor so I am going to close this issue now.

If you need support to configure your kotlin project to use an annotation processor, please consider asking on StackOverflow.

Comment From: jukkasi

Of course, using

apply plugin: 'kotlin-kapt'

and

dependencies { kapt("org.springframework:spring-context-indexer") }

works fine