api / org.gradle.api / Project / relativePath

relativePath

abstract fun relativePath(path: Any): String

Returns the relative path from the project directory to the given path. The given path object is (logically) resolved as described for #file(Object), from which a relative path is calculated.

Parameters

path - The path to convert to a relative path.

Return
The relative path. Never returns null.