I am wondering if the ButterKnife framework which has Annotation Processors could work with scala sbt?
1 Answers
Scala doesn't seem to support the Java annotation processing tool As shown is this answer
During my quest to solve this problem, I added some research links to my original question post. The AndroidAnnotations annotation processor generates source code (Java files). Annotation processors, in general, seem to operate at the source code level (and not class files). I am expecting AndroidAnnotations to generate Java code from Scala source files. Scala doesn't seem to support the Java annotation processing tool. So my answer to this question would be: it is not possible to use AndroidAnnotations with Scala source code. However, AndroidAnnotations may still be used in the Java source code in a Scala mixed-source project.
this is an old answer but I doubt that any thing has changed then.
but in scala, you can use an even better method to bind your layout using TYPED RESOURCES (TR)

- 74,687
- 32
- 99
- 138
-
Thanks, I see TR is a good tool, Then I would like to know if the Activity classes written in Java , and other Model and Functional classes written in Scala,in such situtation, would the java source code annotation processors work? Have you considered about `sbtPlugin` which can process the source code? @humazed – yuiopt Jul 19 '17 at 04:11