Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for gradle incremental annotation processing #556

Merged
merged 4 commits into from
Dec 12, 2018

Conversation

hotchemi
Copy link
Member

@hotchemi hotchemi commented Dec 11, 2018

Issue

resolves #473

Overview

This PR adds incremental compilation support. I suppose right now this feature is only for Java? 🤔

Ref

@hotchemi hotchemi changed the title [WIP]Add support for gradle incremental annotation processing Add support for gradle incremental annotation processing Dec 11, 2018
@hotchemi hotchemi requested a review from a team December 11, 2018 18:19
@autonomousapps
Copy link

Kotlin does not have support for incremental annotation processing yet. There's an open issue, can't find the link...

@hotchemi
Copy link
Member Author

@autonomousapps thank you I've just founded on Dagger's repo 🙇 #473 (comment)

@hotchemi hotchemi merged commit f3447b3 into master Dec 12, 2018
@hotchemi hotchemi deleted the incremental_atp branch December 12, 2018 03:45
@technoir42
Copy link
Contributor

@hotchemi for incremental AP to work you also need to provide an originating element for every generated file.

From the Gradle documentation:

They must provide exactly one originating element for each file generated with the Filer API. If zero or many originating elements are provided, Gradle will recompile all source files.

For Java you can use TypeSpec.Builder.addOriginatingElement but I'm not sure what to use for Kotlin.
Here is relevant commit from Dagger: google/dagger@baf2357

@hotchemi
Copy link
Member Author

@technoir42 ooh thank you let me address!

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support incremental compilation
3 participants