Thank you for your interest in contributing! This guide will help you get started.
This file is synced from grails-plugin-template and kept generic on purpose — it should read correctly in every repo built on the template. To lock it and stop receiving updates, add a
CONTRIBUTING.md.lockfile next to it.
This project has a Code of Conduct. By participating, you are expected to uphold it. Please report unacceptable behavior to the project maintainers.
Install SDKMAN! to manage JDK, Gradle, and Groovy versions:
curl -s "https://get.sdkman.io" | bash# Clone the repository
git clone <this repository's URL>
cd <the cloned directory>
# Install the required SDK versions (Java, Gradle, Groovy — see .sdkmanrc)
sdk env install
# Build the project
./gradlew build.
├── plugin/ # The publishable Grails plugin (source + unit tests ONLY)
├── examples/app1/ # Example app with integration tests
├── conventions/ # Gradle convention plugins (shared build configuration)
├── docs/ # Asciidoctor documentation
└── .agents/skills/ # AI agent skills (.claude is a symlink to .agents)
Key architectural rules:
- Plugin module contains only plugin source code and unit tests – no integration tests, no example controllers.
- Example apps under
examples/host all integration and functional tests. They depend on the plugin as a real consumer would. - Convention plugins in
conventions/deduplicate build configuration. Never usesubprojects {},allprojects {}, orconfigure()blocks in the rootbuild.gradle.
# Full build (compile + all tests)
./gradlew build
# Plugin unit tests only
./gradlew test
# Integration tests (runs the example app)
./gradlew :app1:integrationTest
# Run the example app locally
./gradlew :app1:bootRun
# Generate documentation
./gradlew docs
# Skip tests
./gradlew build -PskipTests
# Clean build
./gradlew clean buildThe project uses JaCoCo to aggregate coverage data from both plugin unit tests and example app integration tests.
# Generate the aggregated coverage report
./gradlew jacocoAggregatedReportReports are generated at:
| Report | Location |
|---|---|
| Aggregated (unit + integration) | code-coverage/build/reports/jacoco/jacocoAggregatedReport/html/index.html |
| Plugin unit tests | plugin/build/reports/jacoco/test/html/index.html |
| App1 integration tests | examples/app1/build/reports/jacoco/jacocoIntegrationTestReport/html/index.html |
The aggregated report is also produced automatically as part of ./gradlew build, so you can view it after any full
build.
- Create a feature branch from the current release branch (e.g.,
0.1.x):feature/short-descriptionfor new featuresfix/short-descriptionfor bug fixesdocs/short-descriptionfor documentation changesrefactor/short-descriptionfor refactoring
These branch prefixes are used by release-drafter to automatically categorize changes in release notes.
- Language: Groovy on Java (see
.sdkmanrcfor exact versions) - Framework: Grails
- Testing: Spock Framework on JUnit Platform
- Follow existing code conventions in the project
- Always use lazy APIs:
tasks.register(),tasks.named(),configureEach,provider {} - Never use eager task creation (
tasks.create(),project.task()) - If two or more subprojects share build logic, extract it into a convention plugin in
conventions/
- Ensure all tests pass locally:
./gradlew build - Write tests for new functionality:
- Unit tests go in
plugin/src/test/ - Integration tests go in
examples/app1/src/integration-test/
- Unit tests go in
- Update documentation if you changed behavior or added features (in
docs/src/docs/) - Push your branch and open a pull request against the release branch
- Fill out the PR template if the repository provides one
- CI will run automatically on your PR
- A maintainer will review your changes
- You may be asked to make revisions
- Once approved, a maintainer will merge your PR
- Check this repository's existing issues before creating a new one
- Use the bug report or feature request template if the repository provides one under its "New issue" flow
If you discover a security vulnerability, do not open a public issue. Instead, please report it privately to the project maintainers and include details to help reproduce and assess the issue. Responsible disclosure helps us protect users while we investigate and prepare a fix.
By contributing to this project, you agree that your contributions will be licensed under the Apache License 2.0.