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.

relativePath

open fun relativePath(path: String): String(source)

Calculates a path relative to this path. If the given path is not a child of this path, it is returned unmodified.

Since

0.9


open fun relativePath(path: Path): Path(source)

Relative path.

Since

4.0