Gradle plugin for providing reusable dependency resolution rules.
Groovy Kotlin Shell

README.md

Gradle Resolution Rules Plugin

Support Status Build Status Coverage Status Gitter Apache 2.0

Gradle resolution strategies and module metadata provide an effective way to solve the most common dependency issues, however sharing these rules between projects is cumbersome, and requires custom plugins or apply from calls. This plugin provides general purpose rule types, allowing rules to be published, versioned, shared between projects, and optionally dependency locked.

These rule types solve the most common cause of dependency issues in projects, including:

  • Duplicate classes caused by changes to group or artifact ids, without renaming packages
  • Duplicate classes caused by bundle dependencies, which do not conflict resolve against the normal dependencies for that library
  • Lack of version alignment between libraries, where version alignment is needed for compatibility
  • Ensuring a minimum version of a library

Quick Start

Refer to the Gradle Plugin Portal for instructions on how to apply the plugin.

Open Source Rules

We produce a rules for dependencies found in Maven Central and other public repositories, to use those rules in your project add the following to your root project:

allprojects {
    apply plugin: 'nebula.resolution-rules'
}

dependencies {
    resolutionRules 'com.netflix.nebula:gradle-resolution-rules:latest.release'
}

See the gradle-resolution-rules project for details of the rules, and instructions on how to enable optional rule sets.

Documentation

The project wiki contains the full documentation for the plugin.