Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the plugin in setting.gradle #661

Open
slinkydeveloper opened this issue Aug 1, 2022 · 0 comments
Open

Use the plugin in setting.gradle #661

slinkydeveloper opened this issue Aug 1, 2022 · 0 comments

Comments

@slinkydeveloper
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant