Hello, I’m trying to use Klocwork to analyze my gradle (java) build. It looks like klocwork will work fine with Ant but it’s not obvious how to set it up with Gradle.
There are a couple of potential avenues I’ve looked at but so far no luck.
-
Maven has an ant plugin that will create an ant build.xml file from the pom. Gradle can run Ant files, but I can’t seem to find any way to export the gradle build files as a build.xml.
-
klocwork has a ‘kwwrap’ tool, that might be helpful if I can prefix my javac calls with the kwwrap parameters. Is it possible within the gradle java plugin to modify how the compile is called?
-
My least desirable option is to create a corresponding ant build that mimics my gradle build, and analyze that. However then I’d have two builds that I’d need to keep in sync, which is not a direction I’d like to go in.
I’m hoping Klocwork will start supporting gradle in the future. But not sure if that will happen, or if so how soon.
Thanks,
John