Class RegisterDependenciesTask

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
com.diffplug.gradle.spotless.RegisterDependenciesTask
All Implemented Interfaces:
Comparable<Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, Named, ExtensionAware, Task, org.gradle.util.Configurable<Task>

@DisableCachingByDefault(because="This task coordinates the setup and execution of other tasks, and should not be cached") public abstract class RegisterDependenciesTask extends DefaultTask
NOT AN END-USER TASK, DO NOT USE FOR ANYTHING!

- When a user asks for a formatter, we need to download the jars for that formatter - Gradle wants us to resolve all our dependencies in the root project - no new dependencies in subprojects - So, whenever a SpotlessTask in a subproject gets configured, we call hookSubprojectTask(SpotlessTask), which makes this task a dependency of the SpotlessTask - When this "registerDependencies" task does its up-to-date check, it queries the task execution graph to see which SpotlessTasks are at risk of being executed, and causes them all to be evaluated safely in the root buildscript.

  • Constructor Details

    • RegisterDependenciesTask

      public RegisterDependenciesTask()
  • Method Details

    • getSteps

      @Input public List<FormatterStep> getSteps()
    • getUnitOutput

      @OutputFile public File getUnitOutput()
    • trivialFunction

      public void trivialFunction() throws IOException
      Throws:
      IOException
    • getTaskService

      @Internal public org.gradle.api.provider.Provider<SpotlessTaskService> getTaskService()
    • getBuildEventsListenerRegistry

      @Inject protected abstract org.gradle.build.event.BuildEventsListenerRegistry getBuildEventsListenerRegistry()