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

Automatically add the mn catalog when shared plugin is applied #331

Closed
timyates opened this issue May 4, 2022 · 1 comment
Closed

Automatically add the mn catalog when shared plugin is applied #331

timyates opened this issue May 4, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@timyates
Copy link
Contributor

timyates commented May 4, 2022

There was a discussion over here micronaut-projects/micronaut-problem-json#172 (comment) where we decided that it is cleaner to include micronaut dependencies under an mn prefix in the catalog using the following in settings.gradle

dependencyResolutionManagement {
    repositories {
        mavenCentral()
    }
    versionCatalogs {
        "mn" {
            from("io.micronaut:micronaut-bom:${providers.gradleProperty("micronautVersion").get()}")
        }
    }
}

Instead of doing this in every project, would it be possible for the settings plugin to set this up for us when it is applied to the build in a module? Then we can just go back to using

plugins {
    id 'io.micronaut.build.shared.settings' version '5.3.x'
}

and remove all the micronaut prefixed libraries from the libs.versions.toml files

@timyates timyates added the enhancement New feature or request label May 4, 2022
@alvarosanchez alvarosanchez changed the title Automatically add the mn catclog when shared plugin is applied Automatically add the mn catalogue when shared plugin is applied May 4, 2022
@timyates timyates changed the title Automatically add the mn catalogue when shared plugin is applied Automatically add the mn catalog when shared plugin is applied May 4, 2022
@melix
Copy link
Contributor

melix commented May 17, 2022

This can be done since 5.3.6 using:

micronautBuild {
    importMicronautCatalog()
}

(the project template has been updated with this).

@melix melix closed this as completed May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants