Factored out static srcStructure modes.
Added compileGroovy srcStructure discovery.