Avoiding the default data context

Hello everyone!

I want to detect all uses of default data context. As stated in the documentation:

Using both the compiler plugin and ExceptionalDataContext together will be able to detect all uses of the default data context.

My question is: how to use this compiler plugin with gradle? The documentation provides example only for maven.

Thank you in advance for your answers.

just have to specify a command line argument for javac: -Xplugin:dataContextPlugin. I don’t know the details of gradle, but hopefully they document how to provide flags to javac.

I use this solution with options.compilerArgs << '-Xplugin:dataContextPlugin', and It doesn’t work(
I have an error: plug-in not found: dataContextPlugin

I don’t know your syntax, but here is what I have in my pom in the build section:

        <!-- latest version to work with maven 3.0.5-->