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 {
- 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 classpath
- //
https://www.adam-bien.com/roller/abien/entry/trouble_with_crippled_java_ee
- if (classpath) {
- classpath -= classpath.filter { it.name ==
'javaee-web-api-6.0.jar' }
- }
+subprojects {
- // this will apply the javadoc fix tool to all generated javadocs
- // we use it to make sure that the javadocs are not vulnerable
independently of the JDK used to build
- doLast {
- def javadocFix = new JavadocFixTool()
- javadocFix.recursive = true
- javadocFix.doPatch = true
- javadocFix.searchAndPatch(destinationDir)
+ configurations.configureEach {
+ resolutionStrategy {
+ def cacheHours = isCiBuild ? 0 : 24
+ cacheDynamicVersionsFor(cacheHours, 'hours')
+ cacheChangingModulesFor(cacheHours, 'hours')
+ eachDependency { DependencyResolveDetails details ->
+ if (details.requested.group == 'org.apache.groovy') {
+ details.useVersion(groovyVersion)
+ }
+ if (details.requested.group == 'org.spockframework') {
+ details.useVersion(findProperty('spock.version') as String)
+ }
}
}
-
}
- tasks.withType(Javadoc) {
- options.addStringOption('Xdoclint:none', '-quiet')
- }
-
- // This added to prevent remote cache miss, because project JAR include
manifest file with Build-By and Created-By properties which might be different
for CI vs Local.
+ // This is added to prevent a remote cache misses, because the project JAR
include a manifest
+ // file with Built-By and Created-By properties which might be different
for CI vs Local.
normalization {
runtimeClasspath {
metaInf {
- ignoreAttribute("Built-By")
- ignoreAttribute("Created-By")
+ ignoreAttribute('Built-By')
Review Comment:
Let's assume we remove the properties, then would this still be required?
Can we remove this + remove the jar properties?
##########
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:
Why keep the attribute addition when we build in github actions and no other
'core' project does this?
##########
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:
grailsPublish ties groovydoc and javadoc as long as you have this:
java {
withSourcesJar()
withJavadocJar()
}
Why is this needed here?
##########
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) {
+ classpath = configurations.documentation
+ groovyClasspath = configurations.documentation
+ access = GroovydocAccess.PRIVATE
Review Comment:
We have been changing these to protected in other projects, can we change it
here?
##########
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:
This is fine for this review, but I would like to fix this separately:
What do you think about fixing this by adding a 'bom' property to grails
publish? It would remove this requirement and be a way to convey this project
only publishes dependencies. I am open to other names for the property if you
can think of one.
##########
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:
can we declare the grails-web dependency as a separate api dependency?
##########
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:
Can we please split these across multiple lines?
##########
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:
We probably should create a ticket to adopt jacoco and setup a github
actions to publish code coverage %
##########
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 mist use the groovy version of
gradle.
##########
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:
single quotes?
##########
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:
single quotes?
##########
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:
From what I can tell, `homeDistDir` is set to `dist` in the root project
directory.
So the same concern I have with installToHomeDist, I have here. What
ensures the changed dependencies are actually repopulated and old jars aren't
left in that directory? I don't see a clean-up of this directory.
##########
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:
single quotes?
##########
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:
split & single quotes?
##########
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:
Can we split the dependencies into their own lines and scopes?
##########
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:
single quotes?
##########
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:
side topic: isn't this in the grails views project? This seems like a
reason to bring views into core
##########
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:
Can we split these?
##########
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:
Do you know why we include the transitive other places but exclude it here?
##########
grails-test-suite-base/build.gradle:
##########
@@ -7,4 +19,35 @@ dependencies {
project(':grails-plugin-domain-class')
api project(":grails-plugin-converters")
Review Comment:
single quotes?
##########
gradle/assemble-config.gradle:
##########
@@ -0,0 +1,19 @@
+tasks.register('installToHomeDist', Copy) {
Review Comment:
From what I can tell, `distInstallDir` is set to `build/dist-tmp` in the
root project.
This is included in each project, so that means each project will copy it's
jars into this directory. That means we can't use the `Sync` task to "cleanup"
what's not supposed to belong. That's unfortunate: if the dependencies change,
how do we ensure the old dependency isn't still copied to build/dist-tmp? I
don't see any code that forces a clean when these tasks are run across
projects.
##########
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:
single quotes?
##########
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:
What are your thoughts about adding a property to the root that captures the
list of projects that are published but not a test / bom / dependency set? It
seems like this logic is still used after the refactor so having it in one
place would make this easier.
It seems this set of projects is used more than once in this file alone.
##########
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:
single quotes?
##########
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:
Shouldn't this be the same set of projects from the line#44 comment?
##########
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:
Can we removed the commented code?
##########
gradle/assemble-config.gradle:
##########
@@ -0,0 +1,19 @@
+tasks.register('installToHomeDist', Copy) {
+ inputs.files(tasks.named('jar').map { it.outputs.files })
Review Comment:
Isn't what determines the input to this task what creates the libs? Thus,
it's just the configuration that's needed? Shouldn't we let gradle determine
the files by the configuration instead of explicitly listing them all?
##########
gradle/assemble-root-config.gradle:
##########
@@ -5,40 +5,23 @@ import org.grails.gradle.GrailsBuildPlugin
apply plugin: GrailsBuildPlugin
-List<Configuration> 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:
Shouldn't this exclude `org.apache.groovy` too?
##########
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?
// 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
##########
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
Review Comment:
Is this mapping still needed? Each project will specify it directly now,
yes?
##########
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:
Now that we have the projects specifying `pomArtifactId` and the group is
defined inside of the project, do we even need this mapping? Can't this now be
`${possibleProject.group}:${possibleProject.pomArtifactId ?:
possibleProject.name}`?
##########
grails-bom/build.gradle:
##########
@@ -15,6 +19,9 @@ def versions = new Properties()
versions.load(new StringReader(new
File("$projectDir.parentFile/gradle.properties").text))
ext {
Review Comment:
Can we update the task registrations in this file to be lazy?
--
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]