Skip to content

Convert Grails Forge to Grails 8 and fold it into the root build - #16337

Open
jamesfredley wants to merge 7 commits into
8.0.xfrom
feat/grails-forge-as-grails-app
Open

jamesfredley wants to merge 7 commits into
8.0.xfrom
feat/grails-forge-as-grails-app

Conversation

@jamesfredley

@jamesfredley jamesfredley commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

If 8.0 has no room, let's consider for Grails 8.1 or 9.0.

Summary

Convert Grails Forge from its Micronaut runtime to a Grails 8 Spring application, then fold Forge into the root Gradle build so it is no longer a nested project.

  • Replace Micronaut dependency injection with Spring components.
  • Add grails-forge-web as the hosted Grails REST application.
  • Preserve the existing Forge HTTP paths and CLI command names. No intended HTTP API, URL, or CLI command breaking changes.
  • Package Elastic Beanstalk as grails-forge-web-aws.zip (app.jar, Procfile, start.sh).
  • Remove the Micronaut Netty and PostgreSQL analytics applications. Analytics reporting is disabled and PostgreSQL is no longer required.
  • Update the AWS Elastic Beanstalk workflow and documentation. Operators deploy a selected Forge slot through the Forge - AWS Elastic Beanstalk Deploy workflow using AWS_FORGE_DEPLOY_ROLE_ARN.
  • Take Groovy, Spock, and related versions from grails-bom (Groovy 5.1.2). Isolate grails-forge-test-core groovyc from Gradle TestKit's Groovy 4.
  • Include Forge as root subprojects (grails-cli, grails-forge-api, grails-forge-cli, grails-forge-core, grails-forge-web, grails-forge-test-core). Move Forge buildSrc into build-logic. Remove the nested Forge Gradle build, wrapper, and settings.
  • Snapshot publish waits for buildForge, then publishes Forge once with grails-core. Core CI build -PonlyCoreTests disables Forge tasks so Forge assemble, shadow JAR, dist zip, and the test-case Maven publish chain do not run on core jobs.
  • Groovy snapshot canary uses -PskipForgeTests (not -PonlyCoreTests) so Forge generate-app tests stay on dedicated Forge jobs. Nested generated apps search build/local-maven and cannot resolve the canary's Groovy snapshot from ~/.m2. -PonlyCoreTests would also skip Hibernate, MongoDB, and functional suites that canary is meant to run.
  • Local hosted generator: ./gradlew :grails-forge-web:bootRun

Build topology

Forge is part of the root Gradle build. It is no longer an included nested build.

Verification

  • Forge module tests (api, core, cli, web, test-core)
  • javadoc / checkstyleMain
  • Root build -PonlyCoreTests --dry-run has no Forge publication chain

If 8.0 has no room, consider 8.1 or 9.0.

Host the Forge generator as a Grails web app with Spring DI. Keep the public HTTP paths and CLI command names. Remove the Micronaut Netty and Postgres analytics modules. Keep Forge as a nested Gradle build for this change.
@codecov

codecov Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.2592%. Comparing base (3067d0a) to head (ed24732).

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##                8.0.x     #16337        +/-   ##
==================================================
+ Coverage     55.2582%   55.2592%   +0.0010%     
+ Complexity      20976      20972         -4     
==================================================
  Files            2113       2113                
  Lines          101632     101632                
  Branches        18045      18045                
==================================================
+ Hits            56160      56161         +1     
+ Misses          37422      37419         -3     
- Partials         8050       8052         +2     

