Class UpdateApiOnlyTranscriberJDslTask
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
com.arc_e_tect.gradle.apionly.transcriberj.UpdateApiOnlyTranscriberJDslTask
- All Implemented Interfaces:
Comparable<org.gradle.api.Task>,org.gradle.api.internal.DynamicObjectAware,org.gradle.api.internal.TaskInternal,org.gradle.api.Named,org.gradle.api.plugins.ExtensionAware,org.gradle.api.Task,org.gradle.util.Configurable<org.gradle.api.Task>
@DisableCachingByDefault(because="Rewrites a source file in place; a cache restore would bypass that entirely")
public abstract class UpdateApiOnlyTranscriberJDslTask
extends org.gradle.api.DefaultTask
Adds missing
apiOnlyTranscriberJ DSL properties to a consumer's
build.gradle, using their real plugin defaults.
Groovy DSL (build.gradle) only. Subscription declarations are never
invented because their targets and versions belong to the consuming project.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Named
org.gradle.api.Named.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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyCleanupDsl(boolean value) SetsgetCleanupDsl()for this run.voidapplyGenerateDsl(boolean value) SetsgetGenerateDsl()for this run.abstract org.gradle.api.file.RegularFilePropertyThe consumer project'sbuild.gradle.abstract org.gradle.api.provider.Property<Boolean> Whether to remove managed comments from the DSL block.abstract org.gradle.api.provider.Property<Boolean> Whether to generate a missing outer DSL block.voidUpdates the consumer build file, keeping a byte-for-byte backup before writing.Methods inherited from class org.gradle.api.DefaultTask
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServiceMethods inherited from class org.gradle.api.internal.AbstractTask
acceptServiceReferences, appendParallelSafeAction, doNotTrackState, doNotTrackStateIf, getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getLoggingManager, getOnlyIf, getReasonNotToTrackState, getReasonsNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, restoreOnlyIf, restoreTaskActions, setImpliesSubProjectsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.Task
doNotTrackState, notCompatibleWithConfigurationCache
-
Constructor Details
-
UpdateApiOnlyTranscriberJDslTask
@Inject public UpdateApiOnlyTranscriberJDslTask()Creates a new task instance. Instantiated by Gradle infrastructure.
-
-
Method Details
-
getBuildFile
@Internal public abstract org.gradle.api.file.RegularFileProperty getBuildFile()The consumer project'sbuild.gradle.- Returns:
- the build file this task rewrites
-
getGenerateDsl
Whether to generate a missing outer DSL block.- Returns:
- whether an absent
apiOnlyTranscriberJblock is generated
-
applyGenerateDsl
public void applyGenerateDsl(boolean value) SetsgetGenerateDsl()for this run.- Parameters:
value- whether to generate the outer block when absent
-
getCleanupDsl
Whether to remove managed comments from the DSL block.- Returns:
- whether comments are stripped from the managed block
-
applyCleanupDsl
public void applyCleanupDsl(boolean value) SetsgetCleanupDsl()for this run.- Parameters:
value- whether to remove comments from the managed block
-
updateDsl
public void updateDsl()Updates the consumer build file, keeping a byte-for-byte backup before writing.
-