api / org.gradle.kotlin.dsl / InitScriptApi / relativePath

relativePath

fun relativePath(path: Any): String

Returns the relative path from this script's target base directory to the given path.

The given path object is (logically) resolved as described for KotlinInitScript.file, from which a relative path is calculated.

Parameters

path - The path to convert to a relative path.

Return
The relative path.