Skip to content

Align version numbers for all OpenRewrite maintained recipe modules

License

Notifications You must be signed in to change notification settings

openrewrite/rewrite-recipe-bom

Repository files navigation

rewrite-recipe-bom

Align version numbers for all OpenRewrite maintained recipe modules. Intended to help with developing Recipe modules which take dependencies or otherwise build upon rewrite-maintained Recipe modules.

ci Apache 2.0 Maven Central Contributing Guide

Maven Usage

Maven provides the Bill of Materials pattern for aligning dependency versions.

<project>
    <dependencies>
        <dependency>
            <groupId>org.openrewrite.recipe</groupId>
            <artifactId>rewrite-logging-frameworks</artifactId>
        </dependency>
        <dependency>
            <groupId>org.openrewrite.recipe</groupId>
            <artifactId>rewrite-testing-frameworks</artifactId>
        </dependency>
    </dependencies>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.openrewrite.recipe</groupId>
                <artifactId>rewrite-recipe-bom</artifactId>
                <version><!-- desired version here --></version>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
</project>

Gradle Usage

Gradle provides the platform function for aligning dependency versions.

dependencies {
    implementation(platform("org.openrewrite.recipe:rewrite-recipe-bom:<version>"))
    
    // No need to specify version numbers
    implementation("org.openrewrite.recipe:rewrite-logging-frameworks")
    implementation("org.openrewrite.recipe:rewrite-testing-frameworks")
}