see 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Drop the Forge Groovy 4.0.33 pin so Forge takes Groovy 5, Spock,
Jackson, Ant, Objenesis, and JUnit Platform from grails-bom. Isolate
test-core groovyc onto BOM Groovy so Gradle TestKit cannot compile
against Groovy 4. Fix unused javadoc @PARAM tags and unused imports
that failed Forge Code Style and javadoc CI.
Forge modules are now root subprojects instead of a nested composite build. Snapshot publish waits for Forge tests and publishes Forge artifacts once with the rest of grails-core.
Root build -PonlyCoreTests still assembled Forge and published the
test-case Maven repo through skipped Test dependsOn. Disable Forge
subproject tasks for core-only builds, wire that publish chain only
when Forge tests actually run, and point generateBomDocumentation at
extractConstraints outputs so it does not collide with publish files.
@jamesfredley jamesfredley changed the title Replace Micronaut Forge runtime with Grails 8 Convert Grails Forge to Grails 8 and fold it into the root build Sep 14, 2026
After folding Forge into the root build, canary testShard selected
Forge generate-app tests. Nested generated-app builds cannot resolve
the canary-built Groovy snapshot from ~/.m2; they search
build/local-maven. Dedicated Forge CI jobs already cover those tests
with released Groovy. Do not use onlyCoreTests here: that would also
skip Hibernate, MongoDB, and functional suites this canary is meant
to run.

Assisted-by: Sisyphus:xai/grok-4.6
@jamesfredley

Copy link
Copy Markdown
Contributor Author

At Community over Code we are going to focus on application generation in Profiles vs Forge. I think we will always have a website application generator, so I went ahead and created this PR, so we can eat our own dog food.

@jamesfredley
jamesfredley marked this pull request as ready for review September 15, 2026 01:36
Copilot AI lite review requested due to automatic review settings September 15, 2026 01:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

One or more issues must be addressed before approval.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Migrates Grails Forge from Micronaut to Grails 8/Spring and integrates its modules into the root Gradle build.

Changes:

  • Adds Spring-based hosted Forge controllers and Elastic Beanstalk packaging.
  • Moves Forge build logic, tests, publishing, and CI into the root build.
  • Removes Netty/Lambda deployment and analytics infrastructure.
