Simplify build files by removing duplicate definitions of compileOnly/testCompileOnly configurations