grails-core icon indicating copy to clipboard operation
grails-core copied to clipboard

Forge vs Profile dependencies for plugin and web-plugin

Open jamesfredley opened this issue 5 months ago • 1 comments

Issue description

Significant difference exist between plugins and web-plugins generated from forge and profiles. We need to decide which dependencies should be included.

After plugin and web-plugin are finalized, we will add rest-api-plugin to forge: https://github.com/apache/grails-core/issues/14932

plugin profile

console "org.apache.grails:grails-console"
developmentOnly("org.springframework.boot:spring-boot-devtools") // Spring Boot DevTools may cause performance slowdowns or compatibility issues on larger applications
implementation "org.apache.grails:grails-core"
implementation "org.apache.grails:grails-rest-transforms"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "org.springframework.boot:spring-boot-starter"
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-starter-validation"
implementation platform("org.apache.grails:grails-bom:$grailsVersion")
profile "org.apache.grails.profiles:plugin"
testImplementation "org.apache.grails:grails-testing-support-datamapping"

plugin forge

console "org.apache.grails:grails-console"
developmentOnly "org.springframework.boot:spring-boot-devtools" // Spring Boot DevTools may cause performance slowdowns or compatibility issues on larger applications
implementation "org.apache.grails:grails-core"
implementation "org.apache.grails:grails-databinding"
implementation "org.apache.grails:grails-data-hibernate5"
implementation "org.apache.grails:grails-i18n"
implementation "org.apache.grails:grails-interceptors"
implementation "org.apache.grails:grails-logging"
implementation "org.apache.grails:grails-rest-transforms"
implementation "org.apache.grails:grails-services"
implementation "org.apache.grails:grails-url-mappings"
implementation "org.apache.grails:grails-web-boot"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-starter-validation"
implementation platform("org.apache.grails:grails-bom:$grailsVersion")
profile "org.apache.grails.profiles:plugin"
runtimeOnly "com.h2database:h2"
runtimeOnly "com.zaxxer:HikariCP"
testImplementation "org.apache.grails:grails-testing-support-datamapping"
testImplementation "org.spockframework:spock-core"

web-plugin profile

console "org.apache.grails:grails-console"
developmentOnly("org.springframework.boot:spring-boot-devtools") // Spring Boot DevTools may cause performance slowdowns or compatibility issues on larger applications
implementation "org.apache.grails:grails-core"
implementation "org.apache.grails:grails-databinding"
implementation "org.apache.grails:grails-gsp"
implementation "org.apache.grails:grails-i18n"
implementation "org.apache.grails:grails-interceptors"
implementation "org.apache.grails:grails-logging"
implementation "org.apache.grails:grails-rest-transforms"
implementation "org.apache.grails:grails-scaffolding"
implementation "org.apache.grails:grails-services"
implementation "org.apache.grails:grails-url-mappings"
implementation "org.apache.grails:grails-web-boot"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "org.springframework.boot:spring-boot-starter"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "org.springframework.boot:spring-boot-starter-validation"
implementation platform("org.apache.grails:grails-bom:$grailsVersion")
integrationTestImplementation testFixtures("org.apache.grails:grails-geb")
profile "org.apache.grails.profiles:web-plugin"
runtimeOnly "cloud.wondrify:asset-pipeline-grails"
testAndDevelopmentOnly "org.webjars.npm:bootstrap"
testAndDevelopmentOnly "org.webjars.npm:bootstrap-icons"
testAndDevelopmentOnly "org.webjars.npm:jquery"
testImplementation "org.apache.grails:grails-testing-support-datamapping"
testImplementation "org.apache.grails:grails-testing-support-web"
testImplementation "org.spockframework:spock-core"

web-plugin forge

console "org.apache.grails:grails-console"
developmentOnly "org.springframework.boot:spring-boot-devtools" // Spring Boot DevTools may cause performance slowdowns or compatibility issues on larger applications
implementation "org.apache.grails:grails-core"
implementation "org.apache.grails:grails-databinding"
implementation "org.apache.grails:grails-data-hibernate5"
implementation "org.apache.grails:grails-gsp"
implementation "org.apache.grails:grails-i18n"
implementation "org.apache.grails:grails-interceptors"
implementation "org.apache.grails:grails-layout"
implementation "org.apache.grails:grails-logging"
implementation "org.apache.grails:grails-rest-transforms"
implementation "org.apache.grails:grails-scaffolding"
implementation "org.apache.grails:grails-services"
implementation "org.apache.grails:grails-url-mappings"
implementation "org.apache.grails:grails-web-boot"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "org.springframework.boot:spring-boot-starter"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "org.springframework.boot:spring-boot-starter-validation"
implementation platform("org.apache.grails:grails-bom:$grailsVersion")
profile "org.apache.grails.profiles:web-plugin"
runtimeOnly "cloud.wondrify:asset-pipeline-grails"
runtimeOnly "com.h2database:h2"
runtimeOnly "com.zaxxer:HikariCP"
runtimeOnly "org.fusesource.jansi:jansi"
testAndDevelopmentOnly "org.webjars.npm:bootstrap"
testAndDevelopmentOnly "org.webjars.npm:bootstrap-icons"
testAndDevelopmentOnly "org.webjars.npm:jquery"
testImplementation "org.apache.grails:grails-testing-support-datamapping"
testImplementation "org.apache.grails:grails-testing-support-web"
testImplementation "org.spockframework:spock-core"

