Class SpellscrollGradleExtension

java.lang.Object
app.spellscroll.SpellscrollGradleExtension

public abstract class SpellscrollGradleExtension extends Object
DSL extension that exposes the spellscroll {} configuration block.

Three properties are required — getPluginId(), getPluginName(), and getApiVersion() — and must be set in the consumer's build script. All other properties have sensible defaults configured by SpellscrollGradlePlugin.

Example usage in a consumer project:


 spellscroll {
     pluginId   = 'com.example.my-plugin'
     pluginName = 'My Plugin'
     apiVersion = '1.1.0'
 }
 
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract org.gradle.api.provider.Property<String>
    Required. Version of spellscroll-api to compile against (e.g.
    abstract org.gradle.api.provider.Property<String>
    Name of the build task that spellscrollDev depends on before launching.
    abstract org.gradle.api.provider.Property<Boolean>
    When true, passes --ignore-default-plugins-dir to the Spellscroll process on launch, preventing Spellscroll from loading plugins from its default directory.
    abstract org.gradle.api.provider.Property<String>
    Required. The plugin identifier (registered at Spellscroll.app under "Developer Tools") This identifier is always an all-lowercase alphanumeric only string.
    abstract org.gradle.api.provider.Property<String>
    Required. Human-readable plugin name (e.g.
    abstract org.gradle.api.provider.Property<String>
    Plugin version string embedded in the generated constants class as PLUGIN_VERSION.
    abstract org.gradle.api.provider.Property<String>
    Path to the UI module npm project directory.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SpellscrollGradleExtension

      public SpellscrollGradleExtension()
  • Method Details

    • getUiModuleDir

      public abstract org.gradle.api.provider.Property<String> getUiModuleDir()
      Path to the UI module npm project directory.

      Defaults to <projectDir>/ui-module. The directory does not need to exist; spellscrollBuildUi and spellscrollInitUi will create or skip it as needed.

      Returns:
      the UI module directory property
    • getIgnoreDefaultPluginsDir

      public abstract org.gradle.api.provider.Property<Boolean> getIgnoreDefaultPluginsDir()
      When true, passes --ignore-default-plugins-dir to the Spellscroll process on launch, preventing Spellscroll from loading plugins from its default directory.

      Defaults to true.

      Returns:
      the ignore-default-plugins-dir flag property
    • getPluginId

      public abstract org.gradle.api.provider.Property<String> getPluginId()
      Required. The plugin identifier (registered at Spellscroll.app under "Developer Tools") This identifier is always an all-lowercase alphanumeric only string.

      Passed to Spellscroll via --dev-plugin and embedded in the generated constants class.

      Returns:
      the plugin ID property
    • getPluginName

      public abstract org.gradle.api.provider.Property<String> getPluginName()
      Required. Human-readable plugin name (e.g. My Plugin).

      Used to derive the generated constants class name (e.g. MyPluginConstants) and as the tab label in the scaffolded UI component.

      Returns:
      the plugin name property
    • getPluginVersion

      public abstract org.gradle.api.provider.Property<String> getPluginVersion()
      Plugin version string embedded in the generated constants class as PLUGIN_VERSION.

      Falls back to the Gradle project.version if not set explicitly. Must be set (either here or via project.version) before the build runs.

      Returns:
      the plugin version property
    • getBuildTask

      public abstract org.gradle.api.provider.Property<String> getBuildTask()
      Name of the build task that spellscrollDev depends on before launching.

      Defaults to "build". Override this when you want spellscrollDev to run a different lifecycle task instead — for example, set it to "assemble" to skip tests, or to any other task registered in the consumer project.

      Only takes effect when the java plugin is also applied. Set to an empty string to disable the build task dependency entirely (not recommended).

      Returns:
      the build task name property
    • getApiVersion

      public abstract org.gradle.api.provider.Property<String> getApiVersion()
      Required. Version of spellscroll-api to compile against (e.g. 1.2.3). Must be 1.1.0 or higher.

      The plugin automatically adds app.spellscroll:spellscroll-api:<apiVersion> as both compileOnly and annotationProcessor when the java plugin is present.

      Returns:
      the Spellscroll API version property