gradle-apt-plugin
gradle-apt-plugin copied to clipboard
Handle all JavaCompile tasks
This patch adds more sophisticated handling for Java projects, enabling one to use APT not only in 'compileJava' tasks, but all tasks of type 'JavaCompile'.
Important notes:
- The default generated source directory name has been changed, as has the mechanism of obtaining said default. The new version enables the project build script to read the default, not only override it.
- The default directory change affects both Java and Android projects. All the other changes are Java-exclusive, because I have absolutely no experience with Android. Hopefully, if similar functionality is needed, you (or another contributor) can add it easily based on my work.
- The plugin used to be applied fully inside a project.afterEvaluate invocation. From now on, this is not the case. The reason is that, if the plugin only works after the project is evaluated, the user cannot access configurations and extensions generated by this plugin in the project's build script. To fix that, I moved the creation of configurations and extensions, which are now done at the time of plugin application.
- This pull-request breaks the tests. I can't fix them, because I can't even run them, because I have groovy 2.2.3 and spock wants 1.8 (or 2.0.5 with the latest release of spock, but it's still too low), and I can't make them become friends :(