Best way to construct a C++ compile list

Currently, I have some SCons build files which uses several Python lists to build various executable or static files

Example of lists and files:

util = Split('''util/ util/ util/''')
parse = Split('''parse/ parse/ parse/''')
common = Split('''common/ common/ common/''')

Example of how the lists are used to eventual create an executable or static file

utils  = util + common
parser = parse + common

env.Program(target = 'utiltools', source = utils)
env.Program(target = 'parsertool', source = parse)

The results are *.o for each of the files, the *.o’s are then combined to make the executable or static file.

Is there some way to do this in Gradle?