gradle
8.2

# preferProjectModules

abstract fun preferProjectModules()

Gradle can resolve conflicts purely by version number or prioritize project dependencies over binary. The default is by version number.

This applies to both first level and transitive dependencies. See example below:

    plugins {
        id 'java' // so that there are some configurations
    }

    configurations.all {
      resolutionStrategy.preferProjectModules()
    }

Content copied to clipboard