下面列出了怎么用org.gradle.api.tasks.OutputFile的API类实例代码及写法,或者点击链接到github查看源代码。
/**
* Returns the file to write the wrapper properties to.
*/
@OutputFile
public File getPropertiesFile() {
File jarFileDestination = getJarFile();
return new File(jarFileDestination.getParentFile(), jarFileDestination.getName().replaceAll("\\.jar$",
".properties"));
}
/**
* Returns the file which the report will be written to. When set to {@code null}, the report is written to {@code System.out}.
* Defaults to {@code null}.
*
* @return The output file. May be null.
*/
@Nullable
@Optional
@OutputFile
public File getOutputFile() {
return outputFile;
}
/**
* The optional path to where an HTML report should be written
*/
@Override
@Nullable
@Optional
@OutputFile
public File getHtmlOutput() {
return htmlOutput;
}
/**
* The optional path to where an XML report should be written
*/
@Override
@Nullable
@Optional
@OutputFile
public File getXmlOutput() {
return xmlOutput;
}
@OutputFile
public File getSdistOutput() {
Project project = getProject();
return new File(
getDistDir(),
String.format(
"%s-%s.tar.gz",
project.getName(),
// TODO: Is this replace here really necessary?
project.getVersion().toString().replace("_", "-")));
}
/**
* Returns the file to write the wrapper properties to.
*/
@OutputFile
public File getPropertiesFile() {
File jarFileDestination = getJarFile();
return new File(jarFileDestination.getParentFile(), jarFileDestination.getName().replaceAll("\\.jar$",
".properties"));
}
/**
* Returns the file to write the wrapper properties to.
*/
@OutputFile
public File getPropertiesFile() {
File jarFileDestination = getJarFile();
return new File(jarFileDestination.getParentFile(), jarFileDestination.getName().replaceAll("\\.jar$",
".properties"));
}
@Optional
@OutputFile
public String getDestination() {
return destination;
}
/**
* Returns the file to write the wrapper script to.
*/
@OutputFile
public File getScriptFile() {
return getProject().file(scriptFile);
}
/**
* Returns the file to write the wrapper batch script to.
*/
@OutputFile
public File getBatchScript() {
File scriptFile = getScriptFile();
return new File(scriptFile.getParentFile(), scriptFile.getName().replaceFirst("(\\.[^\\.]+)?$", ".bat"));
}
/**
* Returns the file to write the wrapper jar file to.
*/
@OutputFile
public File getJarFile() {
return getProject().file(jarFile);
}
/**
* Returns the file to write the wrapper script to.
*/
@OutputFile
public File getScriptFile() {
return getProject().file(scriptFile);
}
/**
* Returns the file to write the wrapper batch script to.
*/
@OutputFile
public File getBatchScript() {
File scriptFile = getScriptFile();
return new File(scriptFile.getParentFile(), scriptFile.getName().replaceFirst("(\\.[^\\.]+)?$", ".bat"));
}
/**
* Returns the file to write the wrapper jar file to.
*/
@OutputFile
public File getJarFile() {
return getProject().file(jarFile);
}
@OutputFile
public RegularFileProperty getTarget() {
return target;
}
@OutputFile
public RegularFileProperty getTargetFile() {
return targetFile;
}
@OutputFile
abstract File getBaselineFile();
@OutputFile
abstract File getOutputApiFile();
@OutputFile
abstract File getOutputFile();
@OutputFile
abstract File getApiTxt();
@OutputFile
abstract File getBaselineFile();
@Optional
@OutputFile
public File getPublicFile() {
return publicFile;
}
@OutputFile
public File getReportLocation() {
return this.reportLocation;
}
@OutputFile
public File getOutputDir() {
return new File(getProject().getBuildDir(), extension().finalName() + "-runner.jar");
}
@OutputFile
protected File getManifestOutputFile() {
return awbBundle.getMergedManifest();
}
@OutputFile
@Optional
public File getProguardOutputFile() {
return proguardOutputFile;
}
@Optional
@OutputFile
public File getPublicFile() {
return publicFile;
}
@OutputFile
public File getOutputFile() {
return outputFile;
}
@OutputFile
public File getOutputFile() {
return outputFile;
}
@OutputFile
public File getOutputFile() {
return mOutputFile;
}