本文整理了Java中com.liferay.gradle.util.FileUtil.getAbsolutePath()
方法的一些代码示例,展示了FileUtil.getAbsolutePath()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtil.getAbsolutePath()
方法的具体详情如下:
包路径:com.liferay.gradle.util.FileUtil
类名称:FileUtil
方法名:getAbsolutePath
暂无
代码示例来源:origin: gradle.plugin.com.liferay/gradle-plugins-deployment-helper
protected String getDeploymentFileNames() {
StringBuilder sb = new StringBuilder();
for (File file : getDeploymentFiles()) {
sb.append(FileUtil.getAbsolutePath(file));
sb.append(',');
}
sb.setLength(sb.length() - 1);
return sb.toString();
}
代码示例来源:origin: gradle.plugin.com.liferay/gradle-plugins-deployment-helper
protected List<String> getCompleteArgs() {
List<String> completeArgs = new ArrayList<>();
GUtil.addToCollection(completeArgs, getArgs());
completeArgs.add("--fileNames=" + getDeploymentFileNames());
completeArgs.add(
"--outputFile=" + FileUtil.getAbsolutePath(getOutputFile()));
File deploymentPath = getDeploymentPath();
if (deploymentPath != null) {
completeArgs.add(
"--path=" + FileUtil.getAbsolutePath(deploymentPath));
}
return completeArgs;
}
代码示例来源:origin: gradle.plugin.com.liferay/gradle-plugins-js-module-config-generator
completeArgs.add(FileUtil.getAbsolutePath(getModuleConfigFile()));
completeArgs.add(FileUtil.getAbsolutePath(getOutputFile()));
completeArgs.add(FileUtil.getAbsolutePath(outputDir));
completeArgs.add(FileUtil.getAbsolutePath(outputDir.getParentFile()));
代码示例来源:origin: gradle.plugin.com.liferay/gradle-plugins-js-transpiler
List<String> completeArgs = super.getCompleteArgs();
String destination = FileUtil.getAbsolutePath(getWorkingDir());
代码示例来源:origin: gradle.plugin.com.liferay/gradle-plugins-css-builder
private List<String> _getCompleteArgs() {
List<String> args = new ArrayList<>(getArgs());
args.add(
"sass.append.css.import.timestamps=" +
isAppendCssImportTimestamps());
args.add("sass.dir=" + _getDirNamesArg());
String docrootDirName = FileUtil.getAbsolutePath(getBaseDir());
args.add("sass.docroot.dir=" + _removeTrailingSlash(docrootDirName));
args.add("sass.generate.source.map=" + isGenerateSourceMap());
args.add("sass.output.dir=" + _addTrailingSlash(getOutputDirName()));
String importPath = FileUtil.getAbsolutePath(getImportPath());
args.add("sass.portal.common.path=" + importPath);
args.add("sass.precision=" + getPrecision());
String rtlExcludedPathRegexps = CollectionUtils.join(
",", getRtlExcludedPathRegexps());
args.add("sass.rtl.excluded.path.regexps=" + rtlExcludedPathRegexps);
String sassCompilerClassName = getSassCompilerClassName();
if (Validator.isNotNull(sassCompilerClassName)) {
args.add("sass.compiler.class.name=" + sassCompilerClassName);
}
return args;
}
代码示例来源:origin: gradle.plugin.com.liferay/gradle-plugins-js-transpiler
private void _addTasksExpandSoyCompileDependencies(
TranspileJSTask transpileJSTask, Configuration configuration) {
Project project = transpileJSTask.getProject();
RenameDependencyClosure renameDependencyClosure =
new RenameDependencyClosure(project, configuration.getName());
Iterable<TaskDependency> taskDependencies =
JSTranspilerPluginUtil.getTaskDependencies(configuration);
for (File file : configuration) {
Copy copy = JSTranspilerPluginUtil.addTaskExpandCompileDependency(
project, file, project.getBuildDir(),
"expandSoyCompileDependency", renameDependencyClosure);
copy.dependsOn(taskDependencies);
transpileJSTask.dependsOn(copy);
String path = FileUtil.getAbsolutePath(copy.getDestinationDir());
path += "/META-INF/resources/**/*.soy";
transpileJSTask.soyDependency(path);
}
}
代码示例来源:origin: gradle.plugin.com.liferay/gradle-plugins-xsd-builder
protected Task addTaskBuildXSDGenerate(BuildXSDTask buildXSDTask) {
Project project = buildXSDTask.getProject();
JavaExec javaExec = GradleUtil.addTask(
project, buildXSDTask.getName() + "Generate", JavaExec.class);
File tmpSrcDir = new File(
project.getBuildDir(), buildXSDTask.getName() + "/src");
javaExec.args("-d");
javaExec.args(FileUtil.getAbsolutePath(tmpSrcDir));
javaExec.args("-srconly");
Iterable<File> xsdFiles = buildXSDTask.getInputFiles();
for (File xsdFile : xsdFiles) {
javaExec.args(FileUtil.getAbsolutePath(xsdFile));
}
javaExec.dependsOn(
BasePlugin.CLEAN_TASK_NAME +
StringUtil.capitalize(javaExec.getName()));
javaExec.setClasspath(
GradleUtil.getConfiguration(project, CONFIGURATION_NAME));
javaExec.setDescription(
"Invokes the XMLBeans Schema Compiler in order to generate Java " +
"types from XML Schema.");
javaExec.setMain("org.apache.xmlbeans.impl.tool.SchemaCompiler");
TaskInputs taskInputs = javaExec.getInputs();
taskInputs.files(xsdFiles);
TaskOutputs taskOutputs = javaExec.getOutputs();
taskOutputs.dir(tmpSrcDir);
return javaExec;
}
代码示例来源:origin: gradle.plugin.com.liferay/gradle-plugins-wsdl-builder
private Task _addTaskBuildWSDLGenerate(
BuildWSDLTask buildWSDLTask, FileCollection classpath, File inputFile,
final File destinationDir, boolean deleteDestinationDir) {
Project project = buildWSDLTask.getProject();
String taskName = GradleUtil.getTaskName(
buildWSDLTask.getName() + "Generate", inputFile);
JavaExec javaExec = GradleUtil.addTask(
project, taskName, JavaExec.class);
GenerateOptions generateOptions = buildWSDLTask.getGenerateOptions();
javaExec.args(generateOptions.getArgs());
javaExec.args("--output=" + FileUtil.getAbsolutePath(destinationDir));
javaExec.args(FileUtil.getAbsolutePath(inputFile));
if (deleteDestinationDir) {
javaExec.doFirst(
new Action<Task>() {
@Override
public void execute(Task task) {
Project project = task.getProject();
project.delete(destinationDir);
}
});
}
javaExec.setClasspath(classpath);
javaExec.setMain("org.apache.axis.wsdl.WSDL2Java");
TaskInputs taskInputs = javaExec.getInputs();
taskInputs.file(inputFile);
TaskOutputs taskOutputs = javaExec.getOutputs();
taskOutputs.dir(destinationDir);
return javaExec;
}
内容来源于网络,如有侵权,请联系作者删除!