For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

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()
}

Since

3.2