Class SpellscrollGradlePlugin

java.lang.Object
app.spellscroll.SpellscrollGradlePlugin
All Implemented Interfaces:
org.gradle.api.Plugin<org.gradle.api.Project>

public class SpellscrollGradlePlugin extends Object implements org.gradle.api.Plugin<org.gradle.api.Project>
Main entry point for the Spellscroll Gradle plugin (app.spellscroll.dev).

Applying this plugin to a project:

  • Registers the spellscroll extension (SpellscrollGradleExtension) for DSL configuration.
  • Registers the generateSpellscrollBuildConfig, spellscrollDev, spellscrollBuildUi, and spellscrollInitUi tasks.
  • When the java plugin is also applied: automatically adds spellscroll-api as compileOnly + annotationProcessor, wires the generated constants source into the main source set, and bundles the UI build output into processResources.

Three properties are required in the spellscroll block: pluginId, pluginName, and apiVersion. A GradleException is thrown during afterEvaluate if any are absent.

  • Constructor Details

    • SpellscrollGradlePlugin

      public SpellscrollGradlePlugin()
  • Method Details

    • apply

      public void apply(org.gradle.api.Project project)
      Applies the plugin to the given Project.

      This method registers the spellscroll extension, configures property defaults, registers all tasks, wires Java-plugin integrations, and validates required configuration.

      Specified by:
      apply in interface org.gradle.api.Plugin<org.gradle.api.Project>
      Parameters:
      project - the Gradle project to configure