Class AbstractRewriteTask

  • All Implemented Interfaces:
    java.lang.Comparable<org.gradle.api.Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, org.gradle.api.plugins.ExtensionAware, org.gradle.api.Task, org.gradle.util.Configurable<org.gradle.api.Task>, RewriteTask
    Direct Known Subclasses:
    RewriteDiscoverTask, RewriteFixTask, RewriteWarnTask

    public abstract class AbstractRewriteTask
    extends org.gradle.api.DefaultTask
    implements RewriteTask
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  AbstractRewriteTask.ResultsContainer  
      • Nested classes/interfaces inherited from interface org.gradle.api.Task

        org.gradle.api.Task.Namer
    • Field Summary

      • Fields inherited from interface org.gradle.api.Task

        TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.openrewrite.config.Environment environment()  
      protected org.openrewrite.ExecutionContext executionContext()  
      java.util.SortedSet<java.lang.String> getActiveRecipes()  
      java.util.SortedSet<java.lang.String> getActiveStyles()  
      org.gradle.api.file.FileCollection getDependencies()  
      org.gradle.api.file.FileCollection getJavaSources()
      The Java source files that will be subject to rewriting
      protected abstract org.gradle.api.logging.Logger getLog()  
      org.gradle.api.file.FileCollection getResources()  
      protected org.openrewrite.Parser.Listener listener()  
      protected AbstractRewriteTask.ResultsContainer listResults()  
      protected void logRecipesThatMadeChanges​(org.openrewrite.Result result)  
      void setMeterRegistry​(io.micrometer.core.instrument.MeterRegistry registry)  
      • Methods inherited from class org.gradle.api.internal.AbstractTask

        appendParallelSafeAction, compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getIdentityPath, getImpliesSubProjects, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getRequiredServices, getServices, getSharedResources, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTaskIdentity, getTemporaryDir, getTemporaryDirFactory, getTimeout, hasProperty, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, replaceLogger, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Comparable

        compareTo
      • Methods inherited from interface org.gradle.api.plugins.ExtensionAware

        getExtensions
      • Methods inherited from interface org.gradle.api.Task

        configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getFinalizedBy, getGroup, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getPath, getProject, getShouldRunAfter, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService
    • Constructor Detail

      • AbstractRewriteTask

        public AbstractRewriteTask​(org.gradle.api.tasks.SourceSet sourceSet,
                                   RewriteExtension extension)
    • Method Detail

      • getLog

        @Internal
        protected abstract org.gradle.api.logging.Logger getLog()
      • getJavaSources

        @InputFiles
        public org.gradle.api.file.FileCollection getJavaSources()
        The Java source files that will be subject to rewriting
      • setMeterRegistry

        public void setMeterRegistry​(io.micrometer.core.instrument.MeterRegistry registry)
        Specified by:
        setMeterRegistry in interface RewriteTask
      • getResources

        @InputFiles
        public org.gradle.api.file.FileCollection getResources()
      • getActiveRecipes

        @Input
        public java.util.SortedSet<java.lang.String> getActiveRecipes()
      • getActiveStyles

        @Input
        public java.util.SortedSet<java.lang.String> getActiveStyles()
      • getDependencies

        @InputFiles
        public org.gradle.api.file.FileCollection getDependencies()
      • environment

        protected org.openrewrite.config.Environment environment()
      • executionContext

        protected org.openrewrite.ExecutionContext executionContext()
      • listener

        protected org.openrewrite.Parser.Listener listener()
      • logRecipesThatMadeChanges

        protected void logRecipesThatMadeChanges​(org.openrewrite.Result result)