Skip to content

Add template sync workflow, TEMPLATE_README, and warning comments#2

Open
sbglasius wants to merge 6 commits into
mainfrom
feature/pull-request-functionality
Open

Add template sync workflow, TEMPLATE_README, and warning comments#2
sbglasius wants to merge 6 commits into
mainfrom
feature/pull-request-functionality

Conversation

@sbglasius

Copy link
Copy Markdown
Collaborator
  • Add .github/workflows/files-sync.yml: syncs infrastructure files to registered plugin repos on release, using a GitHub App for cross-org write access (gpc + grails-plugins)
  • Add .github/scripts/prepare-sync-matrix.groovy: builds GH Actions matrix from .github/projects.yml
  • Add .github/projects.yml: registry of target repos for the sync
  • Add TEMPLATE_README.md: guide for new plugins and migration path
  • Prepend "do not edit" warning comments to all synced files (workflows, scripts, build-logic convention plugins)

sbglasius and others added 2 commits May 13, 2026 15:08
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sbglasius sbglasius changed the base branch from feature/initial-functionality to main May 13, 2026 18:26
@sbglasius

Copy link
Copy Markdown
Collaborator Author

@jdaugherty @matrei the idea here is, that this template project will automatically make PRs on child projects (mentioned in .github/projects.yml) when a new version of the template project is released.

@sbglasius sbglasius force-pushed the feature/pull-request-functionality branch 4 times, most recently from 81a9b5d to 4925253 Compare May 14, 2026 11:43
@sbglasius sbglasius force-pushed the feature/pull-request-functionality branch from 6344062 to 6a3da24 Compare May 22, 2026 09:27
Copilot AI and others added 3 commits May 22, 2026 11:28
* Missing codestyle and codecoverage added, fixing codenarc violations
* correct plugin test task path and load project metadata in docs build
* allow publish jobs for both grails-plugins and gpc orgs
* Potential fix for pull request finding
* correct contributor name typo and duplicated wording in docs
* correct typo in documentation URL (templatae -> template)
- Add .github/workflows/files-sync.yml: syncs infrastructure files to
  registered plugin repos on release, using a GitHub App for cross-org
  write access (gpc + grails-plugins)
- Add .github/scripts/prepare-sync-matrix.groovy: builds GH Actions
  matrix from .github/projects.yml
- Add .github/projects.yml: registry of target repos for the sync
- Add TEMPLATE_README.md: guide for new plugins and migration path
- Prepend "do not edit" warning comments to all synced files
  (workflows, scripts, build-logic convention plugins)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR turns the repository into a reusable Grails plugin template with standardized Gradle multi-project structure, CI/release automation, and a new GitHub Actions workflow to sync “infrastructure” files into registered downstream plugin repos.

Changes:

  • Adds a template file-sync workflow (.github/workflows/files-sync.yml) plus registry/matrix tooling (.github/projects.yml, .github/scripts/prepare-sync-matrix.groovy).
  • Introduces a full multi-project Gradle layout (composite build-logic convention plugins, plugin/, docs/, examples/app1/, code-coverage/).
  • Adds template documentation and contributor guidance (TEMPLATE_README.md, updated README/docs/skills/agents content).

Reviewed changes

Copilot reviewed 76 out of 95 changed files in this pull request and generated 19 comments.

