In Gradle 6.3 within build.gradle, mainClassName may be set like this with no complaints:
mainClassName = 'mod/app.Main'
In Gradle 6.61, the above line results in this:
java.lang.module.InvalidModuleDescriptorException: Package mod.app not found in module
This can be resolved by removing the module portion of mainClassName:
mainClassName = 'app.Main'
While the exception is resolved, Gradle still states:
No module was provided for main class, assuming the current module. Prefer providing 'mainClassName' in the following format: '$moduleName/a.b.Main'
I have experimented with variations of this:
ext.moduleName = 'mod'
mainClassName = '${ext.moduleName}/app.Main'
So far I have been unable to get any of these to work. I could work with the setting as 'app.Main', but I would prefer to use the variation that Gradle prefers. How should this be done?