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.

require

abstract fun require(version: String)(source)

Sets the required version of this module.

Implies that the selected version cannot be lower than what require accepts but could be higher through conflict resolution, even if higher has an exclusive higher bound. This is what a direct dependency translates to. This term supports dynamic versions.

This will override a previous strictly declaration.

This clears any set rejected versions.

Since

5.0

Parameters

version

the required version of this module