# Kapt IDEA doesn't know about generated classes

**URL:** <https://discuss.kotlinlang.org/t/kapt-idea-doesnt-know-about-generated-classes/6894>\
**Category:** Support\
**Created:** [March 6, 2018, 4:50am UTC](https://discuss.kotlinlang.org/t/kapt-idea-doesnt-know-about-generated-classes/6894 "2018-03-06T04:50:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisackerman](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/chrisackerman/32/2010_2.png) [@chrisackerman](https://discuss.kotlinlang.org/u/chrisackerman)\
**Post date:** [March 6, 2018, 4:50am UTC](https://discuss.kotlinlang.org/t/kapt-idea-doesnt-know-about-generated-classes/6894/1 "2018-03-06T04:50:28Z")

</div>

I’m attempting to write an annotation processor that will generate interfaces. It works when I build with gradle, but IDEA doesn’t see the generated classes until I build. And IDEA never shows any of the messages sent via `messager`. What am I missing?

I threw my code up on github:

- [Annotation Processor](https://github.com/ChrisAckerman/efface)
- [Demo](https://github.com/ChrisAckerman/efface-demo)

Setup:

1. Checkout the annotation processor
2. Install it locally: `./gradlew clean install`
3. Checkout the demo
4. Open it in IDEA
5. Note that the `IFoo` interface is not found on class `Bar`
6. Compile the demo: `./gradlew clean build`
7. Note that the `IFoo` interface is now found

Expectation:

I expected the annotation processor to be run in the background in IDEA, to generate the mythical “stubs” which Kapt supposedly produces, so that after annotating something, I can immediately go use it in my code, even before compiling. This should happen while editing. Things like `messager` error messages which indicate you did something wrong (e.g. annotating an interface should produce an error in this case), never show up in IDEA.

---

<div class="post-metadata">

**Author:** ![gildor](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/gildor/32/1891_2.png) [@gildor](https://discuss.kotlinlang.org/u/gildor)\
**Post date:** [March 6, 2018, 5:59am UTC](https://discuss.kotlinlang.org/t/kapt-idea-doesnt-know-about-generated-classes/6894/2 "2018-03-06T05:59:55Z")

</div>

I’ve tried your demo and it perfectly works for me:

1. Clone AP
2. ./gradlew install
3. Clone Demo
4. Run assemble task from Idea

Result:  
Build successful and I have code completion and navigation to generated code

Also, better to split AP and runtime dependencies (like annotations in your case), othewise AP will preset in your runtime class path

UPD: I tried on Idea Ultimate 2018.1 EAP (public preview 1)