rest-api-plugin profile

console "org.apache.grails:grails-console"
developmentOnly "org.springframework.boot:spring-boot-devtools" // Spring Boot DevTools may cause performance slowdowns or compatibility issues on larger applications
implementation "org.apache.grails:grails-async"
implementation "org.apache.grails:grails-codecs"
implementation "org.apache.grails:grails-core"
implementation "org.apache.grails:grails-databinding"
implementation "org.apache.grails:grails-data-hibernate5"
implementation "org.apache.grails:grails-data-mongodb-gson-templates"
implementation "org.apache.grails:grails-datasource"
implementation "org.apache.grails:grails-i18n"
implementation "org.apache.grails:grails-interceptors"
implementation "org.apache.grails:grails-logging"
implementation "org.apache.grails:grails-rest-transforms"
implementation "org.apache.grails:grails-services"
implementation "org.apache.grails:grails-url-mappings"
implementation "org.apache.grails:grails-views-gson"
implementation "org.apache.grails:grails-web-boot"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "org.springframework.boot:spring-boot-starter"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "org.springframework.boot:spring-boot-starter-validation"
implementation platform("org.apache.grails:grails-bom:$grailsVersion")
profile "org.apache.grails.profiles:rest-api-plugin"
runtimeOnly "com.h2database:h2"
runtimeOnly "com.zaxxer:HikariCP"
runtimeOnly "org.fusesource.jansi:jansi"
testImplementation "io.micronaut:micronaut-http-client:4.6.5"
testImplementation "org.apache.grails:grails-testing-support-datamapping"
testImplementation "org.apache.grails:grails-testing-support-views-gson"
testImplementation "org.apache.grails:grails-testing-support-web"
testImplementation "org.spockframework:spock-core"

jamesfredley avatar Aug 01 '25 01:08 jamesfredley

Suggested dependencies

plugin

compileOnly "org.apache.grails:grails-dependencies-starter-web"
console "org.apache.grails:grails-console"
developmentOnly "org.springframework.boot:spring-boot-devtools"
implementation platform("org.apache.grails:grails-bom:$grailsVersion")
profile "org.apache.grails.profiles:plugin"
testImplementation "org.apache.grails:grails-dependencies-test"

web-plugin

compileOnly "org.apache.grails:grails-dependencies-starter-web"
console "org.apache.grails:grails-console"
developmentOnly "org.springframework.boot:spring-boot-devtools"
implementation platform("org.apache.grails:grails-bom:$grailsVersion")
integrationTestImplementation testFixtures("org.apache.grails:grails-geb")
profile "org.apache.grails.profiles:web-plugin"
runtimeOnly "cloud.wondrify:asset-pipeline-grails"
testAndDevelopmentOnly "org.apache.grails:grails-dependencies-assets"
testImplementation "org.apache.grails:grails-dependencies-test"

rest-api-plugin

compileOnly "org.apache.grails:grails-data-mongodb-gson-templates"
compileOnly "org.apache.grails:grails-dependencies-starter-web"
compileOnly "org.apache.grails:grails-views-gson"
console "org.apache.grails:grails-console"
developmentOnly "org.springframework.boot:spring-boot-devtools"
implementation platform("org.apache.grails:grails-bom:$grailsVersion")
integrationTestImplementation testFixtures("org.apache.grails:grails-geb")
profile "org.apache.grails.profiles:web-plugin"
testImplementation "org.apache.grails:grails-dependencies-test"
testImplementation "io.micronaut:micronaut-http-client:4.6.5"
testImplementation "org.apache.grails:grails-testing-support-views-gson"

Some open to debate for web and rest-api plugins

implementation "org.apache.grails:grails-data-hibernate5"
runtimeOnly "com.h2database:h2"
runtimeOnly "com.zaxxer:HikariCP"
runtimeOnly "org.fusesource.jansi:jansi"
  • need for additional grails-dependencies-* starters

  • grails-dependencies-plugin-starter - bare min for plugin

  • grails-dependencies-rest-api-starter - grails-dependencies-web-starter + rest dependencies

  • implementation platform(“”) is nice because it applies to all default Gradle configurations, but has the downside of being added to the module json, but not the maven POM

jamesfredley avatar Aug 25 '25 22:08 jamesfredley