File summaries
File Description
threat-model.yaml Updated as part of this pull request.
RELEASE.md Updated as part of this pull request.
INSTALL Updated as part of this pull request.
grails-forge/test-core/src/test/groovy/org/grails/forge/utils/CommandSpec.groovy Updated as part of this pull request.
grails-forge/test-core/src/test/groovy/org/grails/forge/cli/command/CreateTagLibSpec.groovy Updated as part of this pull request.
grails-forge/test-core/src/test/groovy/org/grails/forge/cli/command/CreateServiceSpec.groovy Updated as part of this pull request.
grails-forge/test-core/src/test/groovy/org/grails/forge/cli/command/CreateInterceptorSpec.groovy Updated as part of this pull request.
grails-forge/test-core/src/test/groovy/org/grails/forge/cli/command/CreateControllerSpec.groovy Updated as part of this pull request.
grails-forge/sam-local.yml Updated as part of this pull request.
grails-forge/infrastructure/shared.yaml Updated as part of this pull request.
grails-forge/infrastructure/README.md Updated as part of this pull request.
grails-forge/infrastructure/environment.yaml Updated as part of this pull request.
grails-forge/grails-forge-web/grails-app/controllers/org/grails/forge/web/SelectOptionsController.groovy Updated as part of this pull request.
grails-forge/grails-forge-web/grails-app/conf/logback.xml Updated as part of this pull request.
grails-forge/grails-forge-web/grails-app/conf/application.yml Updated as part of this pull request.
grails-forge/grails-forge-web/aws/start.sh Updated as part of this pull request.
grails-forge/grails-forge-web/aws/Procfile Updated as part of this pull request.
grails-forge/grails-forge-web/aws/.platform/nginx/conf.d/proxy.conf Updated as part of this pull request.
grails-forge/grails-forge-web-netty/src/main/resources/META-INF/native-image/org.grails.forge/grails-forge-web-netty/resource-config.json Updated as part of this pull request.
grails-forge/grails-forge-web-netty/src/main/resources/META-INF/native-image/org.grails.forge/grails-forge-web-netty/native-image.properties Updated as part of this pull request.
grails-forge/grails-forge-web-netty/src/main/resources/logback.xml Updated as part of this pull request.
grails-forge/grails-forge-web-netty/src/main/resources/application.yml Updated as part of this pull request.
grails-forge/grails-forge-web-netty/src/main/resources/application-dev.yml Updated as part of this pull request.
grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/options/GormImplSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/ForgeCoreConfigurationSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/fixture/CommandOutputFixture.groovy Updated as part of this pull request.
grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/TestContainersSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/SQLServerSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/PostgresSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/Neo4JGormSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/MySQLSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/GrailsDataMongoDBSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/BuildBuilder.groovy Updated as part of this pull request.
grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/build/gradle/GradleSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/BeanContextSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/ApplicationContextSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/util/VersionInfo.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/util/ThrowingSupplier.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/template/api/grailsForgeApi.rocker.raw Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/options/TestFramework.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/options/ServletImpl.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/options/Language.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/options/GormImpl.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/options/FeatureFilter.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/options/DevelopmentReloading.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/options/BuildTool.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/io/OutputUtils.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/ForgeCoreConfiguration.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/web/GrailsWeb.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/view/Scaffolding.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/view/markup/ViewMarkup.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/view/json/ViewJson.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/view/GrailsLayout.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/view/GrailsGsp.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/validation/OneOfFeatureValidator.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/validation/CompositeFeatureValidator.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/test/ViewsJsonTestingSupport.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/test/Spock.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/test/MockitoValidator.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/test/Mockito.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/test/GrailsWebTestingSupport.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/test/GormTestingSupport.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/test/GebWithWebDriverBinaries.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/test/GebWithTestcontainers.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/spring/SpringResources.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/spring/SpringBootVirtualThreads.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/spring/SpringBootUndertowFeature.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/spring/SpringBootTomcatFeature.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/spring/SpringBootStarterFeature.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/spring/SpringBootJettyFeature.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/spring/SpringBootAutoconfigure.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/sitemesh3/Sitemesh3.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/security/SpringBootStarterSecurity.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/security/GrailsSpringSecurityUi.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/security/GrailsSpringSecurity.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/reloading/SpringBootDevTools.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/reloading/Jrebel.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/other/ShadePlugin.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/other/Readme.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/other/HibernateValidator.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/other/GrailsQuartz.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/other/AppName.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/migration/DatabaseMigrationPlugin.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/micronaut/MicronautHttpClient.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/micronaut/GrailsMicronautValidator.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/micronaut/GrailsMicronaut.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/logging/LogbackConfig.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/logging/Logback.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/lang/groovy/GrailsApplication.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/grailsWrapper/GrailsWrapper.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/grailsProfiles/GrailsProfiles.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/grails/GrailsWebConsole.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/grails/GrailsUrlMappings.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/grails/GrailsGradlePlugin.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/grails/GrailsDefaultPlugins.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/grails/GrailsBase.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/github/workflows/plain/PlainGithubWorkflowFeature.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/FeatureContext.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/Feature.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/SQLServer.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/PostgreSQL.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/Neo4jGorm.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/MySQL.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/MongoSync.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/MongoDBTestingSupportValidator.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/MongoDBTestingSupport.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/H2.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/GraphqlGorm.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/GrailsDataMongoDB.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/GrailsDataHibernateValidator.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/GrailsDataHibernate7.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/GrailsDataHibernate5.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/AsyncGorm.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/config/Yaml.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/config/Properties.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/config/BootstrapConfiguration.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/config/ApplicationConfiguration.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/cache/GrailsCache.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/cache/EHCache.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/GradleSettingsFile.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/GradleBuildSrc.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/Gradle.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/BaseAvailableFeatures.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/AvailableFeatures.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/assetPipeline/AssetPipeline.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/asciidoctor/Asciidoctor.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/ApplicationFeature.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/diff/FeatureDiffer.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/defaults/LanguageDefaults.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/build/gradle/MavenLocalRepository.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/build/gradle/MavenCentralRepository.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/build/gradle/GradleRepository.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/build/gradle/GradleConfiguration.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/build/gradle/DefaultGradleRepository.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/build/dependencies/DependencyCoordinate.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/build/dependencies/DependencyContext.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/build/dependencies/DefaultCoordinateResolver.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/build/dependencies/Coordinate.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/build/BuildPlugin.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/application/WebPluginAvailableFeatures.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/application/WebAvailableFeatures.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/application/RestApiAvailableFeatures.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/application/PluginAvailableFeatures.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/application/OperatingSystem.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/application/generator/ProjectGenerator.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/application/ContextFactory.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/application/ApplicationType.java Updated as part of this pull request.
grails-forge/grails-forge-cli/src/test/groovy/org/grails/forge/cli/CommandFixture.groovy Updated as part of this pull request.
grails-forge/grails-forge-cli/src/test/groovy/org/grails/forge/cli/command/CreateTagLibCommandSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-cli/src/test/groovy/org/grails/forge/cli/command/CreateServiceCommandSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-cli/src/test/groovy/org/grails/forge/cli/command/CreateJobCommandSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-cli/src/test/groovy/org/grails/forge/cli/command/CreateInterceptorCommandSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-cli/src/test/groovy/org/grails/forge/cli/command/CreateDomainClassCommandSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-cli/src/test/groovy/org/grails/forge/cli/command/CreateControllerCommandSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-cli/src/test/groovy/org/grails/forge/cli/command/CodeGenCommandSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-cli/src/test/groovy/org/grails/forge/cli/command/ApplicationCommandSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-cli/src/main/java/org/grails/forge/cli/util/GrailsVersionProvider.java Updated as part of this pull request.
grails-forge/grails-forge-cli/src/main/java/org/grails/forge/cli/CommonOptionsMixin.java Updated as part of this pull request.
grails-forge/grails-forge-cli/src/main/java/org/grails/forge/cli/command/ServletImplConverter.java Updated as part of this pull request.
grails-forge/grails-forge-cli/src/main/java/org/grails/forge/cli/command/ListFeatures.java Updated as part of this pull request.
grails-forge/grails-forge-cli/src/main/java/org/grails/forge/cli/command/GormImplConverter.java Updated as part of this pull request.
grails-forge/grails-forge-cli/src/main/java/org/grails/forge/cli/command/CreateTagLibCommand.java Updated as part of this pull request.
grails-forge/grails-forge-cli/src/main/java/org/grails/forge/cli/command/CreateServiceCommand.java Updated as part of this pull request.
grails-forge/grails-forge-cli/src/main/java/org/grails/forge/cli/command/CreatePluginCommand.java Updated as part of this pull request.
grails-forge/grails-forge-cli/src/main/java/org/grails/forge/cli/command/CreateJobCommand.java Updated as part of this pull request.
grails-forge/grails-forge-cli/src/main/java/org/grails/forge/cli/command/CreateInterceptorCommand.java Updated as part of this pull request.
grails-forge/grails-forge-cli/src/main/java/org/grails/forge/cli/command/CreateDomainClassCommand.java Updated as part of this pull request.
grails-forge/grails-forge-cli/src/main/java/org/grails/forge/cli/command/CreateControllerCommand.java Updated as part of this pull request.
grails-forge/grails-forge-cli/src/main/java/org/grails/forge/cli/command/CreateAppCommand.java Updated as part of this pull request.
grails-forge/grails-forge-cli/src/main/java/org/grails/forge/cli/CliRunner.java Updated as part of this pull request.
grails-forge/grails-forge-api/src/test/resources/logback.xml Updated as part of this pull request.
grails-forge/grails-forge-api/src/test/groovy/org/grails/forge/api/SpanishResourceBundleMessageSource.groovy Updated as part of this pull request.
grails-forge/grails-forge-api/src/test/groovy/org/grails/forge/api/GrailsForgeConfigurationSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-api/src/main/resources/META-INF/native-image/org.grails.forge.api/grails-forge-api/resource-config.json Updated as part of this pull request.
grails-forge/grails-forge-api/src/main/resources/application.yml Updated as part of this pull request.
grails-forge/grails-forge-api/src/main/java/org/grails/forge/api/VersionDTO.java Updated as part of this pull request.
grails-forge/grails-forge-api/src/main/java/org/grails/forge/api/UserAgentParser.java Updated as part of this pull request.
grails-forge/grails-forge-api/src/main/java/org/grails/forge/api/SelectOptionDTO.java Updated as part of this pull request.
grails-forge/grails-forge-api/src/main/java/org/grails/forge/api/Relationship.java Updated as part of this pull request.
grails-forge/grails-forge-api/src/main/java/org/grails/forge/api/preview/PreviewDTO.java Updated as part of this pull request.
grails-forge/grails-forge-api/src/main/java/org/grails/forge/api/options/ServletImplSelectOptions.java Updated as part of this pull request.
grails-forge/grails-forge-api/src/main/java/org/grails/forge/api/options/SelectOptionsOperations.java Updated as part of this pull request.
grails-forge/grails-forge-api/src/main/java/org/grails/forge/api/options/LanguageSelectOptions.java Updated as part of this pull request.
grails-forge/grails-forge-api/src/main/java/org/grails/forge/api/options/JdkVersionSelectOptions.java Updated as part of this pull request.
grails-forge/grails-forge-api/src/main/java/org/grails/forge/api/options/GormImplSelectOptions.java Updated as part of this pull request.
grails-forge/grails-forge-api/src/main/java/org/grails/forge/api/options/DevelopmentReloadingSelectOptions.java Updated as part of this pull request.
grails-forge/grails-forge-api/src/main/java/org/grails/forge/api/options/ApplicationTypeSelectOptions.java Updated as part of this pull request.
grails-forge/grails-forge-api/src/main/java/org/grails/forge/api/LinkDTO.java Updated as part of this pull request.
grails-forge/grails-forge-api/src/main/java/org/grails/forge/api/Linkable.java Updated as part of this pull request.
grails-forge/grails-forge-api/src/main/java/org/grails/forge/api/ForgeMessages.java Updated as part of this pull request.
grails-forge/grails-forge-api/src/main/java/org/grails/forge/api/FeatureList.java Updated as part of this pull request.
grails-forge/grails-forge-api/src/main/java/org/grails/forge/api/event/ApplicationGeneratingEvent.java Updated as part of this pull request.
grails-forge/grails-forge-api/src/main/java/org/grails/forge/api/DevelopmentReloading.java Updated as part of this pull request.
grails-forge/grails-forge-api/src/main/java/org/grails/forge/api/ApplicationTypeList.java Updated as part of this pull request.
grails-forge/grails-forge-analytics-postgres/src/main/resources/logback.xml Updated as part of this pull request.
grails-forge/grails-forge-analytics-postgres/src/main/resources/databasemigrations/V1__schema.sql Updated as part of this pull request.
grails-forge/grails-forge-analytics-postgres/src/main/resources/application.yml Updated as part of this pull request.
grails-forge/grails-forge-analytics-postgres/src/main/resources/application-dev.yml Updated as part of this pull request.
grails-forge/grails-cli/src/main/groovy/org/apache/grails/cli/DelegatingShellApplication.groovy Updated as part of this pull request.
grails-forge/grails-cli-shadow/build.gradle Updated as part of this pull request.
grails-forge/gradle/wrapper/gradle-wrapper.properties Updated as part of this pull request.
grails-forge/gradle/groovy-version-pin.gradle Updated as part of this pull request.
grails-doc/build.gradle Updated as part of this pull request.
gradle/test-config.gradle Updated as part of this pull request.
gradle/spring-security-test-config.gradle Updated as part of this pull request.
gradle/redis-test-config.gradle Updated as part of this pull request.
gradle/rat-root-config.gradle Updated as part of this pull request.
gradle/publish-root-config.gradle Updated as part of this pull request.
gradle/mongodb-test-config.gradle Updated as part of this pull request.
gradle/mongodb-forked-test-config.gradle Updated as part of this pull request.
gradle/hibernate7-test-config.gradle Updated as part of this pull request.
gradle/hibernate5-test-config.gradle Updated as part of this pull request.
gradle/grails-data-tck-config.gradle Updated as part of this pull request.
gradle/functional-test-config.gradle Updated as part of this pull request.
gradle/forge-doc-config.gradle Updated as part of this pull request.
gradle.properties Updated as part of this pull request.
gradle-bootstrap/build.gradle Updated as part of this pull request.
etc/bin/verify-reproducible.sh Updated as part of this pull request.
etc/bin/test-reproducible-builds.sh Updated as part of this pull request.
build-logic/README.md Updated as part of this pull request.
build-logic/plugins/src/main/java/org/grails/forge/rocker/plugin/RockerGradleException.java Updated as part of this pull request.
build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/PublishPlugin.groovy Updated as part of this pull request.
build-logic/plugins/build.gradle Updated as part of this pull request.
AGENTS.md Updated as part of this pull request.
.github/workflows/groovy-snapshot-canary.yml Updated as part of this pull request.
.github/workflows/forge-deploy-aws.yml Updated as part of this pull request.
.github/dependabot.yml Updated as part of this pull request.
Review details
  • Files reviewed: 276/364 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +39 to +43
