Add grails-multi-module v8 guide (rename of grails-multi-project-build)#498
Merged
jamesfredley merged 1 commit intomasterfrom May 3, 2026
Merged
Add grails-multi-module v8 guide (rename of grails-multi-project-build)#498jamesfredley merged 1 commit intomasterfrom
jamesfredley merged 1 commit intomasterfrom
Conversation
Real-world Grails 8 multi-project layout: one shared-core Grails Plugin
(domain model + GORM data services), two web apps (customer + admin)
that depend on it via implementation project(':shared-core') and build
to independent bootJars sharing the same data model.
Companion conf/guides.yml change repoints the existing v4 entry from
grails-guides/grails-multi-project-build to the freshly-renamed
grails-guides/grails-multi-module. The original master branch (and
forensic/grails4 etc.) is preserved on the renamed repo.
The 12 chapters cover:
- Getting Started (whatYouWillBuild, requirements, howto)
- Generate the Three Module Starters (web_plugin + 2 web)
- Root settings.gradle and build.gradle (subprojects { repositories,
useJUnitPlatform } pattern)
- The shared-core Plugin (Book domain + @service(Book) BookService data
service)
- The Two Webapps Consume shared-core (single-line dependency, package
separation customer.* / admin.* / example.*)
- Running and Packaging Each Webapp (independent bootRun + bootJar)
- Per-Module Testing (each module owns its own test suite)
- Extracting a Plugin From a Monolith (six-step migration recipe)
- Failure Modes (circular deps, GORM mapping conflicts, schema
migration coordination)
Verified locally:
./gradlew validateGuides -PvalidationMode=both
[validateGuides] mode=both: 86 guide(s) parsed, 0 SKIP-warned, 0 errors
./gradlew renderGuide_grails_multi_module_8 --rerun-tasks --no-configuration-cache
Renders all 12 chapter HTML pages, no Unresolved directive errors.
The mode=both pass also confirms the renamed repo + branch resolve.
Assisted-by: claude-code:claude-opus-4-7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the Grails 8 Multi-Project Build guide as the sixth Grails 8 sample-app-flavour guide. Following PRs #479, #493, #494, #495, #496, #497.
A real-world layout: one shared-core Grails Plugin (
Bookdomain +@Service(Book)BookService), two web apps (webapp-customerread-only catalog,webapp-adminfull CRUD) that depend on the plugin viaimplementation project(':shared-core')and build to independent bootJars sharing the same data model.Companion conf/guides.yml change (rename of upstream repo)
The upstream repo
grails-guides/grails-multi-project-buildwas renamed tograils-guides/grails-multi-module. The v4 entry'ssampleRef.repo(line 2923) is repointed at the new canonical name; themasterand forensic branches are preserved on the renamed repo so the v4 guide still resolves.Module layout
grails-multi-module/ |-- settings.gradle # include 'shared-core', 'webapp-customer', 'webapp-admin' |-- build.gradle # subprojects { repositories + useJUnitPlatform } |-- shared-core/ # Grails Plugin (web_plugin from forge) | -- grails-app/ | |-- domain/example/Book.groovy | -- services/example/BookService.groovy # @Service(Book) interface |-- webapp-customer/ # Grails web app | |-- build.gradle # implementation project(':shared-core') | -- grails-app/controllers/customer/CatalogController.groovy -- webapp-admin/ # Grails web app |-- build.gradle # implementation project(':shared-core') -- grails-app/controllers/admin/BookController.groovyWhat's in the PR
conf/guides.yml- newgrails-multi-moduleregistry entry (alphabetical insertion beforegrails-multi-project-build) plus the v4-entry repo-name update.guides/grails-multi-module/v8/guide/*.adoc- 12 chapters.guides/grails-multi-module/v8/snippets/- vendoredsettings.gradle,build.gradle,Book.groovy,BookService.groovy,BookController.groovy(admin),CatalogController.groovy(customer).Upstream sample app
grails-guides/grails-multi-moduleon the newgrails8branch (default).initial/is intentionally empty and points readers at the three forge URLs.complete/is the assembled three-module workspace.Verification
./gradlew validateGuides -PvalidationMode=bothreturns 86 guides, 0 errors../gradlew renderGuide_grails_multi_module_8 --rerun-tasks --no-configuration-cacherenders all 12 chapter HTML pages, no Unresolved directive errors.Notes for reviewers
grails-guides/*repo to a sharper name.