api / org.gradle.api / Script / uri

uri

abstract fun uri(path: Any): URI

Resolves a file path to a URI, relative to the directory containing this script. Evaluates the provided path object as described for #file(Object), with the exception that any URI scheme is supported, not just 'file:' URIs.

Parameters

path - The object to resolve as a URI.

Return
The resolved URI. Never returns null.