Show a summary per file
File Description
TEMPLATE_README.md New “how to use/migrate to template” guide.
settings.gradle Defines composite build + multi-project structure and dependency resolution.
README.md Repository overview + install snippet + docs link.
project.yml Central metadata for publishing/docs/index generation.
plugin/src/main/groovy/grails/plugins/template/PluginTemplateGrailsPlugin.groovy Adds a basic plugin descriptor class.
plugin/grails-app/conf/plugin.yml Adds placeholder plugin config file.
plugin/build.gradle Applies convention plugins + declares plugin dependencies.
plugin/grails-app/assets/stylesheets/export.css Adds plugin CSS asset.
plugin/grails-app/assets/images/skin/readme.txt Third-party icon attribution text.
plugin/grails-app/assets/images/skin/csv.png Plugin asset image.
plugin/grails-app/assets/images/skin/excel.png Plugin asset image.
plugin/grails-app/assets/images/skin/ods.png Plugin asset image.
plugin/grails-app/assets/images/skin/pdf.png Plugin asset image.
plugin/grails-app/assets/images/skin/rtf.png Plugin asset image.
plugin/grails-app/assets/images/skin/xml.png Plugin asset image.
plugin/grails-app/assets/images/skin/shadow.jpg Plugin asset image.
LICENSE.txt Adds Apache 2.0 license text.
gradlew Adds Gradle wrapper script (POSIX).
gradlew.bat Adds Gradle wrapper script (Windows).
gradle/wrapper/gradle-wrapper.properties Pins Gradle distribution for wrapper.
gradle/wrapper/gradle-wrapper.jar Wrapper jar artifact.
gradle.properties Central version properties (Grails, tooling, build flags).
gradle/publish.gradle Legacy publish script (currently appears unused).
gradle/documentation.gradle Legacy docs script (currently appears unused).
build.gradle Root build applying root-level convention plugins.
code-coverage/build.gradle Declares aggregated coverage convention plugin usage.
build-logic/settings.gradle Composite build settings for convention plugins.
build-logic/build.gradle Convention-plugin build dependencies (yaml, Grails plugins, Asciidoctor, etc.).
build-logic/config/checkstyle/checkstyle.xml Checkstyle configuration for the template.
build-logic/config/checkstyle/checkstyle-suppressions.xml Checkstyle suppressions file (empty baseline).
build-logic/config/codenarc/codenarc.groovy CodeNarc ruleset for Groovy sources.
build-logic/src/main/groovy/config.compile.gradle Convention: Java/Groovy compile settings and Java version resolution from .sdkmanrc.
build-logic/src/main/groovy/config.testing.gradle Convention: JUnit Platform + test-logger setup.
build-logic/src/main/groovy/config.grails-plugin.gradle Convention: Grails plugin + asset pipeline setup.
build-logic/src/main/groovy/config.grails-assets.gradle Convention: asset-pipeline webjars includes/excludes.
build-logic/src/main/groovy/config.example-app.gradle Convention: example app plugins composition.
build-logic/src/main/groovy/config.docs.gradle Convention: docs aggregation (Groovydoc + Asciidoctor).
build-logic/src/main/groovy/config.publish.gradle Convention: publish metadata wiring from project.yml.
build-logic/src/main/groovy/config.publish-root.gradle Root publish workaround (Nexus publish plugin issue).
build-logic/src/main/groovy/config.project-metadata.gradle Loads project.yml into Gradle extra properties.
build-logic/src/main/groovy/config.code-style.gradle Convention: Checkstyle + CodeNarc setup.
build-logic/src/main/groovy/config.code-coverage.gradle Convention: JaCoCo unit/integration report wiring.
build-logic/src/main/groovy/config.code-coverage-aggregate.gradle Convention: aggregate JaCoCo across subprojects.
build-logic/src/main/groovy/config.app-run.gradle Convention: bootRun debug flags.
docs/build.gradle Docs build using Asciidoctor + metadata.
docs/src/docs/index.adoc Asciidoctor entrypoint.
docs/src/docs/index.tmpl HTML template for gh-pages version index generation.
docs/src/docs/introduction.adoc Introduction page composition.
docs/src/docs/introduction/license.adoc License section.
docs/src/docs/introduction/acknowledgements.adoc Contributors section.
docs/src/docs/introduction/sourceCode.adoc Source/issues links section.
examples/app1/build.gradle Example app build + dependency on the plugin-under-test.
examples/app1/grails-app/init/grails/plugins/template/Application.groovy Example app entrypoint.
examples/app1/grails-app/controllers/grails/plugins/template/UrlMappings.groovy Example app URL mappings.
examples/app1/grails-app/controllers/grails/plugins/template/TestController.groovy Example controller scaffold.
examples/app1/grails-app/views/layouts/main.gsp Example app layout.
examples/app1/grails-app/views/test/index.gsp Example “welcome/status” view.
examples/app1/grails-app/conf/application.yml Example app config (profile, mime types, datasource, etc.).
examples/app1/grails-app/conf/logback.xml Example app logback config.
examples/app1/grails-app/assets/stylesheets/application.css Asset-pipeline manifest for example app.
examples/app1/grails-app/assets/stylesheets/errors.css Example app error styling.
examples/app1/grails-app/assets/stylesheets/grails.css Example app scaffold table styling.
examples/app1/grails-app/assets/stylesheets/welcome.css Example app UI styling (reload indicator, sorting hints).
examples/app1/grails-app/assets/images/grails.svg UI icon asset.
examples/app1/grails-app/assets/images/spring.svg UI icon asset.
examples/app1/grails-app/assets/images/spring-boot.svg UI icon asset.
examples/app1/grails-app/assets/images/java.svg UI icon asset.
examples/app1/grails-app/assets/images/groovy.svg UI icon asset.
examples/app1/grails-app/assets/images/documentation.svg UI icon asset.
examples/app1/grails-app/assets/images/community.svg UI icon asset.
examples/app1/grails-app/assets/images/advancedgrails.svg UI icon asset.
examples/app1/grails-app/assets/images/favicon.ico Favicon asset.
CONTRIBUTING.md Contributor guide (currently contains references to a different repo).
AGENTS.md Agent guidance + repository rules.
.skills/repository-structure.md “Canonical structure” skill doc.
.skills/plugin-project.md Skill doc: plugin module scope rules.
.skills/example-apps.md Skill doc: example apps + integration test patterns.
.skills/gradle-best-practices.md Skill doc: convention plugins + lazy Gradle APIs.
.sdkmanrc Pins Java/Gradle/Groovy toolchain versions.
.gitignore Ignore rules for Gradle/IDEs/build artifacts.
.github/dependabot.yml Dependabot configuration for Gradle + GitHub Actions.
.github/renovate.json Renovate configuration and grouping rules.
.github/release-drafter.yml Release Drafter configuration and auto-labeling.
.github/dependency-graph/external-references.yml GitHub dependency graph external package association (Maven purl).
.github/projects.yml Registry of downstream repos for file sync.
.github/scripts/update-versions.groovy Updates project.yml versions based on gh-pages dirs; generates build/ghpages.html.
.github/scripts/update-contributors.groovy Updates project.yml contributors via GitHub API/GraphQL.
.github/scripts/prepare-sync-matrix.groovy Builds sync matrix JSON from .github/projects.yml.
.github/workflows/ci.yml CI workflow for build/test + snapshot publish + docs deploy.
.github/workflows/release.yml Multi-stage release workflow (stage, release, docs, bump).
.github/workflows/release-notes.yml Release drafter automation workflow.
.github/workflows/update-contributors.yml Workflow to update contributors block in project.yml.
.github/workflows/update-versions.yml Workflow to update versions + gh-pages index.
.github/workflows/files-sync.yml New workflow to sync infrastructure files into registered downstream repos.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread gradlew
NONSTOP* ) nonstop=true ;;
esac

