Move to gradle sourceSets.

The goal is to have all subproject code to be compiled with the same
compiler version.