Class LionWebPlugin
- All Implemented Interfaces:
org.gradle.api.Plugin<org.gradle.api.Project>
The plugin performs the following responsibilities:
1. **Extension Registration**: - Registers an extension named `lionweb`. - Allows users to customize configurations such as: - Directory for LionWeb language definitions (`languagesDirectory`). - Directory for generated Java files (`generationDirectory`). - Target package name for generated Java classes (`packageName`). - Provides defaults if configurations are not explicitly defined: - `languagesDirectory` defaults to `src/main/lionweb` inside the project directory. - `generationDirectory` defaults to `build/generated-lionweb` inside the build directory.
2. **Task Registration**: - Adds a Gradle task named `generateLWLanguages`. - The task leverages the `GenerateLanguageTask` for processing LionWeb language files. - Configures the task with lazy connections from extension properties (`languagesDirectory`, `generationDirectory`, and `packageName`) to task inputs. - This task can generate Java code for LionWeb language definitions, streamlining the language engineering process.
The `LionWebPlugin` organizes the setup and execution of the LionWeb-based language engineering pipeline, making it easier to integrate with Gradle build systems.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LionWebPlugin
public LionWebPlugin()
-
-
Method Details
-
apply
public void apply(org.gradle.api.Project project) - Specified by:
applyin interfaceorg.gradle.api.Plugin<org.gradle.api.Project>
-