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 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:
We should keep this and 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]