Skip to content

Conversation

Copy link

Copilot AI commented Jan 26, 2026

Gradle 9.3.0 upgrade exposed an indentation bug causing packageJdkDebian task to fail with "Could not find method exec()". Code blocks at lines 105-140 were executing during configuration phase instead of task execution phase.

Changes

  • Move println and three architecture-specific if blocks inside the doLast closure
  • Fix inconsistent indentation (tabs vs spaces) in affected section

Technical Details

The issue occurs because project.exec() behaves differently in configuration vs execution context. Before:

task packageJdkDebian {
    doLast {
        // ... setup code ...
    }

// BUG: These are outside doLast, run during configuration
if ("$arch" == "armhf") {
    project.exec { ... }  // Fails in Gradle 9.3.0
}

After:

task packageJdkDebian {
    doLast {
        // ... setup code ...
        
        if ("$arch" == "armhf") {
            project.exec { ... }  // Runs during task execution
        }
    }
}

This matches the pattern used in linux/jre/debian/build.gradle and other working build files.

Original prompt

Fix the failing GitHub Actions workflow Check JDK on microsoft 11 Debian
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.
Job ID: 61465704823
Job URL: https://github.com/adoptium/installer/actions/runs/21356708045/job/61465704823


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…patibility

Co-authored-by: karianna <180840+karianna@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions workflow Check JDK on Microsoft 11 Debian Fix Gradle 9.3.0 compatibility in debian JDK packaging task Jan 26, 2026
Copilot AI requested a review from karianna January 26, 2026 23:33
@karianna karianna marked this pull request as ready for review January 27, 2026 00:09
Copy link
Contributor

@steelhead31 steelhead31 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants