I just reverted this change: https://github.com/groovy/groovy-core/commit/54362c7b90ec2a8641d7e3ec85ea981cff8d8e1c
Maybe there is a better solution, but I'm to tired to think of one at the moment.
Thanks Pascal, modules without the extension file will now have an unneeded empty dir but that is better than skipping the files in that directory when it is needed.
OK, just did a minor tweak. So left your revert in place but trying to fix some of the anomalies using other approaches. Currently, the additional empty META-INF folder in the META-INF directory is now gone but there is still the empty "antlr" folder hierarchy at the root and an unneeded maven folder with contents within the META-INF directory.