多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# B.38 ResolvePathTask The `ResolvePathTask` turns a relative path into an absolute path, with respect to specified directory or the project basedir (if no dir attribute specified). This task is useful for turning a user-defined relative path into an absolute path in cases where buildfiles will be called in different directories. Without this task, buildfiles lower in the directory tree would mis-interpret the user-defined relative paths. Table B.38:聽Attributes NameTypeDescriptionDefaultRequired`file``String`The file or directory path to resolve.n/aYes`dir``File`The base directory to use when resolving "file".project.basedirNo`propertyName``String`The name of the property to set with resolved (absolute) path.n/aYes`level``String`Control the level at which status messages are reported. One of `error`, `warning`, `info`, `verbose`, `debug`.`verbose`No B.38.1 Examples ``` <property name="relative_path" value="./dirname"/> <resolvepath propertyName="absolute_path" file="${relative_path}"/> <echo>Resolved [absolute] path: ${absolute_path}</echo> ```