matrei commented on code in PR #14133:
URL: https://github.com/apache/grails-core/pull/14133#discussion_r2044628202
##########
grails-gradle/build.gradle:
##########
@@ -11,40 +11,36 @@ allprojects {
gradlePluginPortal()
}
- for (Map.Entry<Object, Object> entry : props.entrySet()) {
- project.ext[entry.key as String] = entry.value
- }
+ props.forEach { k, v -> project.ext.set(k as String, v) }
+
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"
+ 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"
+if (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
+ nexusUrl = uri('https://s01.oss.sonatype.org/service/local/')
+ username = System.getenv('SONATYPE_USERNAME') ?:
project.hasProperty('sonatypeOssUsername') ?
project.findProperty('sonatypeOssUsername') : ''
+ password = System.getenv('SONATYPE_PASSWORD') ?:
project.hasProperty('sonatypeOssPassword') ?
project.findProperty('sonatypeOssPassword') : ''
+ stagingProfileId =
System.getenv('SONATYPE_STAGING_PROFILE_ID') ?:
project.hasProperty('sonatypeOssStagingProfileId') ?
project.findProperty('sonatypeOssStagingProfileId') : ''
Review Comment:
We don't need the `hasProperty`.
--
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]