Class SpellscrollDownloadAssetsTask

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
app.spellscroll.task.SpellscrollDownloadAssetsTask
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="Manages its own version-keyed cache under ~/.spellscroll/dev-cache") public abstract class SpellscrollDownloadAssetsTask extends org.gradle.api.DefaultTask
Downloads Spellscroll dev assets for the current OS and API version from https://spellscroll.app/api/download-dev and extracts them to ~/.spellscroll/dev-cache/<version>/<os>/.

Authentication uses OAuth2 Authorization Code + PKCE (Google or Microsoft). On the first run, a browser window opens so the developer can log in. Tokens are cached in ~/.spellscroll/auth_cache.properties and refreshed silently on subsequent runs.

The download is skipped when a .downloaded marker file already exists in the cache directory, so repeated Gradle invocations are cheap. To force a re-download, delete the cache directory or the marker file.

Provider selection: defaults to Google. Set the system property -Dspellscroll.auth.provider=microsoft to use Microsoft instead.

  • 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
    void
     
    abstract org.gradle.api.provider.Property<String>
    Version of the Spellscroll API to download dev assets for.
    abstract org.gradle.api.provider.Property<String>
    The resolved dev-assets cache directory for this OS and API version.

    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

    • SpellscrollDownloadAssetsTask

      public SpellscrollDownloadAssetsTask()
  • Method Details

    • getApiVersion

      @Input public abstract org.gradle.api.provider.Property<String> getApiVersion()
      Version of the Spellscroll API to download dev assets for. Must match the apiVersion declared in the spellscroll extension.
    • getDevAssetsCacheDir

      @Internal public abstract org.gradle.api.provider.Property<String> getDevAssetsCacheDir()
      The resolved dev-assets cache directory for this OS and API version. Marked @Internal because it is a persistent user-level cache rather than a conventional Gradle build output — Gradle should not manage or clean this path.
    • download

      public void download() throws Exception
      Throws:
      Exception