Class SpellscrollDevTask

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
app.spellscroll.task.SpellscrollDevTask
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="Launches an interactive application process") public abstract class SpellscrollDevTask extends org.gradle.api.DefaultTask
Gradle task that launches the Spellscroll application with the plugin loaded in dev mode.

The Spellscroll executable is resolved from the downloaded dev-assets cache directory (populated by spellscrollDownloadAssets before this task runs). Builds the command:

 Spellscroll[.exe / .app]
   --plugin-dir      <build/libs>
   --dev-plugin     <pluginId>
   [--ignore-default-plugins-dir]
 

Gradle blocks until the Spellscroll process exits. Stopping the Gradle task (e.g. Ctrl+C) force-kills the child process. Subprocess stdout and stderr are merged and forwarded to the Gradle console via a daemon thread.

This task automatically depends on spellscrollDownloadAssets and jar (when the java plugin is present). Caching is disabled because the task produces no outputs — it runs an interactive application.

  • 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract org.gradle.api.provider.Property<String>
    Absolute path to the Gradle build/libs directory, passed to Spellscroll via --plugin-dir.
    abstract org.gradle.api.provider.Property<String>
    Path to the downloaded dev-assets cache directory.
    abstract org.gradle.api.provider.Property<Boolean>
    When true, appends --ignore-default-plugins-dir to the Spellscroll command, preventing it from loading plugins from its default directory.
    abstract org.gradle.api.provider.Property<String>
    The plugin identifier passed to Spellscroll via --dev-plugin.
    void
    Resolves the Spellscroll executable from the dev-assets cache, builds the launch command, and starts the process.

    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, usesService

    Methods 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, setImpliesSubProjects

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.gradle.api.Task

    doNotTrackState, notCompatibleWithConfigurationCache
  • Constructor Details

    • SpellscrollDevTask

      public SpellscrollDevTask()
  • Method Details

    • getDevAssetsDir

      @Input public abstract org.gradle.api.provider.Property<String> getDevAssetsDir()
      Path to the downloaded dev-assets cache directory. Provided by the spellscrollDownloadAssets task.
      Returns:
      the dev-assets directory property
    • getPluginId

      @Input public abstract org.gradle.api.provider.Property<String> getPluginId()
      The plugin identifier passed to Spellscroll via --dev-plugin.
      Returns:
      the plugin ID property
    • getIgnoreDefaultPluginsDir

      @Input public abstract org.gradle.api.provider.Property<Boolean> getIgnoreDefaultPluginsDir()
      When true, appends --ignore-default-plugins-dir to the Spellscroll command, preventing it from loading plugins from its default directory.
      Returns:
      the ignore-default-plugins-dir flag property
    • getBuildLibsDir

      @Internal public abstract org.gradle.api.provider.Property<String> getBuildLibsDir()
      Absolute path to the Gradle build/libs directory, passed to Spellscroll via --plugin-dir. Marked @Internal because it is derived from the build directory and should not influence task up-to-date checks.
      Returns:
      the build libs directory property
    • launch

      public void launch() throws IOException, InterruptedException
      Resolves the Spellscroll executable from the dev-assets cache, builds the launch command, and starts the process.

      A daemon thread reads the subprocess output and forwards it to the console. The task blocks until the process exits. On InterruptedException, the process is force-killed before re-throwing.

      Throws:
      IOException - if the process cannot be started
      InterruptedException - if the current thread is interrupted while waiting for the process
      org.gradle.api.GradleException - if the Spellscroll executable is not found in the cache dir