Package dev.gmitch215.bytebox.gradle
Class GenerateScaffoldTask
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
dev.gmitch215.bytebox.gradle.GenerateScaffoldTask
- 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>
@CacheableTask
public abstract class GenerateScaffoldTask
extends org.gradle.api.DefaultTask
Writes the Worker project around the compiled module: the Wrangler configuration, the JavaScript
entry point, and the package manifest.
Everything it writes is derived, so it is safe to delete and regenerate. What it derives from is the handler's own interfaces and the declared bindings, which is what keeps the configuration from drifting away from the code.
- Since:
- 1.0.0
-
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 TypeMethodDescriptionvoidgenerate()Writes the project.abstract org.gradle.api.provider.ListProperty<Binding> Returns the declared bindings.abstract org.gradle.api.provider.Property<String> Returns the version of bytebox to depend on.abstract org.gradle.api.provider.Property<String> Returns the compatibility date.abstract org.gradle.api.provider.ListProperty<String> Returns the compatibility flags, before the Node ones are dealt with.abstract org.gradle.api.provider.ListProperty<String> getCrons()Returns the Cron Triggers that fire it.abstract org.gradle.api.provider.Property<String> Returns the npm package supplying the synchronous decompressor, when one is needed.abstract org.gradle.api.provider.Property<String> Returns the version range for that package.abstract org.gradle.api.provider.ListProperty<DurableObjects> Returns the Durable Objects written in Java, each needing a JavaScript class to be one.abstract org.gradle.api.provider.ListProperty<String> Returns the npm packages the program imports, asname@range.abstract org.gradle.api.provider.Property<Boolean> Returns whether to send logs to Cloudflare's observability.abstract org.gradle.api.file.DirectoryPropertyReturns where the project is written.abstract org.gradle.api.provider.ListProperty<String> Returns the routes the Worker answers on.abstract org.gradle.api.provider.ListProperty<String> Returns the Workers this one sends logs to.abstract org.gradle.api.provider.ListProperty<String> Returns the triggers the handler handles, by export name.abstract org.gradle.api.provider.Property<String> Returns the Worker's name.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, 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
-
GenerateScaffoldTask
public GenerateScaffoldTask()
-
-
Method Details
-
getWorkerName
Returns the Worker's name.- Returns:
- the Worker's name
-
getCompatibilityDate
Returns the compatibility date.- Returns:
- the compatibility date
-
getCompatibilityFlags
Returns the compatibility flags, before the Node ones are dealt with.- Returns:
- the compatibility flags, before the Node ones are dealt with
-
getRoutes
Returns the routes the Worker answers on.- Returns:
- the routes the Worker answers on
-
getCrons
Returns the Cron Triggers that fire it.- Returns:
- the Cron Triggers that fire it
-
getTailConsumers
Returns the Workers this one sends logs to.- Returns:
- the Workers this one sends logs to
-
getObservability
Returns whether to send logs to Cloudflare's observability.- Returns:
- whether to send logs to Cloudflare's observability
-
getTriggers
Returns the triggers the handler handles, by export name.- Returns:
- the triggers the handler handles, by export name
-
getBindings
Returns the declared bindings.- Returns:
- the declared bindings
-
getDecoder
Returns the npm package supplying the synchronous decompressor, when one is needed.- Returns:
- the npm package supplying the synchronous decompressor, when one is needed
-
getDecoderVersion
Returns the version range for that package.- Returns:
- the version range for that package
-
getByteboxVersion
Returns the version of bytebox to depend on.- Returns:
- the version of bytebox to depend on
-
getNPMPackages
Returns the npm packages the program imports, asname@range.- Returns:
- the npm packages the program imports, as
name@range
-
getDurableObjects
Returns the Durable Objects written in Java, each needing a JavaScript class to be one.- Returns:
- the Durable Objects written in Java, each needing a JavaScript class to be one
-
getOutputDirectory
@OutputDirectory public abstract org.gradle.api.file.DirectoryProperty getOutputDirectory()Returns where the project is written.- Returns:
- where the project is written
-
generate
public void generate()Writes the project.
-