gradle-git-version
gradle-git-version copied to clipboard
Use the plugin in `setting.gradle`
What happened?
Hi, I'm trying to use the plugin in the settings.gradle, as we have a multi repo configuration and in the settings.gradle we infer the version of our projects (which is either the git tag, or a snapshot version).
When trying to do so, I get:
> Failed to apply plugin 'com.palantir.git-version'.
> class org.gradle.initialization.DefaultSettings_Decorated cannot be cast to class org.gradle.api.Project (org.gradle.initialization.DefaultSettings_Decorated and org.gradle.api.Project are in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader @7e0b37bc)
Looking at this SO answer, it seems the issue is that the plugin is not built to be used in settings.gradle: https://stackoverflow.com/questions/42953816/org-gradle-initialization-defaultsettings-decorated-cannot-be-cast-to-org-gradle
What did you want to happen?
Is it possible for the plugin to work both inside build.gradle and settings.gradle? If so, are you willing to include this feature in this project? I can help with the implementation if you want.