You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by jd...@apache.org on 2025/05/27 18:21:28 UTC

(grails-core) branch 7.0.x updated (cbb7532e96 -> 936e1851b4)

This is an automated email from the ASF dual-hosted git repository.

jdaugherty pushed a change to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/grails-core.git


    from cbb7532e96 ensure the apache repo is always after the combined grails repo
     new d9d6b41047 correctly apply signing configuration
     new 936e1851b4 Add helper to find stage profile id

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../{release-notes.yml => retrieveProfileId.yml}   | 42 ++++++++++------------
 grails-gradle/build.gradle                         | 29 ++++-----------
 grails-gradle/docs-core/build.gradle               |  1 +
 .../gradle/signing-config.gradle                   | 36 ++++++++-----------
 grails-gradle/model/build.gradle                   |  1 +
 grails-gradle/plugins/build.gradle                 |  1 +
 grails-gradle/tasks/build.gradle                   |  1 +
 7 files changed, 45 insertions(+), 66 deletions(-)
 copy .github/workflows/{release-notes.yml => retrieveProfileId.yml} (53%)
 copy grails-data-graphql/examples/grails-test-app/grails-app/domain/grails/test/app/Tag.groovy => grails-gradle/gradle/signing-config.gradle (55%)


(grails-core) 01/02: correctly apply signing configuration

Posted by jd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jdaugherty pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit d9d6b4104799900207456df27f0b56f226d7290b
Author: James Daugherty <jd...@jdresources.net>
AuthorDate: Tue May 27 14:21:05 2025 -0400

    correctly apply signing configuration
---
 grails-gradle/build.gradle                 | 29 +++++----------------
 grails-gradle/docs-core/build.gradle       |  1 +
 grails-gradle/gradle/signing-config.gradle | 41 ++++++++++++++++++++++++++++++
 grails-gradle/model/build.gradle           |  1 +
 grails-gradle/plugins/build.gradle         |  1 +
 grails-gradle/tasks/build.gradle           |  1 +
 6 files changed, 52 insertions(+), 22 deletions(-)

diff --git a/grails-gradle/build.gradle b/grails-gradle/build.gradle
index 334823acd3..47c70ab81e 100644
--- a/grails-gradle/build.gradle
+++ b/grails-gradle/build.gradle
@@ -53,37 +53,22 @@ ext {
     isCiBuild = System.getenv().get('CI') as Boolean
     configuredTestParallel = findProperty('maxTestParallel') as Integer ?: (isCiBuild ? 3 : Runtime.runtime.availableProcessors() * 3/4 as int ?: 1)
 }
+
 if (isReleaseVersion) {
     apply plugin: 'io.github.gradle-nexus.publish-plugin'
-    apply plugin: 'signing'
 
     nexusPublishing {
         repositories {
             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')
+                if(System.getenv('NEXUS_PUBLISH_URL')) {
+                    nexusUrl = uri(System.getenv('NEXUS_PUBLISH_URL'))
+                }
+                username = System.getenv('NEXUS_PUBLISH_USERNAME')
+                password = System.getenv('NEXUS_PUBLISH_PASSWORD')
+                stagingProfileId = System.getenv('NEXUS_PUBLISH_STAGING_PROFILE_ID')
             }
         }
     }
