build.gradle: implement multiservice class lookup
build.gradle: use FileTree

It shortens the code quite a bit.