CLASSPATH="\\\"\\\""
Comment thread settings.gradle
Comment on lines +39 to +43
include('plugin')
project(':plugin').name = 'grails-plugin-template'
include('docs')
project(':docs').name = 'grails-plugin-template-docs'
include('code-coverage')
Comment on lines +109 to +133
# Workflow files — exclude files-sync.yml (template-only)
mkdir -p target/.github/workflows/
rsync -a --delete --exclude='files-sync.yml' \
source/.github/workflows/ target/.github/workflows/

# Scripts — exclude prepare-sync-matrix.groovy (template-only)
mkdir -p target/.github/scripts/
rsync -a --exclude='prepare-sync-matrix.groovy' \
source/.github/scripts/ target/.github/scripts/

# GitHub config singles (lock-aware)
maybe_copy .github/dependabot.yml .github/dependabot.yml
maybe_copy .github/renovate.json .github/renovate.json
maybe_copy .github/release-drafter.yml .github/release-drafter.yml

# Directories
mkdir -p target/.github/dependency-graph/
rsync -a source/.github/dependency-graph/ target/.github/dependency-graph/
mkdir -p target/.skills/
rsync -a --delete source/.skills/ target/.skills/
mkdir -p target/build-logic/
rsync -a source/build-logic/ target/build-logic/
mkdir -p target/gradle/
rsync -a source/gradle/ target/gradle/

Comment thread CONTRIBUTING.md
@@ -0,0 +1,162 @@
# Contributing to Export
Comment thread CONTRIBUTING.md
Comment on lines +24 to +25
git clone https://github.com/gpc/grails-export.git
cd export
## Directory Layout

```
export/
Comment thread TEMPLATE_README.md
Comment on lines +26 to +29
include('plugin')
project(':plugin').name = 'grails-my-plugin' // artifact ID
include('docs')
project(':docs').name = 'grails-my-plugin-docs'
Comment thread TEMPLATE_README.md
Comment on lines +103 to +106
include('plugin')
project(':plugin').name = 'grails-my-plugin'
include('docs')
project(':docs').name = 'grails-my-plugin-docs'
Comment thread docs/build.gradle
Comment on lines +21 to +23
projectUrl : "https://github.com/${githubOrg}/${githubProject}",
sourcedir : "${rootProject.allprojects.find { it.name == 'grails-plugin-template' }.projectDir}/src/main/groovy",
grailsVersion : grailsVersion
Comment on lines +11 to +14

implementation project(':grails-plugin-template')

implementation platform("org.apache.grails:grails-bom:$grailsVersion")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants