matrei commented on code in PR #14937:
URL: https://github.com/apache/grails-core/pull/14937#discussion_r2260428668
##########
grails-gradle/gradle/publish-config.gradle:
##########
@@ -16,10 +16,26 @@
* specific language governing permissions and limitations
* under the License.
*/
+
import org.gradle.crypto.checksum.Checksum
+import org.apache.grails.gradle.publish.GrailsPublishExtension
-apply plugin: 'org.gradle.crypto.checksum'
+extensions.configure(GrailsPublishExtension) {
+ // Explicit `it` is required here
+ it.artifactId = findProperty('pomArtifactId') ?: project.name
+ it.githubSlug = findProperty('githubSlug')
+ it.license.name = 'Apache-2.0'
+ it.title = findProperty('pomTitle') ?: 'GrailsĀ® framework'
+ it.desc = findProperty('pomDescription') ?: 'Grails Web Application
Framework'
+ it.developers = findProperty('pomDevelopers') as Map<String, String> ?:
[graemerocher: 'Graeme Rocher', jeffscottbrown: 'Jeff Scott Brown', puneetbehl:
'Puneet Behl']
+ it.pomCustomization = findProperty('pomCustomization') as Closure
+ it.publishTestSources = findProperty('pomPublishTestSources') ?: false
+ it.testRepositoryPath =
rootProject.layout.projectDirectory.dir('../build/local-maven')
+ it.publicationName = findProperty('pomMavenPublicationName') ?: 'maven'
+ it.addComponents = project.name != 'grails-gradle-plugins'
+}
+apply plugin: 'org.gradle.crypto.checksum'
Review Comment:
Apply plugins at the top?
```suggestion
apply plugin: 'org.gradle.crypto.checksum'
extensions.configure(GrailsPublishExtension) {
// Explicit `it` is required here
it.artifactId = findProperty('pomArtifactId') ?: project.name
it.githubSlug = findProperty('githubSlug')
it.license.name = 'Apache-2.0'
it.title = findProperty('pomTitle') ?: 'GrailsĀ® framework'
it.desc = findProperty('pomDescription') ?: 'Grails Web Application
Framework'
it.developers = findProperty('pomDevelopers') as Map<String, String> ?:
[graemerocher: 'Graeme Rocher', jeffscottbrown: 'Jeff Scott Brown', puneetbehl:
'Puneet Behl']
it.pomCustomization = findProperty('pomCustomization') as Closure
it.publishTestSources = findProperty('pomPublishTestSources') ?: false
it.testRepositoryPath =
rootProject.layout.projectDirectory.dir('../build/local-maven')
it.publicationName = findProperty('pomMavenPublicationName') ?: 'maven'
it.addComponents = project.name != 'grails-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]