Running tasks from command line #114
Comments
Hi @bitsydarel Would be great if you can post code from your setup. Is it an Android project? If you do the setup similar to our sample, you should see lots of tasks with names starting with findbugs, pmd and checkstyle |
Sure @tasomaniac . sicne we have a lot of build flavor and we only want to run check when building for debug buildtype: static-analysis.gradle file content is: staticAnalysis {
} app module build.gradle content:
} plugins { apply plugin: 'com.android.application' |
Hey, thanks for the detailed reply. The problem is probably is the following line. variant.name.contains('debug') Variant name almost never contains lower case 'debug' sonce you have flavors. You either want to do 'toLowercase()' first. Or you can also use 'variant.debugable' directly. 'debugable' is a Boolean property on the Variant class in Android plugin. |
Ho I see, well, I took it from the multi-module sample project but it's made sense. I just tried that, I received:Could not get unknown property 'debugable' for object of type com.android.build.gradle.internal.api.TestVariantImpl. Will all the tasks be added to the gradle check task? |
All tasks are added to 'evaluateViolations' task. I think I made a typo, can you check with 'debuggable'? With double g? |
I see. Glad that it worked. |
Thanks for the help. |
Last question, which task should I run if I want to run all tools ? Check or evaluate violations ? |
Resolved |
When building the project the only static analysis tool check is detekt even when verifying the list of tasks available I don't see findbugs,pmd,checkstyle tasks . Is there's any way to run all the checks ?
The text was updated successfully, but these errors were encountered: