Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,16 @@ class GoogleJavaFormatPlugin implements Plugin<Project> {

SharedContext context = new SharedContext(project, extension)
TaskConfigurator configurator = new TaskConfigurator(context)
project.gradle.taskGraph.beforeTask { Task task ->
if (task.project == this.project && task instanceof FormatTask) {
if (SUPPORTS_LAZY_TASKS) {
project.tasks.withType(FormatTask).configureEach { FormatTask task ->
task.accept(configurator)
}
} else {
project.gradle.taskGraph.beforeTask { Task task ->
if (task.project == this.project && task instanceof FormatTask) {
task.accept(configurator)
}
}
}
}

Expand Down