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


##########
dependencies.gradle:
##########
@@ -0,0 +1,102 @@
+// see https://github.com/dependabot/dependabot-core/issues/1618
+// This file allows dependabot to update the gradle dependencies
+
+// This file provides the 'grails-bom' dependencies, while 
grails-gradle/dependencies.gradle provides the 'grails-gradle-bom' dependencies
+// These files are split to facilitate separation of build vs application 
dependencies. These are the application dependencies.
+ext {
+    bomDependencyVersions = [
+            'asset-pipeline-grails.version': '5.0.9',
+            'bootstrap-icons.version'      : '1.11.3',
+            'bootstrap.version'            : '5.3.3',
+            'commons-codec.version'        : '1.17.1',
+            'geb-spock.version'            : '7.0',
+            'grails-cache.version'         : '8.0.0-SNAPSHOT',
+            'grails-data.version'          : '9.0.0-SNAPSHOT',
+            'grails-geb.version'           : '5.0.0-SNAPSHOT',
+            'grails-profiles.version'      : '10.0.2',
+            'groovy.version'               : '4.0.25',
+            'gsp.version'                  : '7.0.0-SNAPSHOT',
+            'h2.version'                   : '2.3.232',
+            'jackson.version'              : '2.18.2',
+            'jquery.version'               : '3.7.1',
+            'liquibase-hibernate5.version' : '4.27.0',
+            'mongodb.version'              : '5.3.1',
+            'rxjava.version'               : '1.3.8',
+            'rxjava2.version'              : '2.2.21',
+            'rxjava3.version'              : '3.1.10',
+            'spock.version'                : '2.3-groovy-4.0',
+    ]
+
+    // Note: the name of the dependency must be the prefix of the property 
name so properties in the pom are resolved correctly
+    bomPlatformDependencies = [

Review Comment:
   Is there a particular reason why we use snake_case and not kebab-case for 
the map keys?



##########
.github/workflows/gradle.yml:
##########
@@ -27,8 +27,35 @@ jobs:
           else
             echo "value=false" >> $GITHUB_OUTPUT
           fi
+  buildGradle:
+    name: 'Build Gradle Plugins'
+    needs: skip_check
+    permissions:
+      contents: read  #  to fetch code (actions/checkout)
+    strategy:
+      fail-fast: false
+      matrix:
+        java: [17, 21]
+        os: [ubuntu-latest]
+    runs-on: ${{ matrix.os }}
+    steps:
+      - name: "📥 Checkout repository"
+        uses: actions/checkout@v4
+      - name: "☕️ Setup JDK"
+        uses: actions/setup-java@v4
+        with:
+          distribution: liberica
+          java-version: ${{ matrix.java }}
+      - name: "🐘 Setup Gradle"
+        uses: gradle/actions/setup-gradle@v4
+        with:
+          develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY  }}
+      - name: "🔨 Build project"
+        working-directory: 'grails-gradle'
+        id: build

Review Comment:
   Do we need this `id`?



##########
grails-bootstrap/src/test/groovy/org/grails/build/parsing/CommandLineParserSpec.groovy:
##########


Review Comment:
   `CommandLineParser` has been moved to the `grails-gradle-model` project. 
Should this `CommandLineParserSpec` also move there?



##########
grails-controllers/src/main/groovy/org/grails/plugins/web/controllers/api/ControllersDomainBindingApi.java:
##########


Review Comment:
   Update license header year range and change to `original author or authors`?



##########
grails-bootstrap/src/main/groovy/org/grails/config/CodeGenConfig.groovy:
##########


Review Comment:
   Update license header year range?



##########
grails-core/src/main/groovy/grails/util/GrailsClassUtils.java:
##########


Review Comment:
   Update license header year range?



