A few months ago I created a gradle-errorprone-plugin to use Google’s error_prone compiler in Gradle.
It uses internal APIs (‘IncrementalJavaCompiler’ in Gradle <= 1.11, now ‘CleaningJavaCompiler’ in Gradle 1.12) and makes use ‘setJavaCompiler’ of the ‘JavaCompiler’ task.
This last method is deprecated in Gradle 1.12 and has already been removed in master.
I knew that by using internal APIs the plugin could break at any time; but I’d like to know if there’s any way to build such a plugin for Gradle.next, and if not, ask that some API be added to make it possible.
The next version of error_prone will support the ‘javax.tool.JavaCompiler’ API so maybe there could be some factory for ‘javax.tool.JavaCompiler’ that could be set on the ‘JavaCompiler’ task, the default one using ‘ToolProvider.getSystemJavaCompiler()’.