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

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

commit ab0fb77a179b2865df3979146f4d5fc790cfe500
Author: James Daugherty <[email protected]>
AuthorDate: Mon Jul 13 08:21:27 2026 -0400

    Fix command ordering in profile.yml
---
 .../grails/gradle/plugin/profiles/tasks/ProfileCompilerTask.groovy    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/profiles/tasks/ProfileCompilerTask.groovy
 
b/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/profiles/tasks/ProfileCompilerTask.groovy
index 1cb990f892..78ba09bc79 100644
--- 
a/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/profiles/tasks/ProfileCompilerTask.groovy
+++ 
b/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/profiles/tasks/ProfileCompilerTask.groovy
@@ -206,7 +206,9 @@ abstract class ProfileCompilerTask extends AbstractCompile {
             f.name.endsWith('.yml')
         } ?: []) as List<File>
 
-        Map<String, String> commandNames = [:]
+        // Use a sorted map so the generated commands ordering is deterministic
+        // (the file tree iteration order is filesystem-dependent) and the 
build is reproducible
+        Map<String, String> commandNames = new TreeMap<>()
         for (File f in groovySourceFiles) {
             def fn = f.name
             commandNames.put(fn - '.groovy', fn)

Reply via email to