-
-    afterEvaluate {
-        signing {
-            required { isReleaseVersion && gradle.taskGraph.hasTask('publish') }
-            Publication[] publications = new Publication[publishing.publications.size()]
-            publishing.publications.findAll().toArray(publications)
-            sign(publications)
-        }
-    }
-
-    tasks.withType(Sign) {
-        onlyIf { isReleaseVersion }
-    }
-
-    tasks.withType(io.github.gradlenexus.publishplugin.InitializeNexusStagingRepository).configureEach {
-        shouldRunAfter(tasks.withType(Sign))
-    }
 }
 
 tasks.register("aggregateChecksums") {
diff --git a/grails-gradle/docs-core/build.gradle b/grails-gradle/docs-core/build.gradle
index 2e4e215282..bf4eaa0d0b 100644
--- a/grails-gradle/docs-core/build.gradle
+++ b/grails-gradle/docs-core/build.gradle
@@ -145,4 +145,5 @@ apply {
     from rootProject.layout.projectDirectory.file('gradle/docs-config.gradle')
     from rootProject.layout.projectDirectory.file('gradle/test-config.gradle')
     from rootProject.layout.projectDirectory.file('gradle/checksum-config.gradle')
+    from rootProject.layout.projectDirectory.file('gradle/signing-config.gradle')
 }
\ No newline at end of file
diff --git a/grails-gradle/gradle/signing-config.gradle b/grails-gradle/gradle/signing-config.gradle
new file mode 100644
index 0000000000..d06001245e
--- /dev/null
+++ b/grails-gradle/gradle/signing-config.gradle
@@ -0,0 +1,41 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    https://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+import io.github.gradlenexus.publishplugin.InitializeNexusStagingRepository
+
+if (isReleaseVersion) {
+    apply plugin: 'signing'
+
+    afterEvaluate {
+        signing {
+            required { isReleaseVersion && gradle.taskGraph.hasTask('publish') }
+            Publication[] publications = new Publication[publishing.publications.size()]
+            publishing.publications.findAll().toArray(publications)
+            sign(publications)
+        }
+    }
+
+    tasks.withType(Sign) {
+        onlyIf { isReleaseVersion }
+    }
+
+    project.rootProject.tasks.withType(InitializeNexusStagingRepository).configureEach { InitializeNexusStagingRepository task ->
+        task.shouldRunAfter = project.tasks.withType(Sign)
+    }
+}
+
diff --git a/grails-gradle/model/build.gradle b/grails-gradle/model/build.gradle
index 41b9c238c1..07ee181901 100644
--- a/grails-gradle/model/build.gradle
+++ b/grails-gradle/model/build.gradle
@@ -124,4 +124,5 @@ apply {
     from rootProject.layout.projectDirectory.file('gradle/docs-config.gradle')
     from rootProject.layout.projectDirectory.file('gradle/test-config.gradle')
     from rootProject.layout.projectDirectory.file('gradle/checksum-config.gradle')
+    from rootProject.layout.projectDirectory.file('gradle/signing-config.gradle')
 }
\ No newline at end of file
diff --git a/grails-gradle/plugins/build.gradle b/grails-gradle/plugins/build.gradle
index 9b8affaf1f..c5c7a58630 100644
--- a/grails-gradle/plugins/build.gradle
+++ b/grails-gradle/plugins/build.gradle
@@ -186,4 +186,5 @@ apply {
     from rootProject.layout.projectDirectory.file('gradle/docs-config.gradle')
     from rootProject.layout.projectDirectory.file('gradle/e2eTest.gradle')
     from rootProject.layout.projectDirectory.file('gradle/checksum-config.gradle')
+    from rootProject.layout.projectDirectory.file('gradle/signing-config.gradle')
 }
diff --git a/grails-gradle/tasks/build.gradle b/grails-gradle/tasks/build.gradle
index a85ac9e58f..4a4b65a108 100644
--- a/grails-gradle/tasks/build.gradle
+++ b/grails-gradle/tasks/build.gradle
@@ -112,4 +112,5 @@ apply {
     from rootProject.layout.projectDirectory.file('gradle/docs-config.gradle')
     from rootProject.layout.projectDirectory.file('gradle/test-config.gradle')
     from rootProject.layout.projectDirectory.file('gradle/checksum-config.gradle')
+    from rootProject.layout.projectDirectory.file('gradle/signing-config.gradle')
 }
\ No newline at end of file


(grails-core) 02/02: Add helper to find stage profile id

Posted by jd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jdaugherty pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit 936e1851b467349de08d3cb8ec37777e5c708fe9
Author: James Daugherty <jd...@jdresources.net>
AuthorDate: Tue May 27 14:21:16 2025 -0400

    Add helper to find stage profile id
---
 .github/workflows/retrieveProfileId.yml | 39 +++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/.github/workflows/retrieveProfileId.yml b/.github/workflows/retrieveProfileId.yml
new file mode 100644
index 0000000000..1f2ddc0e67
--- /dev/null
+++ b/.github/workflows/retrieveProfileId.yml
@@ -0,0 +1,39 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: "Retrieve Profile Id"
+on:
+  workflow_dispatch:
+jobs:
+  source:
+    runs-on: ubuntu-latest
+    steps:
+      - name: "📥 Checkout repository"
+        uses: actions/checkout@v4
+      - name: 'Ensure Common Build Date' # to ensure a reproducible build
+        run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> "$GITHUB_ENV"
+      - name: "☕️ Setup JDK"
+        uses: actions/setup-java@v4
+        with:
+          distribution: liberica
+          java-version: 17
+      - name: "🐘 Setup Gradle"
+        uses: gradle/actions/setup-gradle@v4
+        with:
+          develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY  }}
+      - name: "🔨 Find profile id"
+        working-directory: 'grails-gradle'
+        run: >
+          ./gradlew retrieveSonatypeStagingProfile
\ No newline at end of file