Thank you for your interest in contributing! This guide will help you get started.
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 https://github.com/grails-plugins/grails-server-timing.git
cd grails-server-timing
# Install the required SDK versions (Java 17, Gradle 8.14.4, Groovy 4.0.30)
sdk env install
# Build the project
./gradlew buildgrails-server-timing/
├── plugin/ # The publishable Grails plugin (source + unit tests ONLY)
├── examples/app1/ # Example app with integration tests
├── code-coverage/ # JaCoCo coverage aggregation
├── build-logic/ # Gradle convention plugins (shared build configuration)
├── docs/ # Asciidoctor documentation
└── .skills/ # AI agent best-practice docs
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
build-logic/deduplicate build configuration. Never usesubprojects {},allprojects {}, orconfigure()blocks in the rootbuild.gradle.
# Full build (compile + all tests)
./gradlew build
# Plugin unit tests only
./gradlew :grails-server-timing: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 4.0 on Java 17
- Framework: Grails 7.0
- Testing: Spock Framework on JUnit Platform
- Follow existing code conventions in the project
- Metric names must conform to RFC 7230 token rules
- Use
System.nanoTime()for timing precision
- 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
build-logic/
- 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 completely
- 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
- Use the bug report template for bugs
- Use the feature request template for enhancements
- Check existing issues before creating a new one
If you discover a security vulnerability, do not open a public issue. Please see SECURITY.md for responsible disclosure instructions.
By contributing to this project, you agree that your contributions will be licensed under the Apache License 2.0.