if (configuration != null && !configuration.isEmpty()) {
ConfigurableEnvironment environment = new StandardEnvironment();
environment.getPropertySources().addFirst(new MapPropertySource("forge-test", configuration));
context.setEnvironment(environment);
}
@testlens-app

testlens-app Bot commented Sep 15, 2026

Copy link
Copy Markdown

✅ All tests passed ✅

🏷️ Commit: ed24732
▶️ Tests: 74054 executed
⚪️ Checks: 89/89 completed


Learn more about TestLens at testlens.app/docs.

@jdaugherty

Copy link
Copy Markdown
Contributor

I agree this is the right direction, but I disagree this should be done in 8. We still haven't gotten the "required" 8.0.0-RC1 changes reviewed and this is yet another feature to review. I'd say this is fine to target for 8.1 though.

@jdaugherty jdaugherty left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Here is an initial AI review, I'll take a closer pass after these issues are looked at:

Verified locally against the grails-forge-cli runtime classpath and the grails-forge-web module at this head:

The CLI/shell boots a bare AnnotationConfigApplicationContext (ForgeContexts -> ForgeCoreConfiguration), not SpringApplication, so there is no web-application type in play and nothing to set. grails-forge-web is the only Grails application, and it is not on the CLI or grails-cli shadow-jar classpath.
Interactive shell, tab completion, --version and help all work. Startup is roughly 100 ms slower per command; numbers are inline on Application.java.

