I think I’ve finally managed to resolve this by wrapping my configuration file inside its own Gradle plugin. This allows me to perform magic
like this:
project.getPluginManager().withPlugin(plug -> {
Class<? extends Plugin> pluginClass = project.getPlugins().getPlugin(plug.getId()).getClass();
loadConfig(pluginClass.getResourceAsStream("config.properties"));
});
provided my new plugin’s Plugin
implementation lives in the same package as its configuration file.