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

Configuration error when using the plugin multiple times #275

Open
EpicDima opened this issue Nov 4, 2024 · 0 comments
Open

Configuration error when using the plugin multiple times #275

EpicDima opened this issue Nov 4, 2024 · 0 comments

Comments

@EpicDima
Copy link

EpicDima commented Nov 4, 2024

I have a multi-module project configuration error when I want to apply a plugin to individual modules.

Why not just do it at the level of the entire project?
The project contains many modules, and the dump API is needed by only a small part of them, and even in the distant future it will be a small proportion, so I would not like to apply the plugin to modules that do not require it.

However, now, if you do this, such an error occurs:

A problem occurred evaluating project ':module_name'.
> Failed to apply plugin 'org.jetbrains.kotlinx.binary-compatibility-validator'.
  > Cannot add a configuration with name 'bcv-rt-jvm-cp' as a configuration with that name already exists.

I found a workaround for this behavior:

project.afterEvaluate {
  configurations.findByName("bcv-rt-jvm-cp")
    ?: project.apply(plugin = "org.jetbrains.kotlinx.binary-compatibility-validator")
}

But it would be cool for this to be supported, including out of the box, and not have to create strange workarounds.

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