Outside the diff, .agents/skills/gradle-developer/SKILL.md still describes the nested build: line 70 lists grails-forge/ as a separate build with its own wrapper and dependencies, and line 157 says the wrapper bootstrap copies into grails-forge. Both should follow the fold-in.

return create(Map.of());
}

public static AnnotationConfigApplicationContext create(Map<String, Object> configuration) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nothing on the main classpath consumes the Environment this overload populates: there is no @Value or Environment#getProperty in grails-forge-core or grails-forge-cli, and Boot's @ConfigurationProperties binder is not registered in this plain AnnotationConfigApplicationContext, so GrailsForgeConfiguration would not bind here either (it only lives in the hosted app, where auto-configuration handles it). The only caller is ApplicationContextSpec, which passes an empty map.

Suggest removing this overload and the configuration hook in the spec rather than keeping an API that implies configuration takes effect. If a consumer is planned, the property source is only half of it; the reader has to be written as well.

static int execute(String[] args) {
boolean noOpConsole = args.length > 0 && args[0].startsWith("update-cli-config");
try (BeanContext beanContext = ApplicationContext.builder().deduceEnvironment(false).start()) {
try (AnnotationConfigApplicationContext beanContext = ForgeContexts.create()) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Every command still builds and tears down a full context here, and the interactive shell calls this once per line. With classpath scanning replacing Micronaut's compile-time DI that is noticeably more expensive. Measured locally on JDK 21, five runs each, against the grails-forge-cli runtime classpath (no shadow jar):

Command 8.0.x this PR
--version ~295 ms ~390 ms
create-app --help ~310 ms ~415 ms
create-app temp --list-features ~320 ms ~430 ms

Acceptable for one-shot grails create-app, but in the shell it is paid on every line. Suggest creating a single context in main for the interactive path and handing it to execute, so the scan runs once per session.

That would also remove the arrangement where createCommandLine() closes the context and then gives the shell a CommandLine whose GrailsPicocliFactory still references it. It works today because picocli instantiates subcommands, converters and the version provider eagerly during construction (completion, usage and version rendering after close all check out), but GrailsPicocliFactory only catches NoSuchBeanDefinitionException, so anything picocli ever creates lazily would surface as an IllegalStateException from the closed context.


private static Boolean interactiveShell = false;

private static final List<Class<? extends CodeGenCommand>> CODE_GEN_COMMANDS = List.of(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This replaces the previous getBeanDefinitions(CodeGenCommand) discovery with a static list, so a new code-gen command now has to be added here as well as written. Reasonable trade for a plain Spring context, since these commands take CodeGenConfig in their constructor and are not beans, but worth a one-line comment saying this list is the registration point. Otherwise the natural instinct is to annotate the new command and wonder why it never appears.


tasks.withType(Test).configureEach { Test testTask ->
if (forgeTestsEnabled) {
testTask.dependsOn(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This wires every forge Test task, including grails-forge-core, grails-forge-api and grails-forge-web, to publishing all root and grails-gradle publications into build/local-maven first. Only the specs that spawn a generated application's Gradle build need that repository: grails-forge-cli (CommandSpec#executeGradleCommand) and grails-forge-test-core. The GRAILS_REPO_URL specs in grails-forge-core only exercise URL parsing and never resolve anything.

With the fold-in, a plain ./gradlew :grails-forge-core:test now runs the full framework publish chain before a unit test can start, which the nested build did not do. Suggest scoping the dependsOn (and the GRAILS_REPO_URL environment) to the two modules that consume the repository, for example via a project ext flag those two build files set before applying this script.


void "only visible features are exposed"() {
void "cors origins remain overridable by environment variables"() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This asserts the text of application.yml rather than the behaviour it stands in for, so it needs editing whenever the yml changes and would still pass if the placeholders stopped being resolved. The two mechanisms behind it are untested: Boot binding grails.forge.redirect-url into GrailsForgeConfiguration inside the Grails context (the POJO test above bypasses binding), and corsConfigurationPlaceholderResolver in Application rewriting ${...} in GrailsCorsConfiguration#allowedOrigins. ForgeApiIntegrationSpec checks CORS for the literal origins but never that a placeholder was resolved, and the text/html branch of ForgeApplicationController#home is never taken.

Suggest replacing this feature with integration coverage of those branches: GET / with Accept: text/html expecting a permanent redirect to the bound URL, and an assertion after startup that no allowedOrigins entry still contains ${.



def grailsVersionsPath = layout.buildDirectory.dir('version-info')
def grailsVersionInfoTask = tasks.register('grailsVersionInfo', WriteGrailsVersionInfoTask)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Anchoring here because the task class itself moved unchanged from the forge buildSrc (a pure rename, so GitHub offers no lines in it). Now that WriteGrailsVersionInfoTask lives in shared build-logic: at line 88 of the task the GradleException is constructed without throw, so a parse failure falls through with pom == null and line 93 fails with a NullPointerException instead of the intended message. Add throw.

Comment thread grails-forge/README.md

* [Swagger / OpenAPI Doc](https://latest.grails.org/swagger-ui/index.html)
* [RAPI Doc](https://latest.grails.org/rapidoc/index.html)
* [Production API](https://latest.grails.org/)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

With the Micronaut OpenAPI endpoints gone these now point at the plain-text root, which lists the paths but not parameters or response shapes. Is a replacement API description planned (a checked-in OpenAPI document or springdoc), or is the plain-text response the API documentation going forward? Worth stating in the PR either way, since the start.grails.org UI and external tooling consume this API.

Comment thread grails-forge/README.md

## API

API documentation for the production instance can be found at:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this is important to preserve. We could take @codeconsole 's PR to auto generate this documentation like it was before.

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