Transformer<File, String> resolver = new BasicFileResolver(target.getCurrentDir());
if (options.hasOption(NO_SEARCH_UPWARDS)) {
target.setSearchUpwards(false);
}
if (options.hasOption(PROJECT_DIR)) {
target.setProjectDir(resolver.transform(options.option(PROJECT_DIR).getValue()));
}
if (options.hasOption(GRADLE_USER_HOME)) {
target.setGradleUserHomeDir(resolver.transform(options.option(GRADLE_USER_HOME).getValue()));
}
return target;