本文整理了Java中org.gradle.api.Task.getInputs()
方法的一些代码示例,展示了Task.getInputs()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.getInputs()
方法的具体详情如下:
包路径:org.gradle.api.Task
类名称:Task
方法名:getInputs
暂无
代码示例来源:origin: gradle.plugin.rgoldberg/java-modules
private void setModuleNamesInputProperty(final Task task, final String moduleNames) {
task.getInputs().property(PROPERTY_NAME_MODULE_NAMES, moduleNames);
}
代码示例来源:origin: avianey/androidsvgdrawable-plugin
@Override
public Task configure(Closure closure) {
Task task = super.configure(closure);
if (svgMaskedSvgOutputDirectory == null) {
svgMaskedSvgOutputDirectory = new File(getProject().getBuildDir(), "generated-svg");
}
if (!task.getInputs().getHasInputs()) {
task.getInputs().files(
from(asList(from, ninePatchConfig, svgMaskFiles, svgMaskResourceFiles))
.filter(notNull).toArray(Object.class));
}
if (!task.getOutputs().getHasOutput()) {
task.getOutputs().files(
from(asList(to, svgMaskedSvgOutputDirectory))
.filter(notNull).toArray(File.class));
}
return task;
}
代码示例来源:origin: org.gradle/gradle-core
public void doOutOfDate(Action<? super InputFileDetails> outOfDateAction) {
for (File file : task.getInputs().getFiles()) {
outOfDateAction.execute(new RebuildInputFile(file));
}
}
代码示例来源:origin: gradle.plugin.com.banderous.getpack/plugin
static void configure(Project project) {
SyncDeps build = project.getTasks().create("gpDo", SyncDeps.class);
Task install = project.getTasks().create("gpInstall");
install.dependsOn(build);
install.doLast(new Action<Task>() {
@Override
public void execute(Task task) {
Synchroniser.installPackages(project, build.manifests);
}
});
Task sync = project.getTasks().create("gpSync");
sync.dependsOn(install);
sync.getInputs().file(project.file(ProjectConfig.CONFIG_PATH));
sync.doLast(new Action<Task>() {
@Override
public void execute(Task task) {
ProjectConfig.updateShadowWithConfig(project);
}
});
}
代码示例来源:origin: palantir/gradle-baseline
public void apply(Project rootProject) {
this.project = rootProject;
if (!rootProject.equals(rootProject.getRootProject())) {
throw new IllegalArgumentException(
BaselineConfig.class.getCanonicalName() + " plugin can only be applied to the root project.");
}
Configuration configuration = rootProject.getConfigurations().create("baseline");
// users can still override this default dependency, it just reduces boilerplate
Optional<String> version = Optional.ofNullable(getClass().getPackage().getImplementationVersion());
configuration.defaultDependencies(d -> d.add(rootProject.getDependencies().create(String.format(
"com.palantir.baseline:gradle-baseline-java-config%s@zip", version.map(v -> ":" + v).orElse("")))));
// Create task for generating configuration.
rootProject.getTasks().register("baselineUpdateConfig", task -> {
task.setGroup("Baseline");
task.setDescription("Installs or updates Baseline configuration files in .baseline/");
task.getInputs().files(configuration);
task.getOutputs().dir(getConfigDir());
task.getOutputs().dir(rootProject.getRootDir().toPath().resolve("project"));
task.doLast(new BaselineUpdateConfigAction(configuration, rootProject));
});
}
代码示例来源:origin: gradle.plugin.org.hibernate.build/database-profile-plugin
profileTestTask.getInputs().property( "profileName", name );
profileTestTask.doFirst(
task -> profileResolver.injectSelectedProfile( name )
profileResourcesTask.getInputs().property( "profileName", name );
profileResourcesTask.dependsOn( resourcesTask );
profileResourcesTask.finalizedBy( applyTask );
代码示例来源:origin: gradle.plugin.mpern.sap.commerce/commerce-gradle-plugin
t.into(hybrisBin);
t.onlyIf(a -> {
if (a.getInputs().getSourceFiles().isEmpty()) {
throw new StopExecutionException("no platform file found");
t.into(hybrisBin);
t.onlyIf(a -> {
if (a.getInputs().getSourceFiles().isEmpty()) {
throw new StopExecutionException("no allExtensions file found");
代码示例来源:origin: gradle.plugin.com.banderous.gpm/plugin
sync.getInputs().file(project.file(ProjectConfig.CONFIG_PATH));
sync.doLast(new Action<Task>() {
@Override
代码示例来源:origin: gradle.plugin.mpern.sap.commerce/commerce-gradle-plugin
t.into(packageFolder.resolve("datahub/bin"));
t.onlyIf(a -> {
if (a.getInputs().getSourceFiles().isEmpty()) {
throw new StopExecutionException("no datahub file found");
代码示例来源:origin: gradle.plugin.com.outlinegames/plugin
sync.getInputs().file(project.file(ProjectConfig.CONFIG_PATH));
sync.doLast(new Action<Task>() {
@Override
代码示例来源:origin: gradle.plugin.de.otto.shopoffice/otto-classycle-plugin
private Task createClassycleTask(final Project project, final ClassycleExtension extension, final SourceSet sourceSet) {
final String taskName = sourceSet.getTaskName("classycle", null);
final FileCollection classesDirs = sourceSet.getOutput().getClassesDirs();
final File reportFile = getReportingExtension(project).file("classycle_" + sourceSet.getName() + ".txt");
final Task task = project.task(taskName);
task.getInputs().files(classesDirs, extension.getDefinitionFile());
task.getOutputs().file(reportFile);
task.doLast(new ClassyclePlugin.ClassycleAction(classesDirs, reportFile, extension));
// the classycle task depends on the corresponding classes task
final String classesTask = sourceSet.getClassesTaskName();
task.dependsOn(classesTask);
if (project.getLogger().isDebugEnabled()) {
final StringBuilder sb = new StringBuilder();
for (final File file : classesDirs) {
sb.append(file.getAbsolutePath()).append(" ");
}
project.getLogger()
.debug("Created classycle task: " + taskName + ", report file: " + reportFile + ", depends on: "
+ classesTask + " - sourceSetDirs: " + sb.toString());
}
return task;
}
代码示例来源:origin: gradle.plugin.edu.wpi.first/native-utils
File defFile = project.file(tmpDir.toString() + "/exports.def");
sBinary.getLinker().args("/DEF:" + defFile.toString());
sBinary.getTasks().getLink().getInputs().file(defFile);
task.getOutputs().file(defFile);
task.dependsOn(rootProject.getTasks().named(extractGeneratorTaskName));
代码示例来源:origin: gradle.plugin.pl.squirrel/classycle-gradle-plugin
final File reportFile = reporting.file("classycle/" + name + ".txt");
final Task task = project.task(taskName);
task.getInputs().files(classDir, definitionFile);
task.getOutputs().file(reportFile);
log.debug("Created classycle task: " + taskName + ", report file: " + reportFile);
内容来源于网络,如有侵权,请联系作者删除!