Re: [PR] Restructure build [grails-core]

2025-04-05 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021025862


##
grails-plugin-i18n/build.gradle:
##
@@ -1,4 +1,50 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 api project(":grails-web")

Review Comment:
   See previous response



##
grails-plugin-url-mappings/build.gradle:
##
@@ -1,4 +1,50 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 api project(":grails-web"), project(":grails-plugin-controllers")

Review Comment:
   See previous response



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-05 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020229674


##
gradle/docs-config.gradle:
##
@@ -0,0 +1,19 @@
+apply from: 
rootProject.layout.projectDirectory.file('gradle/docs-dependencies.gradle')
+
+ext {
+includeInApiDocs = true
+}
+
+tasks.named('groovydoc', Groovydoc) {

Review Comment:
   When removing this and adding `java.withJavadocJar()` the Grails Gradle 
Plugin seems to package both javadoc and groovydoc so that when unzipping the 
javadoc jar it has duplicates of the files, so you cannot extract it. And in 
the `build/docs` directory there is a `groovydoc` and a `javadoc` dir.
   
   Shouldn't we only run `groovydoc` and package that into the `javadoc` jar, 
like I have done in this project now?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-05 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022330205


##
gradle/java-config.gradle:
##
@@ -0,0 +1,19 @@
+compileJava.options.release = javaVersion.toInteger()
+
+tasks.withType(GroovyCompile).configureEach {
+groovyOptions.encoding = 'UTF-8'
+options.encoding = 'UTF-8'
+options.fork = true
+options.forkOptions.jvmArgs = ['-Xms128M', '-Xmx1G']
+}
+
+tasks.withType(Jar).configureEach {

Review Comment:
   We should keep the JAR attributes in this PR to ensure functionality is 
preserved. We can revisit once Snapshots are up and running.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-05 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021027347


##
grails-test-suite-persistence/build.gradle:
##
@@ -1,3 +1,12 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 configurations.testCompileClasspath {
 exclude module: "grails-plugin-testing"
 }

Review Comment:
   See previous response



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-05 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020603319


##
gradle/unit-test.gradle:
##
@@ -1,129 +0,0 @@
-// todo Unify test tasks into one multithreaded execution unit with a custom 
fork frequency
-// todo Add test progress listener with dot notation.
-
-configurations {

Review Comment:
   #14096



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-05 Thread via GitHub


matrei merged PR #14093:
URL: https://github.com/apache/grails-core/pull/14093


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-05 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2023102313


##
grails-core/src/main/groovy/grails/core/DefaultGrailsApplication.java:
##
@@ -627,8 +627,8 @@ public ArtefactInfo getArtefactInfo(String artefactType) {
  * @param methodName The name of the method
  * @param args   The arguments to the method
  * @return The return value of the method
- * TODO Need to add matches for addClass(java.lang.Class) and 
addClass(GrailsClass)
  */
+// TODO Need to add matches for addClass(java.lang.Class) and 
addClass(GrailsClass)

Review Comment:
   I'm not sure, maybe since it was there before it was intentional?  I'd leave 
it for now.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-05 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022855221


##
gradle/docs-config.gradle:
##
@@ -0,0 +1,14 @@
+apply from: 
rootProject.layout.projectDirectory.file('gradle/docs-dependencies.gradle')
+
+ext {
+includeInApiDocs = true
+}
+
+tasks.named('groovydoc', Groovydoc) {

Review Comment:
   I don't think that should not be necessary when using `tasks.named()`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-05 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021024967


##
grails-logging/build.gradle:
##
@@ -1,3 +1,41 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 api project(":grails-core")

Review Comment:
   (This line has not been touched in this PR.)
   
   I have NOT gone through the dependencies sections in this PR, as I know the 
PR is blocking progress and I want to get it done.
   
   Clarifying and cleaning up dependencies can be done in incremental steps 
later.
   There is also work left to clean up the rest of the subproject build files.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-05 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022865323


##
grails-test-examples/issue-views-182/build.gradle:
##
@@ -4,18 +4,13 @@ buildscript {
 }
 dependencies {
 classpath 
"org.grails:grails-gradle-plugin:${project['grails-gradle-plugin.version']}"
-classpath 
"org.grails.plugins:views-gradle:${project['plugins-views-gradle.version']}"
 }
 }
 
 version "0.1"
 group "issueviews182"
 
 apply plugin:"org.grails.grails-web"
-apply plugin:"org.grails.plugins.views-json"

Review Comment:
   The demo33 project has json-views compilation check during build (with 
explaining comments).
   I thought it would be enough to have that smoke test in one project.



##
grails-test-examples/micronaut/build.gradle:
##
@@ -4,24 +4,16 @@ buildscript {
 }
 dependencies {
 classpath 
"org.grails:grails-gradle-plugin:${project['grails-gradle-plugin.version']}"
-classpath "org.grails.plugins:hibernate5"
 classpath 
"com.bertramlabs.plugins:asset-pipeline-gradle:${project['asset-pipeline-gradle.version']}"
 }
 }
 
 version "0.1"
 group "micronaut"
 
-apply plugin:"eclipse"
-apply plugin:"idea"
-apply plugin:"war"
 apply plugin:"org.grails.grails-web"
-apply plugin:"org.grails.grails-gsp"

Review Comment:
   See previous comment.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-05 Thread via GitHub


matrei commented on PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#issuecomment-2771802272

   > I tested grails-shell CLI zip and these changes add a doc directory with 
groovydocs (1,815 files) whereas it was 222 files total before. I think we 
should skip the docs in the zip distribution.
   
   Are you sure this has changed? I checked the previous release 
([v7.0.0-M3](https://github.com/apache/grails-core/releases/download/v7.0.0-M3/grails-7.0.0-M3.zip)),
 and it appears to include the API docs in the doc subdirectory.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-04 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022807149


##
gradle/java-config.gradle:
##
@@ -0,0 +1,19 @@
+compileJava.options.release = javaVersion.toInteger()
+
+tasks.withType(GroovyCompile).configureEach {
+groovyOptions.encoding = 'UTF-8'
+options.encoding = 'UTF-8'
+options.fork = true
+options.forkOptions.jvmArgs = ['-Xms128M', '-Xmx1G']
+}
+
+tasks.withType(Jar).configureEach {

Review Comment:
   I agree with keeping the attributes, but I do think they should be moved to 
the project that needs them (bootstrap).  I opened 
https://github.com/apache/grails-core/issues/14098 to address this after 
publishing is working.



##
gradle/java-config.gradle:
##
@@ -0,0 +1,19 @@
+compileJava.options.release = javaVersion.toInteger()
+
+tasks.withType(GroovyCompile).configureEach {
+groovyOptions.encoding = 'UTF-8'
+options.encoding = 'UTF-8'
+options.fork = true
+options.forkOptions.jvmArgs = ['-Xms128M', '-Xmx1G']
+}
+
+tasks.withType(Jar).configureEach {

Review Comment:
   I agree with keeping the attributes, but I do think they should be moved to 
the project that needs them (bootstrap).  I opened 
https://github.com/apache/grails-core/issues/14098 to address this after 
publishing is working.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-04 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020977104


##
gradle/docs-config.gradle:
##
@@ -0,0 +1,19 @@
+apply from: 
rootProject.layout.projectDirectory.file('gradle/docs-dependencies.gradle')
+
+ext {
+includeInApiDocs = true
+}
+
+tasks.named('groovydoc', Groovydoc) {

Review Comment:
   > Can you please confirm you've published to maven local before this change 
& saved off the artifacts. Then, published after this change and diffed the 
directory structure / names / files? This will ensure we haven't broken 
anything.
   
   Confirmed (after some fixes, thank you!)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-04 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020177111


##
gradle/functional-test-config.gradle:
##
@@ -0,0 +1,39 @@
+def pluginsGroupProjects = rootProject.subprojects
+.findAll { it.group == 'org.grails.plugins' }
+.collect { it.name }
+
+configurations.configureEach {

Review Comment:
   Can we leave the original comment here (slightly adjusted)?  
   
   // Test projects will often include dependencies from grails-core, 
this will ensure any dependencies included
   // will be substituted with projects in this repository instead of 
pulling upstream



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-04 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022837441


##
build.gradle:
##
@@ -35,570 +9,76 @@ ext {
 homeBinDir = layout.projectDirectory.dir('bin')
 homeConfDir = layout.projectDirectory.dir('conf')
 homeLibDir = layout.projectDirectory.dir('lib')
-homeSrcDir = layout.projectDirectory.dir('src')
-}
-
-version = grailsVersion
-group = "org.grails"
-
-// Groovy is added as a dependency to both the 'groovy' and 'compile'
-// configurations, so place the dependency in a shared variable. The
-// 'compile' is required so that Groovy appears as a dependency in the
-// artifacts' POMs.
-ext.jointBuildGroovyJarProperty = System.getProperty('groovy.jar')
-ext.groovyDependency = null
 
-ext."signing.keyId" = System.getenv("SIGNING_KEY") ?: 
project.hasProperty("signing.keyId") ? project.getProperty('signing.keyId') : 
null
-ext."signing.password" = System.getenv("SIGNING_PASSPHRASE") ?: 
project.hasProperty("signing.password") ? 
project.getProperty('signing.password') : null
-ext."signing.secretKeyRingFile" = 
project.hasProperty("signing.secretKeyRingFile") ? 
project.getProperty('signing.secretKeyRingFile') : null
-
-if (jointBuildGroovyJarProperty) {
-def jointBuildGroovyJar = file(jointBuildGroovyJarProperty)
-if (jointBuildGroovyJar.exists()) {
-groovyDependency = dependencies.create(files(jointBuildGroovyJar))
-} else {
-throw new GradleException("The groovy.jar system property points to 
${jointBuildGroovyJar.absolutePath} which does not exist.")
-}
-} else {
-groovyDependency = 
dependencies.create("org.apache.groovy:groovy:${groovyVersion}")
-}
-
-if (isReleaseVersion) {
-apply plugin: 'maven-publish'
-apply plugin: "io.github.gradle-nexus.publish-plugin"
-
-nexusPublishing {
-repositories {
-sonatype {
-def ossUser = System.getenv("SONATYPE_USERNAME") ?: 
project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : ''
-def ossPass = System.getenv("SONATYPE_PASSWORD") ?: 
project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : ''
-def ossStagingProfileId = 
System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: 
project.hasProperty("sonatypeOssStagingProfileId") ? 
project.sonatypeOssStagingProfileId : ''
-nexusUrl = uri("https://s01.oss.sonatype.org/service/local/";)
-username = ossUser
-password = ossPass
-stagingProfileId = ossStagingProfileId
-}
-}
+mappedArtifactIds = [
+// The artifactIds of these projects differ from their respective 
project names
+'grails-async-core'   : 'grails-async',
+'grails-async-plugin' : 'async',
+'grails-events-core'  : 'grails-events',
+'grails-events-plugin': 'events',
+'grails-plugin-converters': 'converters'
+]
 
-transitionCheckOptions {
-maxRetries.set(40)
-delayBetween.set(java.time.Duration.ofMillis(5000))
-}
-}
+testProjectsStartWith = [
+'grails-test-suite',
+'grails-test-examples'
+]
+testProjects = [ /* Will be populated by subprojects loop below */ ]
 }
 
 allprojects {
-if (project.name == 'grails-bom') return
-// FORCE UPGRADE OF GROOVY IN DEPENDENCIES TO GROOVY 4
-// except in projects that will be run by Gradle during the build
-if (!compiledByGradleGroovyVersion(project)) {
-configurations.configureEach {
-resolutionStrategy.eachDependency { DependencyResolveDetails 
details ->
-if (details.requested.group == 'org.codehaus.groovy' && 
details.requested.name != 'groovy-bom') {
-details.useTarget(group: 'org.apache.groovy', name: 
details.requested.name, version: groovyVersion)
-}
-}
-}
-}
-
 repositories {
 mavenCentral()
 maven { url = 'https://repo.grails.org/grails/core' }
 maven { url = 
'https://oss.sonatype.org/content/repositories/snapshots' }
 // mavenLocal() // Keep, this will be uncommented and used by CI 
(groovy-joint-workflow)
 }
-
-configurations {
-all {
-resolutionStrategy {
-def cacheHours = isCiBuild ? 0 : 24
-cacheDynamicVersionsFor cacheHours, 'hours'
-cacheChangingModulesFor cacheHours, 'hours'
-eachDependency { DependencyResolveDetails details ->
-//specifying a fixed version for all libraries with 
'org.gradle' group
-if (details.requested.group == 'org.apache.groovy') {
-details.useVersion(groovyVersion)
-}
-if (details.requested.group == "org.spockframework") {
-details.useVersion

Re: [PR] Restructure build [grails-core]

2025-04-04 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020240737


##
gradle/java-config.gradle:
##
@@ -0,0 +1,19 @@
+compileJava.options.release = javaVersion.toInteger()
+
+tasks.withType(GroovyCompile).configureEach {
+groovyOptions.encoding = 'UTF-8'
+options.encoding = 'UTF-8'
+options.fork = true
+options.forkOptions.jvmArgs = ['-Xms128M', '-Xmx1G']
+}
+
+tasks.withType(Jar).configureEach {

Review Comment:
   It seems removing the jar attributes broke `GrailsUtilTest` which is testing 
`GrailsUtil.getGrailsVersion()` which seems to be fetching the version from the 
jar attributes.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-04 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021026629


##
grails-test-suite-base/build.gradle:
##
@@ -7,4 +19,35 @@ dependencies {
 project(':grails-plugin-domain-class')
 
 api project(":grails-plugin-converters")

Review Comment:
   See previous response



##
grails-test-suite-persistence/build.gradle:
##
@@ -1,3 +1,12 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 configurations.testCompileClasspath {
 exclude module: "grails-plugin-testing"

Review Comment:
   See previous response



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-04 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020203946


##
gradle/functional-test-config.gradle:
##
@@ -0,0 +1,39 @@
+def pluginsGroupProjects = rootProject.subprojects
+.findAll { it.group == 'org.grails.plugins' }
+.collect { it.name }
+
+configurations.configureEach {
+resolutionStrategy {
+dependencySubstitution {
+for (def possibleProject : rootProject.subprojects) {
+if (!possibleProject.name.startsWith('grails-test-suite') && 
!possibleProject.name.contains('grails-test-examples')) {
+def artifactId = mappedArtifactIds[possibleProject.name] 
?: possibleProject.name
+def substitutedArtifact = "${possibleProject.name in 
pluginsGroupProjects ? 'org.grails.plugins' : 'org.grails'}:$artifactId"

Review Comment:
   If you add the substitution code in a ` project.afterEvaluate { } ` block, 
does it work? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-04 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022813397


##
grails-core/src/main/groovy/grails/core/DefaultGrailsApplication.java:
##
@@ -627,8 +627,8 @@ public ArtefactInfo getArtefactInfo(String artefactType) {
  * @param methodName The name of the method
  * @param args   The arguments to the method
  * @return The return value of the method
- * TODO Need to add matches for addClass(java.lang.Class) and 
addClass(GrailsClass)
  */
+// TODO Need to add matches for addClass(java.lang.Class) and 
addClass(GrailsClass)

Review Comment:
   By moving this comment out of the javadoc, won't this mean it won't show 
externally in the api documentation? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-04 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021069063


##
gradle/assemble-root-config.gradle:
##
@@ -5,40 +5,23 @@ import org.grails.gradle.GrailsBuildPlugin
 
 apply plugin: GrailsBuildPlugin
 
-List libsConfigurations = []
-subprojects { subproject ->
-if (subproject.name == 'grails-shell') {
-libsConfigurations << configurations.create("${subproject.name}-libs") 
{
-extendsFrom configurations.runtimeClasspath
-}
+tasks.register('collectCliDependencies') {
+ext {
+baseCachesDir = "$gradle.gradleUserHomeDir/caches"
+cacheDir = "$baseCachesDir/modules-2"
+metadata = "$cacheDir/metadata-2.1/descriptors"
 }
-}
-
-tasks.register('configurePopulateDependencies') {
-ext.set('baseCachesDir', "$gradle.gradleUserHomeDir/caches")
-ext.set('cacheDir', "$baseCachesDir/modules-2")
-ext.set('metadata', "$cacheDir/metadata-2.1/descriptors")
 doLast {
-def projectNames = rootProject.subprojects*.name
+def projectNames = subprojects*.name
 def seen = []
-libsConfigurations.each { configuration ->
-configuration.exclude(group: 'org.codehaus.groovy')
-def sourceArtifacts = 
sourcesFor(configuration).resolvedConfiguration.lenientConfiguration.artifacts.groupBy
 {
-it.moduleVersion.id
-}
-def javadocArtifacts = 
javadocFor(configuration).resolvedConfiguration.lenientConfiguration.artifacts.groupBy
 {
-it.moduleVersion.id
-}
-def pomArtifacts = 
pomFor(configuration).resolvedConfiguration.lenientConfiguration.artifacts.groupBy
 {
-it.moduleVersion.id
-}
-
-for (artifact in 
configuration.resolvedConfiguration.resolvedArtifacts) {
+project(':grails-shell').configurations.cli.with {
+exclude(group: 'org.codehaus.groovy')

Review Comment:
   Since these are compiled with the groovy version of gradle, this is ok for 
now.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022863645


##
grails-test-examples/hyphenated/build.gradle:
##
@@ -11,10 +11,6 @@ version "0.1"
 group "hyphenated"
 
 apply plugin: "org.grails.grails-web"
-apply plugin: "org.grails.grails-gsp"

Review Comment:
   The demo33 project has gsp compilation check during build (with explaining 
comments).
   I thought it would be enough to have that smoke test in one project.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020586233


##
gradle/docs-config.gradle:
##
@@ -0,0 +1,19 @@
+apply from: 
rootProject.layout.projectDirectory.file('gradle/docs-dependencies.gradle')
+
+ext {
+includeInApiDocs = true
+}
+
+tasks.named('groovydoc', Groovydoc) {

Review Comment:
   In the `grails-core` repo, there is not one single `src/main/java` source 
set.
   Which projects are we using `src/main/java` in?
   
   I don't think the solution is optimal at the moment. We are effectively 
generating and packaging both groovydoc and javadoc only to throw away the 
groovydoc when extracting the jar.
   
   Should we be advocating groovy usage, and package generated groovydoc in the 
doc jar and only use the `src/main/groovy` source set?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


jamesfredley commented on PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#issuecomment-2769756973

   I tested grails-shell CLI zip and these changes add a doc directory with 
groovydocs (1,815 files) whereas it was 222 files total before.  I think we 
should skip the docs in the zip distribution.  
   
   Additionally this issue 
https://github.com/apache/grails-core/pull/14065/files is back on Windows. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2023146794


##
grails-core/build.gradle:
##
@@ -1,10 +1,23 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 compileOnly "org.aspectj:aspectjrt", "org.aspectj:aspectjweaver"
 api "jakarta.inject:jakarta.inject-api"
 api "jakarta.persistence:jakarta.persistence-api"
 api "jakarta.annotation:jakarta.annotation-api"
 
 implementation "com.github.ben-manes.caffeine:caffeine"
+api "org.apache.groovy:groovy:$groovyVersion"

Review Comment:
   the hard coded version is likely why we have to use the override technique 
we do for groovy.  Since it already did this, I wasn't going to advocate for 
change. But eventually, we probably should pull that version from the bom 
instead.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


jdaugherty commented on PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#issuecomment-2769778729

   > I tested grails-shell CLI zip and these changes add a doc directory with 
groovydocs (1,815 files) whereas it was 222 files total before. I think we 
should skip the docs in the zip distribution.
   > 
   > Additionally this issue 
https://github.com/apache/grails-core/pull/14065/files is back on Windows.
   
   I guess we should skip the withJavadoc() for the cli project?  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022817953


##
grails-test-examples/issue-views-182/build.gradle:
##
@@ -4,18 +4,13 @@ buildscript {
 }
 dependencies {
 classpath 
"org.grails:grails-gradle-plugin:${project['grails-gradle-plugin.version']}"
-classpath 
"org.grails.plugins:views-gradle:${project['plugins-views-gradle.version']}"
 }
 }
 
 version "0.1"
 group "issueviews182"
 
 apply plugin:"org.grails.grails-web"
-apply plugin:"org.grails.plugins.views-json"

Review Comment:
   There are `gson` views in this project, can we please keep this? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


jamesfredley commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2023068828


##
grails-core/build.gradle:
##
@@ -1,10 +1,23 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 compileOnly "org.aspectj:aspectjrt", "org.aspectj:aspectjweaver"
 api "jakarta.inject:jakarta.inject-api"
 api "jakarta.persistence:jakarta.persistence-api"
 api "jakarta.annotation:jakarta.annotation-api"
 
 implementation "com.github.ben-manes.caffeine:caffeine"
+api "org.apache.groovy:groovy:$groovyVersion"

Review Comment:
   These surprised me, but they were in the POMs and did not cause version 
issues so we are fine.  



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022864387


##
grails-test-examples/issue-11102/build.gradle:
##
@@ -11,18 +11,8 @@ buildscript {
 version "0.1"
 group "issue11102"
 
-apply plugin: "war"
 apply plugin: "asset-pipeline"
 apply plugin: "org.grails.grails-web"
-apply plugin: "org.grails.grails-gsp"

Review Comment:
   See previous comment.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


jdaugherty commented on PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#issuecomment-2769620928

   > > Can we please be sure to add back the remaining gsp / gson plugins where 
I marked?
   > 
   > We could, but I think we are only wasting build time. The demo33 project 
smoke tests the Gradle plugins.
   
   We don't know how these projects would diverge over time so it's safe to add 
them to all of them.  Specifically, micronaut is likely going to be different 
than the base grails app so it's probably critical to have it there at the 
least.  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022816739


##
grails-test-examples/issue-11102/build.gradle:
##
@@ -11,18 +11,8 @@ buildscript {
 version "0.1"
 group "issue11102"
 
-apply plugin: "war"
 apply plugin: "asset-pipeline"
 apply plugin: "org.grails.grails-web"
-apply plugin: "org.grails.grails-gsp"

Review Comment:
   Looks like the project still has gsps, can we keep this? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022801189


##
build.gradle:
##
@@ -35,570 +9,76 @@ ext {
 homeBinDir = layout.projectDirectory.dir('bin')
 homeConfDir = layout.projectDirectory.dir('conf')
 homeLibDir = layout.projectDirectory.dir('lib')
-homeSrcDir = layout.projectDirectory.dir('src')
-}
-
-version = grailsVersion
-group = "org.grails"
-
-// Groovy is added as a dependency to both the 'groovy' and 'compile'
-// configurations, so place the dependency in a shared variable. The
-// 'compile' is required so that Groovy appears as a dependency in the
-// artifacts' POMs.
-ext.jointBuildGroovyJarProperty = System.getProperty('groovy.jar')
-ext.groovyDependency = null
 
-ext."signing.keyId" = System.getenv("SIGNING_KEY") ?: 
project.hasProperty("signing.keyId") ? project.getProperty('signing.keyId') : 
null
-ext."signing.password" = System.getenv("SIGNING_PASSPHRASE") ?: 
project.hasProperty("signing.password") ? 
project.getProperty('signing.password') : null
-ext."signing.secretKeyRingFile" = 
project.hasProperty("signing.secretKeyRingFile") ? 
project.getProperty('signing.secretKeyRingFile') : null
-
-if (jointBuildGroovyJarProperty) {
-def jointBuildGroovyJar = file(jointBuildGroovyJarProperty)
-if (jointBuildGroovyJar.exists()) {
-groovyDependency = dependencies.create(files(jointBuildGroovyJar))
-} else {
-throw new GradleException("The groovy.jar system property points to 
${jointBuildGroovyJar.absolutePath} which does not exist.")
-}
-} else {
-groovyDependency = 
dependencies.create("org.apache.groovy:groovy:${groovyVersion}")
-}
-
-if (isReleaseVersion) {
-apply plugin: 'maven-publish'
-apply plugin: "io.github.gradle-nexus.publish-plugin"
-
-nexusPublishing {
-repositories {
-sonatype {
-def ossUser = System.getenv("SONATYPE_USERNAME") ?: 
project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : ''
-def ossPass = System.getenv("SONATYPE_PASSWORD") ?: 
project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : ''
-def ossStagingProfileId = 
System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: 
project.hasProperty("sonatypeOssStagingProfileId") ? 
project.sonatypeOssStagingProfileId : ''
-nexusUrl = uri("https://s01.oss.sonatype.org/service/local/";)
-username = ossUser
-password = ossPass
-stagingProfileId = ossStagingProfileId
-}
-}
+mappedArtifactIds = [
+// The artifactIds of these projects differ from their respective 
project names
+'grails-async-core'   : 'grails-async',
+'grails-async-plugin' : 'async',
+'grails-events-core'  : 'grails-events',
+'grails-events-plugin': 'events',
+'grails-plugin-converters': 'converters'
+]
 
-transitionCheckOptions {
-maxRetries.set(40)
-delayBetween.set(java.time.Duration.ofMillis(5000))
-}
-}
+testProjectsStartWith = [
+'grails-test-suite',
+'grails-test-examples'
+]
+testProjects = [ /* Will be populated by subprojects loop below */ ]
 }
 
 allprojects {
-if (project.name == 'grails-bom') return
-// FORCE UPGRADE OF GROOVY IN DEPENDENCIES TO GROOVY 4
-// except in projects that will be run by Gradle during the build
-if (!compiledByGradleGroovyVersion(project)) {
-configurations.configureEach {
-resolutionStrategy.eachDependency { DependencyResolveDetails 
details ->
-if (details.requested.group == 'org.codehaus.groovy' && 
details.requested.name != 'groovy-bom') {
-details.useTarget(group: 'org.apache.groovy', name: 
details.requested.name, version: groovyVersion)
-}
-}
-}
-}
-
 repositories {
 mavenCentral()
 maven { url = 'https://repo.grails.org/grails/core' }
 maven { url = 
'https://oss.sonatype.org/content/repositories/snapshots' }
 // mavenLocal() // Keep, this will be uncommented and used by CI 
(groovy-joint-workflow)
 }
-
-configurations {
-all {
-resolutionStrategy {
-def cacheHours = isCiBuild ? 0 : 24
-cacheDynamicVersionsFor cacheHours, 'hours'
-cacheChangingModulesFor cacheHours, 'hours'
-eachDependency { DependencyResolveDetails details ->
-//specifying a fixed version for all libraries with 
'org.gradle' group
-if (details.requested.group == 'org.apache.groovy') {
-details.useVersion(groovyVersion)
-}
-if (details.requested.group == "org.spockframework") {
-details.useVer

Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


matrei commented on PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#issuecomment-2769379375

   > Can we please be sure to add back the remaining gsp / gson plugins where I 
marked?
   
   We could, but I think we are only wasting build time. The demo33 project 
smoke tests the Gradle plugins.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022859147


##
grails-core/src/main/groovy/grails/core/DefaultGrailsApplication.java:
##
@@ -627,8 +627,8 @@ public ArtefactInfo getArtefactInfo(String artefactType) {
  * @param methodName The name of the method
  * @param args   The arguments to the method
  * @return The return value of the method
- * TODO Need to add matches for addClass(java.lang.Class) and 
addClass(GrailsClass)
  */
+// TODO Need to add matches for addClass(java.lang.Class) and 
addClass(GrailsClass)

Review Comment:
   Yes, that is true. I did not recognize it as part of the javadoc, but more 
of a code comment. Do you think it should be part of public javadoc?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022832831


##
build.gradle:
##
@@ -35,570 +9,76 @@ ext {
 homeBinDir = layout.projectDirectory.dir('bin')
 homeConfDir = layout.projectDirectory.dir('conf')
 homeLibDir = layout.projectDirectory.dir('lib')
-homeSrcDir = layout.projectDirectory.dir('src')
-}
-
-version = grailsVersion
-group = "org.grails"
-
-// Groovy is added as a dependency to both the 'groovy' and 'compile'
-// configurations, so place the dependency in a shared variable. The
-// 'compile' is required so that Groovy appears as a dependency in the
-// artifacts' POMs.
-ext.jointBuildGroovyJarProperty = System.getProperty('groovy.jar')
-ext.groovyDependency = null
 
-ext."signing.keyId" = System.getenv("SIGNING_KEY") ?: 
project.hasProperty("signing.keyId") ? project.getProperty('signing.keyId') : 
null
-ext."signing.password" = System.getenv("SIGNING_PASSPHRASE") ?: 
project.hasProperty("signing.password") ? 
project.getProperty('signing.password') : null
-ext."signing.secretKeyRingFile" = 
project.hasProperty("signing.secretKeyRingFile") ? 
project.getProperty('signing.secretKeyRingFile') : null
-
-if (jointBuildGroovyJarProperty) {
-def jointBuildGroovyJar = file(jointBuildGroovyJarProperty)
-if (jointBuildGroovyJar.exists()) {
-groovyDependency = dependencies.create(files(jointBuildGroovyJar))
-} else {
-throw new GradleException("The groovy.jar system property points to 
${jointBuildGroovyJar.absolutePath} which does not exist.")
-}
-} else {
-groovyDependency = 
dependencies.create("org.apache.groovy:groovy:${groovyVersion}")
-}
-
-if (isReleaseVersion) {
-apply plugin: 'maven-publish'
-apply plugin: "io.github.gradle-nexus.publish-plugin"
-
-nexusPublishing {
-repositories {
-sonatype {
-def ossUser = System.getenv("SONATYPE_USERNAME") ?: 
project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : ''
-def ossPass = System.getenv("SONATYPE_PASSWORD") ?: 
project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : ''
-def ossStagingProfileId = 
System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: 
project.hasProperty("sonatypeOssStagingProfileId") ? 
project.sonatypeOssStagingProfileId : ''
-nexusUrl = uri("https://s01.oss.sonatype.org/service/local/";)
-username = ossUser
-password = ossPass
-stagingProfileId = ossStagingProfileId
-}
-}
+mappedArtifactIds = [

Review Comment:
   Thanks for reminding me!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022819807


##
grails-test-examples/micronaut/build.gradle:
##
@@ -4,24 +4,16 @@ buildscript {
 }
 dependencies {
 classpath 
"org.grails:grails-gradle-plugin:${project['grails-gradle-plugin.version']}"
-classpath "org.grails.plugins:hibernate5"
 classpath 
"com.bertramlabs.plugins:asset-pipeline-gradle:${project['asset-pipeline-gradle.version']}"
 }
 }
 
 version "0.1"
 group "micronaut"
 
-apply plugin:"eclipse"
-apply plugin:"idea"
-apply plugin:"war"
 apply plugin:"org.grails.grails-web"
-apply plugin:"org.grails.grails-gsp"

Review Comment:
   Can we keep gsp?  



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022816245


##
grails-test-examples/hyphenated/build.gradle:
##
@@ -11,10 +11,6 @@ version "0.1"
 group "hyphenated"
 
 apply plugin: "org.grails.grails-web"
-apply plugin: "org.grails.grails-gsp"

Review Comment:
   Looks like this project has gsps, can we keep the gsp plugin? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022813874


##
grails-docs/build.gradle:
##
@@ -1,24 +1,51 @@
+import org.codehaus.groovy.ant.Groovy
+
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 configurations {
 // Required to keep Gradle classes off the test compile classpath.
 gradleConf.extendsFrom compileClasspath
 }
 
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 gradleConf gradleApi()
+
+// grails-docs classes are used in Gradle builds,
+// so we must compile with Groovy 3 until Gradle upgrades to Groovy 4.
+compileOnly "org.codehaus.groovy:groovy:$GroovySystem.version"

Review Comment:
   thank you!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022808161


##
gradle/java-config.gradle:
##
@@ -0,0 +1,19 @@
+compileJava.options.release = javaVersion.toInteger()
+
+tasks.withType(GroovyCompile).configureEach {
+groovyOptions.encoding = 'UTF-8'
+options.encoding = 'UTF-8'
+options.fork = true
+options.forkOptions.jvmArgs = ['-Xms128M', '-Xmx1G']
+}
+
+tasks.withType(Jar).configureEach {

Review Comment:
   I agree we should address after this PR.  We should consolidate to one, but 
it's out of scope of this PR.
   
   https://github.com/apache/grails-core/issues/14098



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022805251


##
gradle/docs-config.gradle:
##
@@ -0,0 +1,14 @@
+apply from: 
rootProject.layout.projectDirectory.file('gradle/docs-dependencies.gradle')
+
+ext {
+includeInApiDocs = true
+}
+
+tasks.named('groovydoc', Groovydoc) {

Review Comment:
   Shouldn't this be .configure { }?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022803412


##
build.gradle:
##
@@ -36,569 +10,66 @@ ext {
 homeConfDir = layout.projectDirectory.dir('conf')
 homeLibDir = layout.projectDirectory.dir('lib')
 homeSrcDir = layout.projectDirectory.dir('src')
-}
-
-version = grailsVersion
-group = "org.grails"
-
-// Groovy is added as a dependency to both the 'groovy' and 'compile'
-// configurations, so place the dependency in a shared variable. The
-// 'compile' is required so that Groovy appears as a dependency in the
-// artifacts' POMs.
-ext.jointBuildGroovyJarProperty = System.getProperty('groovy.jar')
-ext.groovyDependency = null
 
-ext."signing.keyId" = System.getenv("SIGNING_KEY") ?: 
project.hasProperty("signing.keyId") ? project.getProperty('signing.keyId') : 
null
-ext."signing.password" = System.getenv("SIGNING_PASSPHRASE") ?: 
project.hasProperty("signing.password") ? 
project.getProperty('signing.password') : null
-ext."signing.secretKeyRingFile" = 
project.hasProperty("signing.secretKeyRingFile") ? 
project.getProperty('signing.secretKeyRingFile') : null
-
-if (jointBuildGroovyJarProperty) {
-def jointBuildGroovyJar = file(jointBuildGroovyJarProperty)
-if (jointBuildGroovyJar.exists()) {
-groovyDependency = dependencies.create(files(jointBuildGroovyJar))
-} else {
-throw new GradleException("The groovy.jar system property points to 
${jointBuildGroovyJar.absolutePath} which does not exist.")
-}
-} else {
-groovyDependency = 
dependencies.create("org.apache.groovy:groovy:${groovyVersion}")
-}
-
-if (isReleaseVersion) {
-apply plugin: 'maven-publish'
-apply plugin: "io.github.gradle-nexus.publish-plugin"
-
-nexusPublishing {
-repositories {
-sonatype {
-def ossUser = System.getenv("SONATYPE_USERNAME") ?: 
project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : ''
-def ossPass = System.getenv("SONATYPE_PASSWORD") ?: 
project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : ''
-def ossStagingProfileId = 
System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: 
project.hasProperty("sonatypeOssStagingProfileId") ? 
project.sonatypeOssStagingProfileId : ''
-nexusUrl = uri("https://s01.oss.sonatype.org/service/local/";)
-username = ossUser
-password = ossPass
-stagingProfileId = ossStagingProfileId
-}
-}
-
-transitionCheckOptions {
-maxRetries.set(40)
-delayBetween.set(java.time.Duration.ofMillis(5000))
-}
-}
+mappedArtifactIds = [
+// The artifactIds of these projects differ from their respective 
project names
+'grails-async-core'   : 'grails-async',
+'grails-async-plugin' : 'async',
+'grails-events-core'  : 'grails-events',
+'grails-events-plugin': 'events',
+'grails-plugin-converters': 'converters'
+]
 }
 
 allprojects {
-if (project.name == 'grails-bom') return
-// FORCE UPGRADE OF GROOVY IN DEPENDENCIES TO GROOVY 4
-// except in projects that will be run by Gradle during the build
-if (!compiledByGradleGroovyVersion(project)) {
-configurations.configureEach {
-resolutionStrategy.eachDependency { DependencyResolveDetails 
details ->
-if (details.requested.group == 'org.codehaus.groovy' && 
details.requested.name != 'groovy-bom') {
-details.useTarget(group: 'org.apache.groovy', name: 
details.requested.name, version: groovyVersion)
-}
-}
-}
-}
-
 repositories {
 mavenCentral()
 maven { url = 'https://repo.grails.org/grails/core' }
 maven { url = 
'https://oss.sonatype.org/content/repositories/snapshots' }
 // mavenLocal() // Keep, this will be uncommented and used by CI 
(groovy-joint-workflow)
 }
+}
 
-configurations {
-all {
-resolutionStrategy {
-def cacheHours = isCiBuild ? 0 : 24
-cacheDynamicVersionsFor cacheHours, 'hours'
-cacheChangingModulesFor cacheHours, 'hours'
-eachDependency { DependencyResolveDetails details ->
-//specifying a fixed version for all libraries with 
'org.gradle' group
-if (details.requested.group == 'org.apache.groovy') {
-details.useVersion(groovyVersion)
-}
-if (details.requested.group == "org.spockframework") {
-details.useVersion(project['spock.version'])
-}
-}
-}
-}
-}
-
-[Javadoc, Groovydoc].each {
-tasks.withType(it).all {
-// exclude problematic jar file from javado

Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022799293


##
build.gradle:
##
@@ -35,570 +9,76 @@ ext {
 homeBinDir = layout.projectDirectory.dir('bin')
 homeConfDir = layout.projectDirectory.dir('conf')
 homeLibDir = layout.projectDirectory.dir('lib')
-homeSrcDir = layout.projectDirectory.dir('src')
-}
-
-version = grailsVersion
-group = "org.grails"
-
-// Groovy is added as a dependency to both the 'groovy' and 'compile'
-// configurations, so place the dependency in a shared variable. The
-// 'compile' is required so that Groovy appears as a dependency in the
-// artifacts' POMs.
-ext.jointBuildGroovyJarProperty = System.getProperty('groovy.jar')
-ext.groovyDependency = null
 
-ext."signing.keyId" = System.getenv("SIGNING_KEY") ?: 
project.hasProperty("signing.keyId") ? project.getProperty('signing.keyId') : 
null
-ext."signing.password" = System.getenv("SIGNING_PASSPHRASE") ?: 
project.hasProperty("signing.password") ? 
project.getProperty('signing.password') : null
-ext."signing.secretKeyRingFile" = 
project.hasProperty("signing.secretKeyRingFile") ? 
project.getProperty('signing.secretKeyRingFile') : null
-
-if (jointBuildGroovyJarProperty) {
-def jointBuildGroovyJar = file(jointBuildGroovyJarProperty)
-if (jointBuildGroovyJar.exists()) {
-groovyDependency = dependencies.create(files(jointBuildGroovyJar))
-} else {
-throw new GradleException("The groovy.jar system property points to 
${jointBuildGroovyJar.absolutePath} which does not exist.")
-}
-} else {
-groovyDependency = 
dependencies.create("org.apache.groovy:groovy:${groovyVersion}")
-}
-
-if (isReleaseVersion) {
-apply plugin: 'maven-publish'
-apply plugin: "io.github.gradle-nexus.publish-plugin"
-
-nexusPublishing {
-repositories {
-sonatype {
-def ossUser = System.getenv("SONATYPE_USERNAME") ?: 
project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : ''
-def ossPass = System.getenv("SONATYPE_PASSWORD") ?: 
project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : ''
-def ossStagingProfileId = 
System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: 
project.hasProperty("sonatypeOssStagingProfileId") ? 
project.sonatypeOssStagingProfileId : ''
-nexusUrl = uri("https://s01.oss.sonatype.org/service/local/";)
-username = ossUser
-password = ossPass
-stagingProfileId = ossStagingProfileId
-}
-}
+mappedArtifactIds = [

Review Comment:
   Should we build this list based on the pomArtifactId? It looks like this is 
only used in the grails bom.  Maybe move the logic there? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022283791


##
build.gradle:
##
@@ -36,569 +10,66 @@ ext {
 homeConfDir = layout.projectDirectory.dir('conf')
 homeLibDir = layout.projectDirectory.dir('lib')
 homeSrcDir = layout.projectDirectory.dir('src')
-}
-
-version = grailsVersion
-group = "org.grails"
-
-// Groovy is added as a dependency to both the 'groovy' and 'compile'
-// configurations, so place the dependency in a shared variable. The
-// 'compile' is required so that Groovy appears as a dependency in the
-// artifacts' POMs.
-ext.jointBuildGroovyJarProperty = System.getProperty('groovy.jar')
-ext.groovyDependency = null
 
-ext."signing.keyId" = System.getenv("SIGNING_KEY") ?: 
project.hasProperty("signing.keyId") ? project.getProperty('signing.keyId') : 
null
-ext."signing.password" = System.getenv("SIGNING_PASSPHRASE") ?: 
project.hasProperty("signing.password") ? 
project.getProperty('signing.password') : null
-ext."signing.secretKeyRingFile" = 
project.hasProperty("signing.secretKeyRingFile") ? 
project.getProperty('signing.secretKeyRingFile') : null
-
-if (jointBuildGroovyJarProperty) {
-def jointBuildGroovyJar = file(jointBuildGroovyJarProperty)
-if (jointBuildGroovyJar.exists()) {
-groovyDependency = dependencies.create(files(jointBuildGroovyJar))
-} else {
-throw new GradleException("The groovy.jar system property points to 
${jointBuildGroovyJar.absolutePath} which does not exist.")
-}
-} else {
-groovyDependency = 
dependencies.create("org.apache.groovy:groovy:${groovyVersion}")
-}
-
-if (isReleaseVersion) {
-apply plugin: 'maven-publish'
-apply plugin: "io.github.gradle-nexus.publish-plugin"
-
-nexusPublishing {
-repositories {
-sonatype {
-def ossUser = System.getenv("SONATYPE_USERNAME") ?: 
project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : ''
-def ossPass = System.getenv("SONATYPE_PASSWORD") ?: 
project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : ''
-def ossStagingProfileId = 
System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: 
project.hasProperty("sonatypeOssStagingProfileId") ? 
project.sonatypeOssStagingProfileId : ''
-nexusUrl = uri("https://s01.oss.sonatype.org/service/local/";)
-username = ossUser
-password = ossPass
-stagingProfileId = ossStagingProfileId
-}
-}
-
-transitionCheckOptions {
-maxRetries.set(40)
-delayBetween.set(java.time.Duration.ofMillis(5000))
-}
-}
+mappedArtifactIds = [
+// The artifactIds of these projects differ from their respective 
project names
+'grails-async-core'   : 'grails-async',
+'grails-async-plugin' : 'async',
+'grails-events-core'  : 'grails-events',
+'grails-events-plugin': 'events',
+'grails-plugin-converters': 'converters'
+]
 }
 
 allprojects {
-if (project.name == 'grails-bom') return
-// FORCE UPGRADE OF GROOVY IN DEPENDENCIES TO GROOVY 4
-// except in projects that will be run by Gradle during the build
-if (!compiledByGradleGroovyVersion(project)) {
-configurations.configureEach {
-resolutionStrategy.eachDependency { DependencyResolveDetails 
details ->
-if (details.requested.group == 'org.codehaus.groovy' && 
details.requested.name != 'groovy-bom') {
-details.useTarget(group: 'org.apache.groovy', name: 
details.requested.name, version: groovyVersion)
-}
-}
-}
-}
-
 repositories {
 mavenCentral()
 maven { url = 'https://repo.grails.org/grails/core' }
 maven { url = 
'https://oss.sonatype.org/content/repositories/snapshots' }
 // mavenLocal() // Keep, this will be uncommented and used by CI 
(groovy-joint-workflow)
 }
+}
 
-configurations {
-all {
-resolutionStrategy {
-def cacheHours = isCiBuild ? 0 : 24
-cacheDynamicVersionsFor cacheHours, 'hours'
-cacheChangingModulesFor cacheHours, 'hours'
-eachDependency { DependencyResolveDetails details ->
-//specifying a fixed version for all libraries with 
'org.gradle' group
-if (details.requested.group == 'org.apache.groovy') {
-details.useVersion(groovyVersion)
-}
-if (details.requested.group == "org.spockframework") {
-details.useVersion(project['spock.version'])
-}
-}
-}
-}
-}
-
-[Javadoc, Groovydoc].each {
-tasks.withType(it).all {
-// exclude problematic jar file from javadoc cl

Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022502226


##
gradle/assemble-root-config.gradle:
##
@@ -116,7 +103,7 @@ class GrailsCreateStartScripts extends CreateStartScripts {
 }
 
 tasks.register('install') { task ->
-dependsOn 'populateDependencies', 'grailsCreateStartScripts'
+dependsOn 'syncCliDependencies', 'grailsCreateStartScripts'
 subprojects { Project project ->
 if(!project.name.startsWith('grails-test-suite') && 
!project.name.startsWith('grails-test-examples')) {
 task.dependsOn("$project.name:publishToMavenLocal")

Review Comment:
   Refactored



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022500382


##
gradle/assemble-root-config.gradle:
##
@@ -57,16 +40,20 @@ tasks.register('populateDependencies', Sync) {
 // Can't use sync task here because this directory contains other things as 
well.
 tasks.register('sourcesJars', Sync) {
 into homeSrcDir
-from rootProject.subprojects.findAll { subproject ->
-!subproject.name.startsWith('grails-test-suite') &&
-!subproject.name.startsWith('grails-dependencies') &&
-!subproject.name.startsWith('grails-bom') &&
-!subproject.name.contains('grails-test-examples')
+from subprojects.findAll {
+!it.name.startsWith('grails-test-suite') &&

Review Comment:
   Done!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022341008


##
gradle/assemble-config.gradle:
##
@@ -0,0 +1,19 @@
+tasks.register('installToHomeDist', Copy) {
+inputs.files(tasks.named('jar').map { it.outputs.files })

Review Comment:
   I don't think using only the dependency configuration will do it. There are 
other factors (like changed sources) that can change the `jar` task output.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022330205


##
gradle/java-config.gradle:
##
@@ -0,0 +1,19 @@
+compileJava.options.release = javaVersion.toInteger()
+
+tasks.withType(GroovyCompile).configureEach {
+groovyOptions.encoding = 'UTF-8'
+options.encoding = 'UTF-8'
+options.fork = true
+options.forkOptions.jvmArgs = ['-Xms128M', '-Xmx1G']
+}
+
+tasks.withType(Jar).configureEach {

Review Comment:
   We should the JAR attributes in this PR to ensure functionality is 
preserved. We can revisit once Snapshots are up and running.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-04-01 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022320113


##
gradle/assemble-config.gradle:
##
@@ -0,0 +1,19 @@
+tasks.register('installToHomeDist', Copy) {

Review Comment:
   Won't the `inputs` of the `installToHomeDist` task make sure any changes to 
the output jars are detected and that they are copied to/overwritten in 
`distInstallDir`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2022164869


##
grails-docs/build.gradle:
##
@@ -1,10 +1,23 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 configurations {
 // Required to keep Gradle classes off the test compile classpath.
 gradleConf.extendsFrom compileClasspath
 }
 
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 gradleConf gradleApi()
+api "org.apache.groovy:groovy:$groovyVersion"

Review Comment:
   Changed!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


jamesfredley commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021966928


##
grails-docs/build.gradle:
##
@@ -1,10 +1,23 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 configurations {
 // Required to keep Gradle classes off the test compile classpath.
 gradleConf.extendsFrom compileClasspath
 }
 
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 gradleConf gradleApi()
+api "org.apache.groovy:groovy:$groovyVersion"

Review Comment:
   I think we got lucky on this one and the Groovy 4 compiled classes ran fine 
in Groovy 3, but I do agree with changing any code executed during the Gradle 
build to use `$GroovySystem.version` as a precaution.  



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021063248


##
grails-web/build.gradle:
##
@@ -1,8 +1,54 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 api project(":grails-web-common")
 api project(":grails-web-databinding")
 api project(":grails-web-url-mappings")
 api project(":grails-web-mvc")
+api "org.apache.groovy:groovy:$groovyVersion"
 
 api "org.grails:grails-web-gsp"

Review Comment:
   Looks like ResourceAwareTemplateEngine is used in grails-web-common too.  I 
suspect we need to revisit the project structure of gsp.  It seems like over 
time several classes have been pulled up the project chain.  I'll take a look 
at this after the apache publishing is working.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021594322


##
gradle/java-config.gradle:
##
@@ -0,0 +1,19 @@
+compileJava.options.release = javaVersion.toInteger()
+
+tasks.withType(GroovyCompile).configureEach {
+groovyOptions.encoding = 'UTF-8'
+options.encoding = 'UTF-8'
+options.fork = true
+options.forkOptions.jvmArgs = ['-Xms128M', '-Xmx1G']
+}
+
+tasks.withType(Jar).configureEach {

Review Comment:
   After moving the attributes to only the `grails-bootstrap` jar I'm getting 
test errors all over the place.
   Seems to be originating from:
   
https://github.com/apache/grails-data-mapping/blob/00fbc39170146c6ae844c66c7e2056a4e7565ba6/grails-datastore-core/src/main/groovy/org/grails/datastore/mapping/core/grailsversion/GrailsVersion.groovy#L147



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


matrei commented on PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#issuecomment-2766381924

   > Did you also test grails-doc and make sure if it has this code that it can 
still generate?
   
   I don't know what you mean by this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


matrei commented on PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#issuecomment-2766596946

   > > > Did you also test grails-doc and make sure if it has this code that it 
can still generate?
   > > 
   > > 
   > > I don't know what you mean by this.
   > 
   > https://github.com/apache/grails-doc can either checkout or point to a 
grails home. It will then build the documentation to be published. You should 
be able to checkout that project, point it to this branch, and then run the doc 
task to generate documentation. If it doesn't work, we'll need to adjust the 
gradle files ...
   
   Aha, I see what you mean. It does seem to work. `grails-doc` even includes 
Groovy 4 on the build classpath!!
   
   
https://github.com/apache/grails-doc/blob/174051c0d071bc889d213f46820d2aab9b02eb4a/buildSrc/build.gradle#L16-L20


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021052589


##
gradle/docs-config.gradle:
##
@@ -0,0 +1,19 @@
+apply from: 
rootProject.layout.projectDirectory.file('gradle/docs-dependencies.gradle')
+
+ext {
+includeInApiDocs = true
+}
+
+tasks.named('groovydoc', Groovydoc) {

Review Comment:
   I'm only suggesting we fix this in the gradle plugin in a separate pull and 
switching to this for now to be consistent across the projects.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021217327


##
gradle/java-config.gradle:
##
@@ -0,0 +1,19 @@
+compileJava.options.release = javaVersion.toInteger()
+
+tasks.withType(GroovyCompile).configureEach {
+groovyOptions.encoding = 'UTF-8'
+options.encoding = 'UTF-8'
+options.fork = true
+options.forkOptions.jvmArgs = ['-Xms128M', '-Xmx1G']
+}
+
+tasks.withType(Jar).configureEach {

Review Comment:
   > but can we apply this only to the bootstrap class then?
   
   Do you mean add the version to the jar manifest only in the 
`grails-bootstrap` project?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


jdaugherty commented on PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#issuecomment-2766395247

   > > Did you also test grails-doc and make sure if it has this code that it 
can still generate?
   > 
   > I don't know what you mean by this.
   
   https://github.com/apache/grails-doc can either checkout or point to a 
grails home.  It will then build the documentation to be published.  You should 
be able to checkout that project, point it to this branch, and then run the doc 
task to generate documentation.  If it doesn't work, we'll need to adjust the 
gradle files ...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021150321


##
gradle/docs-config.gradle:
##
@@ -0,0 +1,19 @@
+apply from: 
rootProject.layout.projectDirectory.file('gradle/docs-dependencies.gradle')
+
+ext {
+includeInApiDocs = true
+}
+
+tasks.named('groovydoc', Groovydoc) {

Review Comment:
   https://github.com/apache/grails-gradle-plugin/issues/430



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021143358


##
gradle/functional-test-config.gradle:
##
@@ -0,0 +1,39 @@
+def pluginsGroupProjects = rootProject.subprojects
+.findAll { it.group == 'org.grails.plugins' }
+.collect { it.name }
+
+configurations.configureEach {
+resolutionStrategy {
+dependencySubstitution {
+for (def possibleProject : rootProject.subprojects) {
+if (!possibleProject.name.startsWith('grails-test-suite') && 
!possibleProject.name.contains('grails-test-examples')) {
+def artifactId = mappedArtifactIds[possibleProject.name] 
?: possibleProject.name
+def substitutedArtifact = "${possibleProject.name in 
pluginsGroupProjects ? 'org.grails.plugins' : 'org.grails'}:$artifactId"

Review Comment:
   Making the functional tests dependent on the framework projects seems to fix 
resolving the group:  
   
Set nonFunctionalProjects = 
rootProject.subprojects.findAll { !it.name.startsWith('grails-test-examples') }
nonFunctionalProjects.each {
project.evaluationDependsOn(it.path)
}



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021100596


##
gradle/docs-config.gradle:
##
@@ -0,0 +1,19 @@
+apply from: 
rootProject.layout.projectDirectory.file('gradle/docs-dependencies.gradle')
+
+ext {
+includeInApiDocs = true
+}
+
+tasks.named('groovydoc', Groovydoc) {

Review Comment:
   OK, I'll switch to letting the Gradle Plugin handle this.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021067073


##
build.gradle:
##
@@ -36,569 +10,66 @@ ext {
 homeConfDir = layout.projectDirectory.dir('conf')
 homeLibDir = layout.projectDirectory.dir('lib')
 homeSrcDir = layout.projectDirectory.dir('src')
-}
-
-version = grailsVersion
-group = "org.grails"
-
-// Groovy is added as a dependency to both the 'groovy' and 'compile'
-// configurations, so place the dependency in a shared variable. The
-// 'compile' is required so that Groovy appears as a dependency in the
-// artifacts' POMs.
-ext.jointBuildGroovyJarProperty = System.getProperty('groovy.jar')
-ext.groovyDependency = null
 
-ext."signing.keyId" = System.getenv("SIGNING_KEY") ?: 
project.hasProperty("signing.keyId") ? project.getProperty('signing.keyId') : 
null
-ext."signing.password" = System.getenv("SIGNING_PASSPHRASE") ?: 
project.hasProperty("signing.password") ? 
project.getProperty('signing.password') : null
-ext."signing.secretKeyRingFile" = 
project.hasProperty("signing.secretKeyRingFile") ? 
project.getProperty('signing.secretKeyRingFile') : null
-
-if (jointBuildGroovyJarProperty) {
-def jointBuildGroovyJar = file(jointBuildGroovyJarProperty)
-if (jointBuildGroovyJar.exists()) {
-groovyDependency = dependencies.create(files(jointBuildGroovyJar))
-} else {
-throw new GradleException("The groovy.jar system property points to 
${jointBuildGroovyJar.absolutePath} which does not exist.")
-}
-} else {
-groovyDependency = 
dependencies.create("org.apache.groovy:groovy:${groovyVersion}")
-}
-
-if (isReleaseVersion) {
-apply plugin: 'maven-publish'
-apply plugin: "io.github.gradle-nexus.publish-plugin"
-
-nexusPublishing {
-repositories {
-sonatype {
-def ossUser = System.getenv("SONATYPE_USERNAME") ?: 
project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : ''
-def ossPass = System.getenv("SONATYPE_PASSWORD") ?: 
project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : ''
-def ossStagingProfileId = 
System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: 
project.hasProperty("sonatypeOssStagingProfileId") ? 
project.sonatypeOssStagingProfileId : ''
-nexusUrl = uri("https://s01.oss.sonatype.org/service/local/";)
-username = ossUser
-password = ossPass
-stagingProfileId = ossStagingProfileId
-}
-}
-
-transitionCheckOptions {
-maxRetries.set(40)
-delayBetween.set(java.time.Duration.ofMillis(5000))
-}
-}
+mappedArtifactIds = [
+// The artifactIds of these projects differ from their respective 
project names
+'grails-async-core'   : 'grails-async',
+'grails-async-plugin' : 'async',
+'grails-events-core'  : 'grails-events',
+'grails-events-plugin': 'events',
+'grails-plugin-converters': 'converters'
+]
 }
 
 allprojects {
-if (project.name == 'grails-bom') return
-// FORCE UPGRADE OF GROOVY IN DEPENDENCIES TO GROOVY 4
-// except in projects that will be run by Gradle during the build
-if (!compiledByGradleGroovyVersion(project)) {
-configurations.configureEach {
-resolutionStrategy.eachDependency { DependencyResolveDetails 
details ->
-if (details.requested.group == 'org.codehaus.groovy' && 
details.requested.name != 'groovy-bom') {
-details.useTarget(group: 'org.apache.groovy', name: 
details.requested.name, version: groovyVersion)
-}
-}
-}
-}
-
 repositories {
 mavenCentral()
 maven { url = 'https://repo.grails.org/grails/core' }
 maven { url = 
'https://oss.sonatype.org/content/repositories/snapshots' }
 // mavenLocal() // Keep, this will be uncommented and used by CI 
(groovy-joint-workflow)
 }
+}
 
-configurations {
-all {
-resolutionStrategy {
-def cacheHours = isCiBuild ? 0 : 24
-cacheDynamicVersionsFor cacheHours, 'hours'
-cacheChangingModulesFor cacheHours, 'hours'
-eachDependency { DependencyResolveDetails details ->
-//specifying a fixed version for all libraries with 
'org.gradle' group
-if (details.requested.group == 'org.apache.groovy') {
-details.useVersion(groovyVersion)
-}
-if (details.requested.group == "org.spockframework") {
-details.useVersion(project['spock.version'])
-}
-}
-}
-}
-}
-
-[Javadoc, Groovydoc].each {
-tasks.withType(it).all {
-// exclude problematic jar file from javado

Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021065226


##
grails-web/build.gradle:
##
@@ -1,8 +1,54 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 api project(":grails-web-common")
 api project(":grails-web-databinding")
 api project(":grails-web-url-mappings")
 api project(":grails-web-mvc")
+api "org.apache.groovy:groovy:$groovyVersion"
 
 api "org.grails:grails-web-gsp"

Review Comment:
   https://github.com/apache/grails-views/issues/726



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021055386


##
grails-docs/build.gradle:
##
@@ -1,10 +1,23 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 configurations {
 // Required to keep Gradle classes off the test compile classpath.
 gradleConf.extendsFrom compileClasspath
 }
 
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 gradleConf gradleApi()
+api "org.apache.groovy:groovy:$groovyVersion"

Review Comment:
   I think we have found a bug =)  
   
   Can we please change this to be the groovy version that's used by gradle? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021052175


##
grails-web/build.gradle:
##
@@ -1,8 +1,54 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 api project(":grails-web-common")
 api project(":grails-web-databinding")
 api project(":grails-web-url-mappings")
 api project(":grails-web-mvc")
+api "org.apache.groovy:groovy:$groovyVersion"
 
 api "org.grails:grails-web-gsp"

Review Comment:
   `grails-web-gsp` is in fact not used in `grails-web` and can be removed 
(unless some downstream project depends on `grails-web` providing it, which we 
know is a bad idea).
   
   It seems `grails-plugin-mimetypes` is using 
`org.grails.gsp.ResourceAwareTemplateEngine` and it's sole dependency is 
`grails-web`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021049995


##
gradle/java-config.gradle:
##
@@ -0,0 +1,19 @@
+compileJava.options.release = javaVersion.toInteger()
+
+tasks.withType(GroovyCompile).configureEach {
+groovyOptions.encoding = 'UTF-8'
+options.encoding = 'UTF-8'
+options.fork = true
+options.forkOptions.jvmArgs = ['-Xms128M', '-Xmx1G']
+}
+
+tasks.withType(Jar).configureEach {

Review Comment:
   So it looks like Environment.groovy is what uses this.  That's fine, but can 
we apply this only to the bootstrap class then?  It looks for the manifest file 
in the same location as the Environment.class, which is only in the bootstrap 
project.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021045663


##
grails-dependencies/src/main/resources/publish-fix:
##
@@ -0,0 +1 @@
+Grails Gradle Plugin needs something in a sourceSet to be able to publish

Review Comment:
   https://github.com/apache/grails-gradle-plugin/issues/429



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021041952


##
grails-logging/build.gradle:
##
@@ -1,3 +1,41 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 api project(":grails-core")

Review Comment:
   Makes sense.  Thank you.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021028695


##
grails-web/build.gradle:
##
@@ -1,8 +1,54 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 api project(":grails-web-common")
 api project(":grails-web-databinding")
 api project(":grails-web-url-mappings")
 api project(":grails-web-mvc")
+api "org.apache.groovy:groovy:$groovyVersion"
 
 api "org.grails:grails-web-gsp"

Review Comment:
   See previous response



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021024967


##
grails-logging/build.gradle:
##
@@ -1,3 +1,41 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 api project(":grails-core")

Review Comment:
   :smile: I had that one coming! However, this line has not been touched in 
this PR.
   
   I have NOT gone through the dependencies sections in this PR, as I know the 
PR is blocking progress and I want to get it done.
   
   Clarifying and cleaning up dependencies can be done in incremental steps 
later.
   There is also work left to clean up the rest of the subproject build files.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021028091


##
grails-test-suite-uber/build.gradle:
##
@@ -1,39 +1,60 @@
-configurations.testCompileClasspath {
-exclude module: 'grails-plugin-testing'
+plugins {
+id 'groovy'
+id 'project-report'
 }
 
-dependencies {
-
-api project(':grails-test-suite-base'),
-project(':grails-plugin-interceptors'),
-project(':grails-plugin-controllers')
-
-api "org.apache.tomcat:tomcat-jdbc"
+version = projectVersion
+group = 'org.grails'
 
-testRuntimeOnly "com.h2database:h2"
-testRuntimeOnly "org.springframework:spring-aspects"
-testRuntimeOnly "org.aspectj:aspectjrt", "org.aspectj:aspectjweaver"
-
-testImplementation project(':grails-plugin-codecs'),
-project(':grails-plugin-domain-class') ,
-project(':grails-plugin-url-mappings') ,
-project(":grails-plugin-datasource"),
-project(":grails-plugin-services"),
-project(":grails-plugin-rest"),
-project(":grails-plugin-i18n"),
-project(":grails-plugin-databinding"),
-project(':grails-spring')
+dependencies {
+implementation platform(project(':grails-bom'))
 
-testImplementation "org.grails:grails-datastore-gorm-hibernate5"
 testImplementation project(':grails-async-plugin')
+testImplementation project(':grails-plugin-codecs')
+testImplementation project(':grails-plugin-controllers')
+testImplementation project(':grails-plugin-databinding')
+testImplementation project(':grails-plugin-datasource')
+testImplementation project(':grails-plugin-domain-class')
+testImplementation project(':grails-plugin-i18n')
+testImplementation project(':grails-plugin-interceptors')
+testImplementation project(':grails-plugin-rest')
+testImplementation project(':grails-plugin-services')
+testImplementation project(':grails-plugin-url-mappings')
+testImplementation project(':grails-spring')
+testImplementation project(':grails-test-suite-base')
+testImplementation project(':grails-testing-support')
+testImplementation 'org.apache.groovy:groovy'
+testImplementation 'org.apache.groovy:groovy-test-junit5'
+testImplementation 'org.junit.jupiter:junit-jupiter-api'
+testImplementation 'org.grails:grails-datastore-gorm-hibernate5'
 testImplementation "org.grails.plugins:gsp"
-testImplementation "org.grails:grails-gorm-testing-support"
-testImplementation "org.grails:grails-web-testing-support", {
+testImplementation 'org.grails:grails-gorm-testing-support', {
+// This is a local project dependency
 exclude module:'grails-testing-support'
 }
-testImplementation project(':grails-testing-support')
+testImplementation 'org.grails:grails-web-testing-support', {
+// This is a local project dependency
+exclude module:'grails-testing-support'
+}
+testImplementation 'org.objenesis:objenesis'
 
-testImplementation "com.fasterxml.jackson.core:jackson-databind"
+testCompileOnly 'jakarta.servlet:jakarta.servlet-api'
+testCompileOnly 'org.springframework:spring-test', {
+// MockHttpServletRequest/Response/Context used in many classes
+}
+
+testRuntimeOnly 'com.h2database:h2'
+testRuntimeOnly 'org.apache.tomcat:tomcat-jdbc'
+testRuntimeOnly 'org.aspectj:aspectjrt'
+testRuntimeOnly 'org.aspectj:aspectjweaver'
+testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
+testRuntimeOnly 'org.springframework:spring-aspects'
+
+
+// Testing
+testImplementation('org.spockframework:spock-core') { transitive = false }

Review Comment:
   No, see previous response



##
grails-web-mvc/build.gradle:
##
@@ -1,4 +1,50 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 api project(":grails-web-common"),

Review Comment:
   See previous response



##
grails-web-url-mappings/build.gradle:
##
@@ -1,7 +1,20 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 api project(":grails-web-common")

Review Comment:
   See previous response



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021026221


##
grails-plugin-validation/build.gradle:
##
@@ -1,4 +1,50 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 api project(":grails-core"),
 project(':grails-web')

Review Comment:
   See previous response



##
grails-spring/build.gradle:
##
@@ -1,7 +1,44 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 api "org.springframework:spring-tx"

Review Comment:
   See previous response



##
grails-test-suite-base/build.gradle:
##
@@ -1,4 +1,16 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 api project(':grails-bootstrap'),

Review Comment:
   See previous response



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021025475


##
grails-plugin-codecs/build.gradle:
##
@@ -1,4 +1,50 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 api project(":grails-web"), project(":grails-encoder")

Review Comment:
   See previous response



##
grails-plugin-databinding/build.gradle:
##
@@ -1,5 +1,18 @@
-  dependencies {
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
+dependencies {
+
+implementation platform(project(':grails-bom'))
+
 api project(':grails-core'), project(':grails-web')

Review Comment:
   See previous response



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2021016387


##
grails-docs/build.gradle:
##
@@ -1,10 +1,23 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 configurations {
 // Required to keep Gradle classes off the test compile classpath.
 gradleConf.extendsFrom compileClasspath
 }
 
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 gradleConf gradleApi()
+api "org.apache.groovy:groovy:$groovyVersion"

Review Comment:
   IDK. I just refactored this dependency to be added in the subproject build 
file instead of in the root build file.
   The `grails-docs` was not in the `compiledByGradleGroovyVersion` collection.
   
https://github.com/apache/grails-core/blob/f673a05c5e1e7e61830608564c0497554eaefbf4/build.gradle#L63
   
https://github.com/apache/grails-core/blob/f673a05c5e1e7e61830608564c0497554eaefbf4/build.gradle#L401-L410
   
https://github.com/apache/grails-core/blob/f673a05c5e1e7e61830608564c0497554eaefbf4/build.gradle#L598-L604



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020996499


##
grails-dependencies/src/main/resources/publish-fix:
##
@@ -0,0 +1 @@
+Grails Gradle Plugin needs something in a sourceSet to be able to publish

Review Comment:
   Yes, that would make sense.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


matrei commented on PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#issuecomment-2766127891

   > Can you please confirm you've published to maven local before this change 
& saved off the artifacts. Then, published after this change and diffed the 
directory structure / names / files? This will ensure we haven't broken 
anything.
   
   Confirmed (after some fixes, thank you!)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020977104


##
gradle/docs-config.gradle:
##
@@ -0,0 +1,19 @@
+apply from: 
rootProject.layout.projectDirectory.file('gradle/docs-dependencies.gradle')
+
+ext {
+includeInApiDocs = true
+}
+
+tasks.named('groovydoc', Groovydoc) {

Review Comment:
   > Can you please confirm you've published to maven local before this change 
& saved off the artifacts. Then, published after this change and diffed the 
directory structure / names / files? This will ensure we haven't broken 
anything.
   
   Confirmed (after some fixes, thank you!)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


matrei commented on PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#issuecomment-2766125284

   > Can you please confirm you've made sure the same # of tests run before and 
after this change?
   
   Confirmed `2298 tests (28 ignored)` (after a fix, thank you!)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020586233


##
gradle/docs-config.gradle:
##
@@ -0,0 +1,19 @@
+apply from: 
rootProject.layout.projectDirectory.file('gradle/docs-dependencies.gradle')
+
+ext {
+includeInApiDocs = true
+}
+
+tasks.named('groovydoc', Groovydoc) {

Review Comment:
   In the `grails-core` repo, there is not one single `src/main/java` source 
set.
   Which projects are we using `src/main/java` in?
   
   I don't think the solution is optimal at the moment. We are effectively 
generating and packaging both groovydoc and javadoc only to throw away the 
groovydoc when extracting the jar.
   
   Should we be advocating groovy usage, and package generated groovydoc in the 
doc jar and only use `src/main/groovy` the source set?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020520528


##
gradle/assemble-config.gradle:
##
@@ -0,0 +1,19 @@
+tasks.register('installToHomeDist', Copy) {
+inputs.files(tasks.named('jar').map { it.outputs.files })
+inputs.files(tasks.named('sourcesJar').map { it.outputs.files })
+inputs.files(tasks.named('javadocJar').map { it.outputs.files })
+outputs.dir(distInstallDir)
+from layout.buildDirectory.dir('libs')
+into distInstallDir
+}
+
+tasks.withType(PublishToMavenLocal).configureEach {
+dependsOn('installToHomeDist')
+doLast {
+copy {

Review Comment:
   These distribution directories are deleted by a `clean` task in the root 
build file.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-31 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020518302


##
gradle/java-config.gradle:
##
@@ -0,0 +1,19 @@
+compileJava.options.release = javaVersion.toInteger()
+
+tasks.withType(GroovyCompile).configureEach {
+groovyOptions.encoding = 'UTF-8'
+options.encoding = 'UTF-8'
+options.fork = true
+options.forkOptions.jvmArgs = ['-Xms128M', '-Xmx1G']
+}
+
+tasks.withType(Jar).configureEach {

Review Comment:
   > is this there for the shell then? or is that test even relevant now?
   
   `GrailsUtil.getGrailsVersion()` is used in 19 places in the `grails-core` 
projects.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-30 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020351317


##
gradle/java-config.gradle:
##
@@ -0,0 +1,19 @@
+compileJava.options.release = javaVersion.toInteger()
+
+tasks.withType(GroovyCompile).configureEach {
+groovyOptions.encoding = 'UTF-8'
+options.encoding = 'UTF-8'
+options.fork = true
+options.forkOptions.jvmArgs = ['-Xms128M', '-Xmx1G']
+}
+
+tasks.withType(Jar).configureEach {

Review Comment:
   is this there for the shell then?  or is that test even relevant now?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-30 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020191755


##
gradle/functional-test-config.gradle:
##
@@ -0,0 +1,39 @@
+def pluginsGroupProjects = rootProject.subprojects
+.findAll { it.group == 'org.grails.plugins' }
+.collect { it.name }
+
+configurations.configureEach {
+resolutionStrategy {
+dependencySubstitution {
+for (def possibleProject : rootProject.subprojects) {
+if (!possibleProject.name.startsWith('grails-test-suite') && 
!possibleProject.name.contains('grails-test-examples')) {
+def artifactId = mappedArtifactIds[possibleProject.name] 
?: possibleProject.name
+def substitutedArtifact = "${possibleProject.name in 
pluginsGroupProjects ? 'org.grails.plugins' : 'org.grails'}:$artifactId"

Review Comment:
   For some reason `grails-testing-support` and `grails-web-boot` do not show 
the right `group`.
   Added some logging:
   ```console
   Substituting org.grails:grails-spring with project grails-spring
   Substituting org.grails:grails-test with project grails-test
   Substituting grails.core.ROOT:grails-testing-support with project 
grails-testing-support
   Substituting org.grails:grails-web with project grails-web
   Substituting grails.core.ROOT:grails-web-boot with project grails-web-boot
   Substituting org.grails:grails-web-common with project grails-web-common
   ```
   
   So, as it is now, it only works as they are in the default group.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-30 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020187036


##
gradle/java-config.gradle:
##
@@ -0,0 +1,19 @@
+compileJava.options.release = javaVersion.toInteger()
+
+tasks.withType(GroovyCompile).configureEach {
+groovyOptions.encoding = 'UTF-8'
+options.encoding = 'UTF-8'
+options.fork = true
+options.forkOptions.jvmArgs = ['-Xms128M', '-Xmx1G']
+}
+
+tasks.withType(Jar).configureEach {

Review Comment:
   I'm don't know why it is added, so I did not want to remove it. Maybe we can 
remove it?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-30 Thread via GitHub


jdaugherty commented on PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#issuecomment-2764613116

   Did you also test grails-doc and make sure if it has this code that it can 
still generate? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-30 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020225717


##
gradle/java-config.gradle:
##
@@ -0,0 +1,19 @@
+compileJava.options.release = javaVersion.toInteger()
+
+tasks.withType(GroovyCompile).configureEach {
+groovyOptions.encoding = 'UTF-8'
+options.encoding = 'UTF-8'
+options.fork = true
+options.forkOptions.jvmArgs = ['-Xms128M', '-Xmx1G']
+}
+
+tasks.withType(Jar).configureEach {

Review Comment:
   I do not understand the connection between adding these attributes to the 
jar files and using GitHub actions.
   Are you saying that by using GitHub actions, this is not necessary?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-30 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020230344


##
gradle/docs-config.gradle:
##
@@ -0,0 +1,19 @@
+apply from: 
rootProject.layout.projectDirectory.file('gradle/docs-dependencies.gradle')
+
+ext {
+includeInApiDocs = true
+}
+
+tasks.named('groovydoc', Groovydoc) {

Review Comment:
   This is intentional.  if you unzip with a commandline client it will 
overwrite the files and it will be as you expect.  We opened a bug ticket on 
gradle to make it replace instead of add duplicates.
   
   I believe the reason we don’t run just the groovydoc package is some 
projects do include java only in a java source.  
   
   As for the directories, our intention was to build the jar.  I need to look 
at the directories to see whats happening.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-30 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020229800


##
gradle/java-config.gradle:
##
@@ -0,0 +1,19 @@
+compileJava.options.release = javaVersion.toInteger()
+
+tasks.withType(GroovyCompile).configureEach {
+groovyOptions.encoding = 'UTF-8'
+options.encoding = 'UTF-8'
+options.fork = true
+options.forkOptions.jvmArgs = ['-Xms128M', '-Xmx1G']
+}
+
+tasks.withType(Jar).configureEach {

Review Comment:
   OK, thanks for clearing that up for me, I'll remove it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-30 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020226036


##
gradle/java-config.gradle:
##
@@ -0,0 +1,19 @@
+compileJava.options.release = javaVersion.toInteger()
+
+tasks.withType(GroovyCompile).configureEach {
+groovyOptions.encoding = 'UTF-8'
+options.encoding = 'UTF-8'
+options.fork = true
+options.forkOptions.jvmArgs = ['-Xms128M', '-Xmx1G']
+}
+
+tasks.withType(Jar).configureEach {

Review Comment:
   Yes, I am saying that historically grails was built on travis and before 
that on someone’s machine so it was important to know who built it.  Now it’s 
not needed because we have a standard CI.  



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-30 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020225091


##
gradle/functional-test-config.gradle:
##
@@ -0,0 +1,39 @@
+def pluginsGroupProjects = rootProject.subprojects
+.findAll { it.group == 'org.grails.plugins' }
+.collect { it.name }
+
+configurations.configureEach {
+resolutionStrategy {
+dependencySubstitution {
+for (def possibleProject : rootProject.subprojects) {
+if (!possibleProject.name.startsWith('grails-test-suite') && 
!possibleProject.name.contains('grails-test-examples')) {
+def artifactId = mappedArtifactIds[possibleProject.name] 
?: possibleProject.name
+def substitutedArtifact = "${possibleProject.name in 
pluginsGroupProjects ? 'org.grails.plugins' : 'org.grails'}:$artifactId"

Review Comment:
   > If you add the substitution code in a project.afterEvaluate { } block, 
does it work?
   
   No, that does not seem to work.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-30 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020195339


##
gradle/java-config.gradle:
##
@@ -0,0 +1,19 @@
+compileJava.options.release = javaVersion.toInteger()
+
+tasks.withType(GroovyCompile).configureEach {
+groovyOptions.encoding = 'UTF-8'
+options.encoding = 'UTF-8'
+options.fork = true
+options.forkOptions.jvmArgs = ['-Xms128M', '-Xmx1G']
+}
+
+tasks.withType(Jar).configureEach {

Review Comment:
   lets remove it; its likely left over pre-github actions change



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-30 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020187545


##
gradle/functional-test-config.gradle:
##
@@ -0,0 +1,39 @@
+def pluginsGroupProjects = rootProject.subprojects
+.findAll { it.group == 'org.grails.plugins' }
+.collect { it.name }
+
+configurations.configureEach {

Review Comment:
   Oh, sorry, I did not mean to remove that. I'll add it back.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-30 Thread via GitHub


matrei commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020187257


##
gradle/assemble-root-config.gradle:
##
@@ -126,7 +113,8 @@ tasks.register('install') { task ->
 //task install(dependsOn: [populateDependencies, grailsCreateStartScripts] + 
subprojects.findAll { !it.name.startsWith('grails-test-suite') }
 // 
   *.collect { Project p -> 
p.tasks.withType(PublishToMavenLocal)})

Review Comment:
   Yes



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Restructure build [grails-core]

2025-03-30 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020166255


##
grails-plugin-codecs/build.gradle:
##
@@ -1,4 +1,50 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 api project(":grails-web"), project(":grails-encoder")

Review Comment:
   I have never seen this syntax; can this be split across 2 lines?
   
   Single quotes?



##
grails-test-suite-base/build.gradle:
##
@@ -1,4 +1,16 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 api project(':grails-bootstrap'),

Review Comment:
   can we split this up into separate api statements?



##
build.gradle:
##
@@ -36,569 +10,66 @@ ext {
 homeConfDir = layout.projectDirectory.dir('conf')
 homeLibDir = layout.projectDirectory.dir('lib')
 homeSrcDir = layout.projectDirectory.dir('src')
-}
-
-version = grailsVersion
-group = "org.grails"
-
-// Groovy is added as a dependency to both the 'groovy' and 'compile'
-// configurations, so place the dependency in a shared variable. The
-// 'compile' is required so that Groovy appears as a dependency in the
-// artifacts' POMs.
-ext.jointBuildGroovyJarProperty = System.getProperty('groovy.jar')
-ext.groovyDependency = null
 
-ext."signing.keyId" = System.getenv("SIGNING_KEY") ?: 
project.hasProperty("signing.keyId") ? project.getProperty('signing.keyId') : 
null
-ext."signing.password" = System.getenv("SIGNING_PASSPHRASE") ?: 
project.hasProperty("signing.password") ? 
project.getProperty('signing.password') : null
-ext."signing.secretKeyRingFile" = 
project.hasProperty("signing.secretKeyRingFile") ? 
project.getProperty('signing.secretKeyRingFile') : null
-
-if (jointBuildGroovyJarProperty) {
-def jointBuildGroovyJar = file(jointBuildGroovyJarProperty)
-if (jointBuildGroovyJar.exists()) {
-groovyDependency = dependencies.create(files(jointBuildGroovyJar))
-} else {
-throw new GradleException("The groovy.jar system property points to 
${jointBuildGroovyJar.absolutePath} which does not exist.")
-}
-} else {
-groovyDependency = 
dependencies.create("org.apache.groovy:groovy:${groovyVersion}")
-}
-
-if (isReleaseVersion) {
-apply plugin: 'maven-publish'
-apply plugin: "io.github.gradle-nexus.publish-plugin"
-
-nexusPublishing {
-repositories {
-sonatype {
-def ossUser = System.getenv("SONATYPE_USERNAME") ?: 
project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : ''
-def ossPass = System.getenv("SONATYPE_PASSWORD") ?: 
project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : ''
-def ossStagingProfileId = 
System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: 
project.hasProperty("sonatypeOssStagingProfileId") ? 
project.sonatypeOssStagingProfileId : ''
-nexusUrl = uri("https://s01.oss.sonatype.org/service/local/";)
-username = ossUser
-password = ossPass
-stagingProfileId = ossStagingProfileId
-}
-}
-
-transitionCheckOptions {
-maxRetries.set(40)
-delayBetween.set(java.time.Duration.ofMillis(5000))
-}
-}
+mappedArtifactIds = [
+// The artifactIds of these projects differ from their respective 
project names
+'grails-async-core'   : 'grails-async',
+'grails-async-plugin' : 'async',
+'grails-events-core'  : 'grails-events',
+'grails-events-plugin': 'events',
+'grails-plugin-converters': 'converters'
+]
 }
 
 allprojects {
-if (project.name == 'grails-bom') return
-// FORCE UPGRADE OF GROOVY IN DEPENDENCIES TO GROOVY 4
-// except in projects that will be run by Gradle during the build
-if (!compiledByGradleGroovyVersion(project)) {
-configurations.configureEach {
-resolutionStrategy.eachDependency { DependencyResolveDetails 
details ->
-if (details.requested.group == 'org.codehaus.groovy' && 
details.requested.name != 'groovy-bom') {
-details.useTarget(group: 'org.apache.groovy', name: 
details.requested.name, version: groovyVersion)
-}
-}
-}
-}
-
 repositories {
 mavenCentral()
 maven { url = 'https://repo.grails.org/grails/core' }
 maven { url = 
'https://oss.sonatype.org/content/repositories/snapshots' }
 // mavenLocal() // Keep, this will be uncommented and used by CI 
(groovy-joint-workflow)
 }
+}
 
-configurations {
-all {
-resolutionStrategy {

Re: [PR] Restructure build [grails-core]

2025-03-30 Thread via GitHub


jdaugherty commented on code in PR #14093:
URL: https://github.com/apache/grails-core/pull/14093#discussion_r2020164215


##
grails-docs/build.gradle:
##
@@ -1,10 +1,23 @@
+plugins {
+id 'groovy'
+id 'java-library'
+id 'project-report'
+}
+
+version = projectVersion
+group = 'org.grails'
+
 configurations {
 // Required to keep Gradle classes off the test compile classpath.
 gradleConf.extendsFrom compileClasspath
 }
 
 dependencies {
+
+implementation platform(project(':grails-bom'))
+
 gradleConf gradleApi()
+api "org.apache.groovy:groovy:$groovyVersion"

Review Comment:
   Will this work?  This is a gradle task so it must use the groovy version of 
gradle.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]