##########
grails-gradle/build.gradle:
##########
@@ -0,0 +1,62 @@
+
+Properties props = new Properties()
+file('../gradle.properties').withInputStream {
+    props.load(it)
+}
+
+allprojects {
+    repositories {
+        // mavenLocal()
+        mavenCentral()
+        gradlePluginPortal()
+    }
+
+    for (Map.Entry<Object, Object> entry : props.entrySet()) {
+        project.ext[entry.key as String] = entry.value
+    }

Review Comment:
   Simplify?
   ```groovy
   props.forEach { k, v ->
       project.ext.set(k as String, v)
   }
   ```



##########
grails-gradle/build.gradle:
##########
@@ -0,0 +1,62 @@
+
+Properties props = new Properties()
+file('../gradle.properties').withInputStream {
+    props.load(it)
+}
+
+allprojects {
+    repositories {
+        // mavenLocal()
+        mavenCentral()
+        gradlePluginPortal()
+    }
+
+    for (Map.Entry<Object, Object> entry : props.entrySet()) {
+        project.ext[entry.key as String] = entry.value
+    }
+    apply from: rootProject.layout.projectDirectory.file('dependencies.gradle')
+}
+
+ext {
+    ext.isReleaseVersion = 
Boolean.parseBoolean(System.getenv('GRAILS_PUBLISH_RELEASE'))
+    ext."signing.keyId" = project.findProperty("signing.keyId") ?: 
System.getenv('SIGNING_KEY')
+    ext."signing.password" = project.findProperty("signing.password") ?: 
System.getenv('SIGNING_PASSPHRASE')
+    ext."signing.secretKeyRingFile" = 
project.findProperty("signing.secretKeyRingFile") ?: 
"${System.properties['user.home']}${File.separator}.gnupg${File.separator}secring.gpg"

Review Comment:
   Here we are setting `ext` within `ext`?
   Align on single quotes?



##########
grails-gradle/docs-core/build.gradle:
##########
@@ -0,0 +1,128 @@
+plugins {
+    id 'groovy'
+    id 'java-library'
+    id 'maven-publish'
+}
+
+version = projectVersion
+group = 'org.apache.grails'
+
+configurations {
+    // Required to keep Gradle classes off the test compile classpath.
+    gradleConf.extendsFrom compileClasspath
+}
+
+dependencies {
+    implementation platform(project(':grails-gradle-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"
+    compileOnly "org.codehaus.groovy:groovy-ant"
+
+    api "org.apache.commons:commons-text"
+    api "org.slf4j:jcl-over-slf4j"
+    api "org.apache.ant:ant"
+    api "org.grails:grails-gdoc-engine"
+    api "org.yaml:snakeyaml"
+
+    api "org.asciidoctor:asciidoctorj"
+    implementation "org.xhtmlrenderer:flying-saucer-pdf-openpdf"
+
+    runtimeOnly "org.slf4j:slf4j-api"
+
+    api "org.jsoup:jsoup"
+    testImplementation("org.spockframework:spock-core") { transitive = false }
+
+    testImplementation 'org.codehaus.groovy:groovy-test-junit5'
+    testImplementation 'org.junit.jupiter:junit-jupiter-api'
+    testImplementation 'org.junit.platform:junit-platform-runner'
+    testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
+    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
+}
+
+sourceSets {
+    main {
+        compileClasspath = configurations.gradleConf
+    }
+}
+
+tasks.register("docFilesJar", Jar) {
+    description = 'Package up files used for generating documentation.'
+    archiveVersion = null
+    archiveFileName = "grails-doc-files.jar"
+    from "src/main/template"
+}
+
+tasks.named('jar', Jar) {
+    from docFilesJar
+}
+
+jar.dependsOn docFilesJar
+
+apply {
+    from rootProject.layout.projectDirectory.file('gradle/docs-config.gradle')
+    from rootProject.layout.projectDirectory.file('gradle/java-config.gradle')
+    from rootProject.layout.projectDirectory.file('gradle/test-config.gradle')
+}
+
+
+publishing {
+    if (!isReleaseVersion) {
+        repositories {
+            maven {
+                credentials {
+                    def u = System.getenv("MAVEN_PUBLISH_USERNAME") ?: ''
+                    def p = System.getenv("MAVEN_PUBLISH_PASSWORD") ?: ''
+                    username = u
+                    password = p
+                }
+                url System.getenv("MAVEN_PUBLISH_URL") ?: 
'https://repository.apache.org/content/repositories/snapshots'
+            }
+        }

Review Comment:
   Simplify?
   ```groovy
   maven {
       credentials {
           username = System.getenv('MAVEN_PUBLISH_USERNAME')
           password = System.getenv('MAVEN_PUBLISH_PASSWORD')
       }
       url = uri(System.getenv('MAVEN_PUBLISH_URL') ?: 
'https://repository.apache.org/content/repositories/snapshots')
   }
   ```



##########
grails-gradle/gradle/java-config.gradle:
##########
@@ -0,0 +1,30 @@
+compileJava.options.release = javaVersion.toInteger()
+
+extensions.configure(JavaPluginExtension) {
+    // Explicit `it` is required here
+    it.withJavadocJar()
+    it.withJavadocJar()
+}
+
+tasks.withType(JavaCompile).configureEach {
+    it.options.deprecation = true
+    it.options.debug = true

Review Comment:
   Remove explicit `it`?



##########
.github/workflows/gradle.yml:
##########
@@ -103,9 +130,9 @@ jobs:
           MAVEN_PUBLISH_USERNAME: ${{ secrets.NEXUS_USER }}
           MAVEN_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PW  }}
         run: >
-          ./gradlew
-          -Dorg.gradle.internal.publish.checksums.insecure=true
-          publish
+          ./gradlew publish &&
+          cd grails-gradle && 
+          ./gradlew publish 
-Dorg.gradle.internal.publish.checksums.insecure=true
   docs:
     if: github.event_name == 'push' && 
needs.skip_check.outputs.found_skip_publish != 'true'
     needs: publish

Review Comment:
   Should `skip_check` also be in `needs` as we are referencing it in the above 
condition?



##########
grails-gradle/model/src/main/groovy/grails/io/IOUtils.groovy:
##########


Review Comment:
   Update license header year range?



##########
.github/workflows/gradle.yml:
##########
@@ -103,9 +130,9 @@ jobs:
           MAVEN_PUBLISH_USERNAME: ${{ secrets.NEXUS_USER }}
           MAVEN_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PW  }}
         run: >
-          ./gradlew
-          -Dorg.gradle.internal.publish.checksums.insecure=true
-          publish
+          ./gradlew publish &&
+          cd grails-gradle && 
+          ./gradlew publish 
-Dorg.gradle.internal.publish.checksums.insecure=true

Review Comment:
   Do we need the `-Dorg.gradle.internal.publish.checksums.insecure=true` 
option?



##########
grails-gradle/model/build.gradle:
##########
@@ -0,0 +1,104 @@
+plugins {
+    id 'groovy'
+    id 'java-library'
+    id 'project-report'
+    id 'maven-publish'
+}
+
+version = projectVersion
+group = 'org.apache.grails.gradle'
+
+dependencies {
+    implementation platform(project(':grails-gradle-bom'))
+
+    // compile grails-gradle-model with the Groovy version provided by Gradle
+    // to ensure build compatibility with Gradle, currently Groovy 3.0.x
+    // when used by grails-gradle-plugin
+    // see: https://docs.gradle.org/current/userguide/compatibility.html#groovy
+    compileOnly "org.codehaus.groovy:groovy"
+    compileOnly "org.codehaus.groovy:groovy-xml"
+
+    testImplementation 'org.codehaus.groovy:groovy-test-junit5'
+    testImplementation 'org.junit.jupiter:junit-jupiter-api'
+    testImplementation 'org.junit.platform:junit-platform-runner'
+
+    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
+
+    implementation "org.springframework:spring-context"
+    implementation "org.springframework.boot:spring-boot-autoconfigure" // 
required for org.springframework.boot.env.YamlPropertySourceLoader
+
+    compileOnly "jline:jline" // for profile compilation
+
+    api "org.yaml:snakeyaml"
+
+    // Logging
+    api 'org.slf4j:slf4j-api'
+    api 'org.slf4j:jcl-over-slf4j'
+
+    // Testing
+    testImplementation 'org.slf4j:slf4j-simple'
+    testImplementation('org.spockframework:spock-core') { transitive = false }
+    // Required by Spock's Mocking
+    testRuntimeOnly 'net.bytebuddy:byte-buddy'
+    testImplementation 'org.objenesis:objenesis'
+}
+
+apply {
+    from rootProject.layout.projectDirectory.file('gradle/docs-config.gradle')
+    from rootProject.layout.projectDirectory.file('gradle/java-config.gradle')
+    from rootProject.layout.projectDirectory.file('gradle/test-config.gradle')
+    //TODO: from 
rootProject.layout.projectDirectory.file('gradle/publish-config.gradle')
+}
+
+publishing {
+    if (!isReleaseVersion) {
+        repositories {
+            maven {
+                credentials {
+                    def u = System.getenv("MAVEN_PUBLISH_USERNAME") ?: ''
+                    def p = System.getenv("MAVEN_PUBLISH_PASSWORD") ?: ''
+                    username = u
+                    password = p
+                }
+                url System.getenv("MAVEN_PUBLISH_URL") ?: 
'https://repository.apache.org/content/repositories/snapshots'
+            }

Review Comment:
   Simplify like above example?



##########
grails-bootstrap/src/test/groovy/grails/io/IOUtilsSpec.groovy:
##########


Review Comment:
   `IOUtils` has been moved to the `grails-gradle-model` project. Should this 
`IOUtilsSpec` also move there?



##########
grails-gradle/model/src/main/groovy/org/grails/io/support/DefaultResourceLoader.java:
##########
@@ -84,8 +84,8 @@ public ClassLoader getClassLoader() {
     }
 
     public Resource getResource(String location) {
-        if (location.startsWith(CLASSPATH_URL_PREFIX)) {
-            return new 
ClassPathResource(location.substring(CLASSPATH_URL_PREFIX.length()), 
getClassLoader());
+        if (location.startsWith(ResourceLoader.CLASSPATH_URL_PREFIX)) {
+            return new 
ClassPathResource(location.substring(ResourceLoader.CLASSPATH_URL_PREFIX.length()),
 getClassLoader());

Review Comment:
   Do we need the explicit reference when we are implementing the interface.



##########
.github/workflows/gradle.yml:
##########
@@ -79,7 +106,7 @@ jobs:
         run: ./gradlew build -PonlyFunctionalTests
   publish:
     if: github.event_name == 'push' && 
needs.skip_check.outputs.found_skip_publish != 'true'
-    needs: [build, functional]
+    needs: [buildGradle, build, functional]

Review Comment:
   Should `skip_check` also be in this list, as it is referenced in the 
condition above?



##########
dependencies.gradle:
##########
@@ -0,0 +1,102 @@
+// see https://github.com/dependabot/dependabot-core/issues/1618
+// This file allows dependabot to update the gradle dependencies
+
+// This file provides the 'grails-bom' dependencies, while 
grails-gradle/dependencies.gradle provides the 'grails-gradle-bom' dependencies
+// These files are split to facilitate separation of build vs application 
dependencies. These are the application dependencies.
+ext {
+    bomDependencyVersions = [
+            'asset-pipeline-grails.version': '5.0.9',
+            'bootstrap-icons.version'      : '1.11.3',
+            'bootstrap.version'            : '5.3.3',
+            'commons-codec.version'        : '1.17.1',
+            'geb-spock.version'            : '7.0',
+            'grails-cache.version'         : '8.0.0-SNAPSHOT',
+            'grails-data.version'          : '9.0.0-SNAPSHOT',
+            'grails-geb.version'           : '5.0.0-SNAPSHOT',
+            'grails-profiles.version'      : '10.0.2',
+            'groovy.version'               : '4.0.25',
+            'gsp.version'                  : '7.0.0-SNAPSHOT',
+            'h2.version'                   : '2.3.232',
+            'jackson.version'              : '2.18.2',
+            'jquery.version'               : '3.7.1',
+            'liquibase-hibernate5.version' : '4.27.0',
+            'mongodb.version'              : '5.3.1',
+            'rxjava.version'               : '1.3.8',
+            'rxjava2.version'              : '2.2.21',
+            'rxjava3.version'              : '3.1.10',
+            'spock.version'                : '2.3-groovy-4.0',
+    ]
+
+    // Note: the name of the dependency must be the prefix of the property 
name so properties in the pom are resolved correctly
+    bomPlatformDependencies = [
+            spock_bom      : 
"org.spockframework:spock-bom:${bomDependencyVersions['spock.version']}",
+            jackson_bom    : 
"com.fasterxml.jackson:jackson-bom:${bomDependencyVersions['jackson.version']}",
+            groovy_bom     : 
"org.apache.groovy:groovy-bom:${bomDependencyVersions['groovy.version']}"
+    ]
+
+    // Note: the name of the dependency must be the prefix of the property 
name so properties in the pom are resolved correctly
+    bomDependencies = [

Review Comment:
   Is there a particular reason why we use snake_case and not kebab-case for 
the map keys?



##########
grails-core/src/main/groovy/grails/config/Config.groovy:
##########


Review Comment:
   Update license header year range?



##########
grails-core/build.gradle:
##########
@@ -33,7 +33,7 @@ dependencies {
 
     // This only needs the datastore version property because of how source 
jars are being created.
     // Build will succeed, but assemble will fail without this because of task 
ordering in gradle.

Review Comment:
   Is this comment still relevant?



##########
gradle/functional-test-config.gradle:
##########
@@ -21,6 +21,13 @@ configurations.configureEach {
     }
 }
 
+// work around for parallel builds due to 
https://github.com/bertramdev/asset-pipeline/issues/177
+if('assetCompile' in tasks.names) {
+    tasks.named('assetCompile').configure { Task task ->
+        task.outputs.dir 
rootProject.layout.buildDirectory.dir('asset-serialize')
+    }
+}

Review Comment:
   Simplify? (Also `tasks.named` does not need `.configure`, it is implied)
   ```groovy
   tasks.matching { 'assetCompile' == it.name }.configureEach {
       outputs.dir rootProject.layout.buildDirectory.dir('asset-serialize')
   }
   ```



##########
grails-core/src/main/groovy/org/grails/config/EnvironmentAwarePropertySource.java:
##########


Review Comment:
   Update license header year range?



##########
grails-core/src/main/groovy/org/grails/plugins/DefaultGrailsPlugin.java:
##########


Review Comment:
   Update license header year range?



##########
grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/DefaultLinkGenerator.groovy:
##########


Review Comment:
   Update license header year range?



##########
grails-core/src/main/groovy/org/grails/core/DefaultGrailsControllerClass.java:
##########


Review Comment:
   Update license header year range?



##########
grails-web-databinding/src/main/groovy/grails/web/databinding/DataBindingUtils.java:
##########


Review Comment:
   Update license header year range?



##########
grails-core/src/main/groovy/org/grails/core/cfg/GroovyConfigPropertySourceLoader.groovy:
##########


Review Comment:
   Update license header year range?



##########
grails-dependencies/build.gradle:
##########
@@ -12,26 +12,32 @@ ext {
 
 def configurations = [
         'api': [
-                "org.apache.grails.bootstrap:grails-bootstrap:$version",
-                "org.apache.grails:grails-rest-transforms:$version",
-                "org.apache.grails:grails-databinding:$version",
-                "org.apache.grails:grails-i18n:$version",
-                "org.apache.grails:grails-services:$version",
-                "org.apache.grails:grails-url-mappings:$version",
-                "org.apache.grails:grails-interceptors:$version",
-                "org.apache.grails:grails-async:$version",
-                "org.apache.grails:grails-events:$version",
-                "org.apache.grails:grails-gsp:${property('gsp.version')}",
+                ":grails-core",
+                ":grails-rest-transforms",
+                ":grails-databinding",
+                ":grails-i18n",
+                ":grails-services",
+                ":grails-url-mappings",
+                ":grails-interceptors",
+                ":grails-async-plugin",
+                ":grails-events-plugin",
+                "org.apache.grails:grails-gsp",
         ],
         'runtimeOnly': [
-                "com.h2database:h2:${property('h2.version')}",
+                "com.h2database:h2",
         ]
 ]

Review Comment:
   Align on single quotes?



##########
grails-events/plugin/build.gradle:
##########
@@ -24,7 +24,6 @@ dependencies {
 
     // As this is a plugin these dependencies will be provided by the Grails 
application
     // This removes circular dependencies
-    compileOnly project(':grails-bootstrap')

Review Comment:
   As `GrailsNameUtils` used in `SpringEventTranslator` has been moved from 
`grails-bootstrap` to `grails-gradle-model`, should this dependency also be 
changed to `grails-gradle-model` instead of deleted?
   
   Also there is a `testRuntimeOnly project(':grails-bootstrap')` further down 
that probably also should be changed to `grails-gradle-model`.
   
   This also begs the question if we should create another layer with these 
kind of base utility classes (which only depends on groovy or java) so we are 
not having to rely on `gradle` projects in `core` projects and vice versa.



##########
grails-gradle/build.gradle:
##########
@@ -0,0 +1,62 @@
+
+Properties props = new Properties()
+file('../gradle.properties').withInputStream {
+    props.load(it)
+}
+
+allprojects {
+    repositories {
+        // mavenLocal()
+        mavenCentral()
+        gradlePluginPortal()
+    }
+
+    for (Map.Entry<Object, Object> entry : props.entrySet()) {
+        project.ext[entry.key as String] = entry.value
+    }
+    apply from: rootProject.layout.projectDirectory.file('dependencies.gradle')
+}
+
+ext {
+    ext.isReleaseVersion = 
Boolean.parseBoolean(System.getenv('GRAILS_PUBLISH_RELEASE'))
+    ext."signing.keyId" = project.findProperty("signing.keyId") ?: 
System.getenv('SIGNING_KEY')
+    ext."signing.password" = project.findProperty("signing.password") ?: 
System.getenv('SIGNING_PASSPHRASE')
+    ext."signing.secretKeyRingFile" = 
project.findProperty("signing.secretKeyRingFile") ?: 
"${System.properties['user.home']}${File.separator}.gnupg${File.separator}secring.gpg"
+    isCiBuild = System.getenv().get('CI') as Boolean
+}
+if (project.ext.isReleaseVersion) {

Review Comment:
   No need to reference `project.ext` here?
   `if (isReleaseVersion)` should be enough?



##########
grails-gradle/buildSrc/build.gradle:
##########
@@ -0,0 +1,21 @@
+plugins {
+    id 'groovy-gradle-plugin'
+}
+
+apply {
+    from file('../dependencies.gradle')
+}
+
+repositories {
+    // mavenLocal()
+    mavenCentral()
+    gradlePluginPortal()
+}
+
+dependencies {
+//    implementation 
"gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:$gradleProperties.gradleLicensePluginVersion",
 {
+//        // Due to 
https://github.com/hierynomus/license-gradle-plugin/issues/161, spring must be 
excluded
+//        exclude group: 'org.springframework', module: 'spring-core'
+//    }

Review Comment:
   Remove comment?



##########
grails-gradle/build.gradle:
##########
@@ -0,0 +1,62 @@
+
+Properties props = new Properties()
+file('../gradle.properties').withInputStream {
+    props.load(it)
+}
+
+allprojects {
+    repositories {
+        // mavenLocal()
+        mavenCentral()
+        gradlePluginPortal()
+    }
+
+    for (Map.Entry<Object, Object> entry : props.entrySet()) {
+        project.ext[entry.key as String] = entry.value
+    }
+    apply from: rootProject.layout.projectDirectory.file('dependencies.gradle')
+}
+
+ext {
+    ext.isReleaseVersion = 
Boolean.parseBoolean(System.getenv('GRAILS_PUBLISH_RELEASE'))
+    ext."signing.keyId" = project.findProperty("signing.keyId") ?: 
System.getenv('SIGNING_KEY')
+    ext."signing.password" = project.findProperty("signing.password") ?: 
System.getenv('SIGNING_PASSPHRASE')
+    ext."signing.secretKeyRingFile" = 
project.findProperty("signing.secretKeyRingFile") ?: 
"${System.properties['user.home']}${File.separator}.gnupg${File.separator}secring.gpg"
+    isCiBuild = System.getenv().get('CI') as Boolean
+}
+if (project.ext.isReleaseVersion) {
+    apply plugin: "io.github.gradle-nexus.publish-plugin"
+    apply plugin: 'signing'
+
+    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
+            }

Review Comment:
   Simplify?
   ```groovy
   sonatype {
       nexusUrl = uri('https://s01.oss.sonatype.org/service/local')
       username = System.getenv('SONATYPE_USERNAME') ?: 
project.findProperty('sonatypeOssUsername')
       password = System.getenv('SONATYPE_PASSWORD') ?: 
project.findProperty('sonatypeOssPassword')
       stagingProfileId = System.getenv('SONATYPE_STAGING_PROFILE_ID') ?: 
project.findProperty('sonatypeOssStagingProfileId')
   }
   ```



##########
grails-gradle/dependencies.gradle:
##########
@@ -0,0 +1,58 @@
+// see https://github.com/dependabot/dependabot-core/issues/1618
+// This file allows dependabot to update the gradle dependencies
+
+// This file provides the 'grails-gradle-bom' dependencies, while 
/dependencies.gradle provides the 'grails-bom' dependencies
+// These files are split to facilitate separation of build vs application 
dependencies.  These are the build dependencies.
+ext {
+    bomDependencyVersions = [
+            'ant.version'                        : '1.10.15',
+            'asciidoctorj.version'               : '3.0.0',
+            'asset-pipeline-gradle.version'      : '5.0.8',
+            'byte-buddy.version'                 : '1.15.5',
+            'commons-text.version'               : '1.12.0',
+            'directory-watcher.version'          : '0.18.0',
+            'flying-saucer-pdf-openpdf.version'  : '9.4.0',
+            'grails-gdoc-engine.version'         : '1.0.1',
+            'jansi.version'                      : '1.18',
+            'javaparser-core.version'            : '3.26.2',
+            'jline.version'                      : '2.14.6',
+            'jna.version'                        : '5.16.0',
+            'jquery.version'                     : '3.7.1',
+            'jsoup.version'                      : '1.18.3',
+            'objenesis.version'                  : '3.4',
+            'profiles.version'                   : '10.0.2',
+            'gradle-spock.version'               : '2.3-groovy-3.0',
+            'gradle-nexus-publish-plugin.version': '2.0.0',
+            'spring-boot.version'                : '3.4.2',
+            'springloaded.version'               : '1.2.8.RELEASE',
+    ]
+
+    // Note: the name of the dependency must be the prefix of the property 
name so properties in the pom are resolved correctly
+    bomPlatformDependencies = [

Review Comment:
   Any particular reason to use snake_case instead of kebab-case for the map 
keys?



##########
grails-gradle/gradle/docs-config.gradle:
##########
@@ -0,0 +1,39 @@
+configurations.register('documentation')
+dependencies {
+    add('documentation', platform(project(':grails-gradle-bom')))
+    add('documentation', 'org.fusesource.jansi:jansi')
+    add('documentation', 'jline:jline')
+    add('documentation', 'com.github.javaparser:javaparser-core')
+    add('documentation', "org.codehaus.groovy:groovy")
+    add('documentation', "org.codehaus.groovy:groovy-ant")
+    add('documentation', "org.codehaus.groovy:groovy-docgenerator")
+    add('documentation', "org.codehaus.groovy:groovy-templates")
+}
+
+ext {
+    includeInApiDocs = true
+}
+
+tasks.named('groovydoc', Groovydoc) {
+    classpath = configurations.documentation
+    groovyClasspath = configurations.documentation
+    access = GroovydocAccess.PROTECTED
+    includeAuthor = true
+    includeMainForScripts = false
+    processScripts = false
+}
+
+configure([groovydoc]) {
+    destinationDir = project.file('build/docs/api')

Review Comment:
   Move to the configuration block above?



##########
grails-gradle/gradle.properties:
##########
@@ -0,0 +1,8 @@
+# This groovy version should be the version built with grails applications and 
NOT the one used by this project
+# since this project must use gradle's groovy version.  This property will be 
used to set up the test projects
+# like grails would be to ensure proper test coverage
+e2eGroovyVersion=4.0.24

Review Comment:
   Should we be able to resolve this version now?



##########
grails-gradle/gradle/docs-config.gradle:
##########
@@ -0,0 +1,39 @@
+configurations.register('documentation')
+dependencies {
+    add('documentation', platform(project(':grails-gradle-bom')))
+    add('documentation', 'org.fusesource.jansi:jansi')
+    add('documentation', 'jline:jline')
+    add('documentation', 'com.github.javaparser:javaparser-core')
+    add('documentation', "org.codehaus.groovy:groovy")
+    add('documentation', "org.codehaus.groovy:groovy-ant")
+    add('documentation', "org.codehaus.groovy:groovy-docgenerator")
+    add('documentation', "org.codehaus.groovy:groovy-templates")
+}
+
+ext {
+    includeInApiDocs = true
+}
+
+tasks.named('groovydoc', Groovydoc) {
+    classpath = configurations.documentation
+    groovyClasspath = configurations.documentation
+    access = GroovydocAccess.PROTECTED
+    includeAuthor = true
+    includeMainForScripts = false
+    processScripts = false
+}
+
+configure([groovydoc]) {
+    destinationDir = project.file('build/docs/api')
+}
+
+configure([javadoc]) {
+    options.encoding 'UTF-8'
+    options.docEncoding 'UTF-8'
+    options.charSet 'UTF-8'
+    options.jFlags '-Xms64M', '-Xmx512M'
+}
+
+tasks.named('build').configure {

Review Comment:
   No need to use `.configure`, as it is implied?



##########
grails-gradle/gradle/docs-config.gradle:
##########
@@ -0,0 +1,39 @@
+configurations.register('documentation')
+dependencies {
+    add('documentation', platform(project(':grails-gradle-bom')))
+    add('documentation', 'org.fusesource.jansi:jansi')
+    add('documentation', 'jline:jline')
+    add('documentation', 'com.github.javaparser:javaparser-core')
+    add('documentation', "org.codehaus.groovy:groovy")
+    add('documentation', "org.codehaus.groovy:groovy-ant")
+    add('documentation', "org.codehaus.groovy:groovy-docgenerator")
+    add('documentation', "org.codehaus.groovy:groovy-templates")
+}
+
+ext {
+    includeInApiDocs = true
+}
+
+tasks.named('groovydoc', Groovydoc) {
+    classpath = configurations.documentation
+    groovyClasspath = configurations.documentation
+    access = GroovydocAccess.PROTECTED
+    includeAuthor = true
+    includeMainForScripts = false
+    processScripts = false
+}
+
+configure([groovydoc]) {
+    destinationDir = project.file('build/docs/api')
+}
+
+configure([javadoc]) {
+    options.encoding 'UTF-8'
+    options.docEncoding 'UTF-8'
+    options.charSet 'UTF-8'
+    options.jFlags '-Xms64M', '-Xmx512M'
+}

Review Comment:
   Modernize?
   ```groovy
   tasks.named('javadoc', Javadoc) {
       (options as StandardJavadocDocletOptions).with {
           encoding = 'UTF-8'
           docEncoding = 'UTF-8'
           charSet = 'UTF-8'
           addStringOption('-Xms64M')
           addStringOption('-Xmx512M')
       }
   }
   ```



##########
grails-gradle/model/src/main/groovy/org/grails/io/support/DefaultResourceLoader.java:
##########


Review Comment:
   Update license header year range (if we do the suggested changes in the 
file)?



##########
grails-gradle/model/src/main/groovy/grails/io/IOUtils.groovy:
##########
@@ -67,7 +67,7 @@ class IOUtils extends SpringIOUtils {
      */
     static String toString(Reader reader) {
         def writer = new StringWriter()
-        copy reader, writer
+        org.grails.io.support.SpringIOUtils.copy reader, writer

Review Comment:
   Do we need a qualified reference (`SpringIOUtils` is imported)?
   Use method parentheses?



##########
grails-gradle/model/src/main/groovy/grails/io/IOUtils.groovy:
##########
@@ -90,7 +90,7 @@ class IOUtils extends SpringIOUtils {
      */
     static void copy(InputStream input, Writer output, String encoding = null) 
{
         def reader = encoding ? new InputStreamReader(input, encoding) : new 
InputStreamReader(input)
-        copy(reader, output)
+        org.grails.io.support.SpringIOUtils.copy(reader, output)

Review Comment:
   Do we need a qualified reference (`SpringIOUtils` is imported)?



##########
grails-web-core/src/main/groovy/org/grails/web/servlet/boostrap/DefaultGrailsBootstrapClass.java:
##########


Review Comment:
   Update license header year range?



##########
grails-shell-cli/src/main/groovy/org/grails/cli/gradle/GradleInvoker.groovy:
##########


Review Comment:
   Update license header year range?



##########
grails-gradle/plugins/build.gradle:
##########
@@ -0,0 +1,169 @@
+plugins {
+    id 'groovy'
+    id 'java-gradle-plugin'
+    id 'maven-publish'
+}
+
+version = project.projectVersion
+group = "org.apache.grails"
+
+dependencies {
+    implementation platform(project(":grails-gradle-bom"))
+
+    // compile grails-gradle-plugin with the Groovy version provided by Gradle
+    // to ensure build compatibility with Gradle, currently Groovy 3.0.x
+    // see: https://docs.gradle.org/current/userguide/compatibility.html#groovy
+    compileOnly "org.codehaus.groovy:groovy"
+
+    implementation project(':grails-gradle-model'), {
+        exclude group: 'org.apache.groovy'
+        exclude group: 'org.spockframework'
+    }
+
+    implementation "io.github.gradle-nexus:publish-plugin"
+    implementation "org.springframework.boot:spring-boot-gradle-plugin"
+    implementation "org.springframework.boot:spring-boot-loader-tools"
+    implementation "io.spring.gradle:dependency-management-plugin"
+}
+
+gradlePlugin {
+    plugins {
+        grailsCore {
+            displayName = "Grails Core Gradle Plugin"
+            description = 'The main Grails gradle plugin implementation'
+            id = 'org.apache.grails.gradle.grails-app'
+            implementationClass = 
'org.grails.gradle.plugin.core.GrailsGradlePlugin'
+        }
+        grailsDoc {
+            displayName = "Grails Doc Gradle Plugin"
+            description = 'Adds Grails doc publishing support'
+            id = 'org.apache.grails.gradle.grails-docs'
+            implementationClass = 
'org.grails.gradle.plugin.doc.GrailsDocGradlePlugin'
+        }
+        grailsGsp {
+            displayName = "Grails GSP Gradle Plugin"
+            description = 'A plugin that adds support for compiling Groovy 
Server Pages (GSP)'
+            id = 'org.apache.grails.gradle.grails-gsp'
+            implementationClass = 
'org.grails.gradle.plugin.views.gsp.GroovyPagePlugin'
+        }
+        grailsGson {
+            displayName = "Grails GSON Gradle Plugin"
+            description = 'A plugin that adds support for compiling Groovy 
Json Views (GSON)'
+            id = 'org.apache.grails.gradle.grails-gson'
+            implementationClass = 
'org.grails.gradle.plugin.views.json.GrailsGsonViewsPlugin'
+        }
+        grailsMarkup {
+            displayName = "Grails Markup Gradle Plugin"
+            description = 'A plugin that adds support for compiling Markup 
Views'
+            id = 'org.apache.grails.gradle.grails-markup'
+            implementationClass = 
'org.grails.gradle.plugin.views.markup.GrailsMarkupViewsPlugin'
+        }
+        grailsPlugin {
+            displayName = "Grails-Plugin Gradle Plugin"
+            description = 'A Gradle plugin for Grails plugins'
+            id = 'org.apache.grails.gradle.grails-plugin'
+            implementationClass = 
'org.grails.gradle.plugin.core.GrailsPluginGradlePlugin'
+        }
+        grailsProfile {
+            displayName = "Grails Profile Gradle Plugin"
+            description = 'A plugin that is capable of compiling a Grails 
profile into a JAR file for distribution'
+            id = 'org.apache.grails.gradle.grails-profile'
+            implementationClass = 
'org.grails.gradle.plugin.profiles.GrailsProfileGradlePlugin'
+        }
+        grailsWeb {
+            displayName = "Grails Web Gradle Plugin"
+            description = 'Adds web specific extensions'
+            id = 'org.apache.grails.gradle.grails-web'
+            implementationClass = 
'org.grails.gradle.plugin.web.GrailsWebGradlePlugin'
+        }
+        grailsPublish {
+            displayName = "Grails Publish Gradle Plugin"
+            description = 'A plugin to assist in publishing Grails related 
artifacts'
+            id = 'org.apache.grails.gradle.grails-publish'
+            implementationClass = 
'org.grails.gradle.plugin.publishing.GrailsPublishGradlePlugin'
+        }
+        grailsProfilePublish {
+            displayName = "Grails Profile Publish Plugin"
+            description = 'A plugin for publishing profiles'
+            id = 'org.apache.grails.gradle.grails-publish-profile'
+            implementationClass = 
'org.grails.gradle.plugin.profiles.GrailsProfilePublishGradlePlugin'
+        }
+    }
+}
+
+tasks.withType(Copy) {
+    configure {
+        duplicatesStrategy = DuplicatesStrategy.INCLUDE
+    }
+}
+
+publishing {
+    if (!isReleaseVersion) {
+        repositories {
+            maven {
+                credentials {
+                    def u = System.getenv("MAVEN_PUBLISH_USERNAME") ?: ''
+                    def p = System.getenv("MAVEN_PUBLISH_PASSWORD") ?: ''
+                    username = u
+                    password = p
+                }
+                url System.getenv("MAVEN_PUBLISH_URL") ?: 
'https://repository.apache.org/content/repositories/snapshots'

Review Comment:
   Simplify according to above suggestions?



##########
grails-shell-cli/src/main/groovy/org/grails/cli/GrailsCli.groovy:
##########


Review Comment:
   Update license header year range?



-- 
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]


Reply via email to