本文整理了Java中org.gradle.api.invocation.Gradle.getTaskGraph()
方法的一些代码示例,展示了Gradle.getTaskGraph()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Gradle.getTaskGraph()
方法的具体详情如下:
包路径:org.gradle.api.invocation.Gradle
类名称:Gradle
方法名:getTaskGraph
暂无
代码示例来源:origin: diffplug/spotless
project.getGradle().getTaskGraph().whenReady(new Closure(null) {
private static final long serialVersionUID = 1L;
代码示例来源:origin: org.gradle/gradle-core
private boolean isRootTaskGraph(TaskExecutionGraph graph) {
return rootGradle != null && graph == rootGradle.getTaskGraph();
}
}
代码示例来源:origin: btkelly/gnag
private boolean taskExecutionGraphIncludesGnagReport() {
for (final Task task : getProject().getGradle().getTaskGraph().getAllTasks()) {
if (task.getName().equals(GnagReportTask.TASK_NAME)) {
return true;
}
}
return false;
}
代码示例来源:origin: gradle.plugin.com.liferay/gradle-plugins-source-formatter
@Override
public boolean isSatisfiedBy(Task task) {
Project project = task.getProject();
Gradle gradle = project.getGradle();
TaskExecutionGraph taskExecutionGraph = gradle.getTaskGraph();
Project parentProject = project;
while ((parentProject = parentProject.getParent()) != null) {
TaskContainer parentProjectTaskContainer =
parentProject.getTasks();
Task parentProjectTask =
parentProjectTaskContainer.findByName(task.getName());
if ((parentProjectTask != null) &&
taskExecutionGraph.hasTask(parentProjectTask)) {
return false;
}
}
return true;
}
代码示例来源:origin: com.github.oehme.sobula/sobula
@Override
public void execute(final Task upload) {
Project _rootProject = it.getRootProject();
boolean _notEquals = (!Objects.equal(project, _rootProject));
if (_notEquals) {
Project _rootProject_1 = it.getRootProject();
final BintrayUploadTask rootBintrayUpload = BintrayReleasePlugin.this.bintrayUpload(_rootProject_1);
Gradle _gradle = it.getGradle();
TaskExecutionGraph _taskGraph = _gradle.getTaskGraph();
final boolean isMultiProjectUpload = _taskGraph.hasTask(rootBintrayUpload);
if (isMultiProjectUpload) {
bintrayUpload.setSyncToMavenCentral(false);
bintrayUpload.setSignVersion(false);
}
}
}
};
代码示例来源:origin: gradle-clojure/gradle-clojure
project.getGradle().getTaskGraph().whenReady(graph -> {
if (!graph.hasTask(repl)) {
return;
代码示例来源:origin: typelead/gradle-eta
project.getGradle().getTaskGraph().whenReady(graph -> {
List<Task> tasks = graph.getAllTasks();
for (Task task: tasks) {
代码示例来源:origin: com.android.tools.build/gradle-core
project.getGradle().getTaskGraph().whenReady(new Closure(this) {
void doCall(TaskGraphExecuter taskGraph) {
if (taskGraph.hasTask(mergeReportsTask)) {
代码示例来源:origin: io.github.gradle-clojure/gradle-clojure-plugin
project.getGradle().getTaskGraph().whenReady(graph -> {
if (!graph.hasTask(repl)) {
return;
代码示例来源:origin: gradle.plugin.mpern.sap.commerce/commerce-gradle-plugin
createConfigFolder.mustRunAfter(bootstrap);
project.getGradle().getTaskGraph().addTaskExecutionListener(new HybrisAntTask.HybrisAntConfigureAdapter());
project.getGradle().getTaskGraph().addTaskExecutionGraphListener(configureSupportPortalDownload);
代码示例来源:origin: com.amazon.device.tools.build/gradle-core
project.getGradle().getTaskGraph().whenReady(new Closure<Void>(this, this) {
public void doCall(TaskExecutionGraph taskGraph) {
for (String reportTask : reportTasks) {
代码示例来源:origin: com.amazon.device.tools.build/gradle-core
project.getGradle().getTaskGraph().whenReady(new Closure<Void>(this, this) {
public void doCall(TaskExecutionGraph taskGraph) {
if (taskGraph.hasTask(LINT)) {
代码示例来源:origin: com.android.tools.build/gradle-core
variantScope.getGlobalScope().getProject().getGradle().getTaskGraph()
.addTaskExecutionListener(new TaskExecutionAdapter() {
@Override
代码示例来源:origin: com.android.tools.build/gradle-core
project.getGradle().getTaskGraph().whenReady(new Closure<Void>(this, this) {
public void doCall(TaskExecutionGraph taskGraph) {
for (String reportTask : reportTasks) {
代码示例来源:origin: com.android.tools.build/gradle-core
private void createLintVitalTask(
@NonNull TaskFactory tasks,
@NonNull ApkVariantData variantData) {
checkState(getExtension().getLintOptions().isCheckReleaseBuilds());
// TODO: re-enable with Jack when possible
if (!variantData.getVariantConfiguration().getBuildType().isDebuggable() &&
!variantData.getVariantConfiguration().getJackOptions().isEnabled()) {
final AndroidTask<Lint> lintReleaseCheck = androidTasks.create(
tasks,
new Lint.VitalConfigAction(variantData.getScope()));
lintReleaseCheck.optionalDependsOn(tasks, variantData.javacTask);
variantData.getScope().getAssembleTask().dependsOn(tasks, lintReleaseCheck);
// If lint is being run, we do not need to run lint vital.
// TODO: Find a better way to do this.
project.getGradle().getTaskGraph().whenReady(new Closure<Void>(this, this) {
public void doCall(TaskExecutionGraph taskGraph) {
if (taskGraph.hasTask(LINT)) {
project.getTasks().getByName(lintReleaseCheck.getName()).setEnabled(false);
}
}
});
}
}
内容来源于网络,如有侵权,请联系作者删除!