cmelchior / realmfieldnameshelper

Realm extension library used to create more type-safe queries.
Apache License 2.0
173 stars 21 forks source link

Field classes not generated if kotlin-android plugin applied before realm-android #21

Closed ckirkman closed 6 years ago

ckirkman commented 7 years ago

I recently switched from using android-apt to the built-in annotationProcessor as recent versions of the gradle plugin now have all the features of android-apt.

When I did I found that my *Fields classes were not being generated by this library, but they would be with apt. I created a test project to narrow down what was conflicting and found that the culprit was applying the 'kotlin-android' plugin to my module's build.gradle before applying 'realm-android'.

I'm not sure why this is the case, or if you can do anything about it, but wanted to let you and other users know.

cmelchior commented 6 years ago

I added a section to the README about the correct order of plugins in Kotlin for the annotation processor to work correctly.