Saturday, July 25, 2015

The CodeQA Trick,Android and Gradle

Okay, so I will give the mock-like code to enable codeQA on your buildtypes/buildvariants:

gradle.taskGraph.whenReady {taskgraph ->
//than we do codeqa on main sourcesets
//than do codeqa on debug sourcesets
//than do codeqa on release sourcesets

You put the codeqa task and the checkDependsOn(youttask) in the if bracket. your preNameBuild gets named for the particular build type or build variant. Its a in-elegant hack but it works.