ebean-orm-tools / ebean-gradle-plugin

Plugin that performs Enhancement (entity, transactional, query bean) and can generate query beans from entity beans written in Kotlin via kapt
Apache License 2.0
10 stars 12 forks source link

Hacky fix for java and kotlin #19

Closed tobias- closed 6 years ago

tobias- commented 6 years ago

Do enhancement after classes

This solves the issue with multiple programming languages in the same Project by moving the enhancement step.

(Gradle tasks within quotes)

Previously:

  1. "processResources"
  2. Enhance resources
  3. "compileKotlin"
  4. Enhance Kotlin code
    • Here it will fail if not all dependencies are in Kotlin
  5. "compileJava"
  6. Enhance Java code
    • Here it will fail if not all dependencies are in Java
  7. "classes"
  8. Enhance classes

Now:

  1. "processResources"
  2. "compileKotlin"
  3. "compileJava"
  4. "classes"
  5. Enhance everything
tobias- commented 6 years ago

Possible, but probably not optimal fix for #18

tobias- commented 6 years ago

This hack only works for --no-build-cache builds, so it's not good enough

tobias- commented 6 years ago

I'll close this. I'm having problems with something (I think the gradle cache) that makes it unreliable except when trying to reproduce it. I've converted all ebean classes to Kotlin in a separate subproject and thus removed the issue, so I won't work on it anymore. Closing the PR.