Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ant closures are broken with Gradle 7.6 #23111

Closed
demonti opened this issue Dec 12, 2022 · 1 comment
Closed

Ant closures are broken with Gradle 7.6 #23111

demonti opened this issue Dec 12, 2022 · 1 comment
Assignees
Labels
Milestone

Comments

@demonti
Copy link

demonti commented Dec 12, 2022

I have various Gradle build files that use the "ant" task in conjunction with a closure which contains a set of ant tasks. Running the build files with Gradle 7.6, the build fails. Using the previous version 7.5.1, the build succeeds.

Here is a simple test that fails:

task test {
  doLast
  {
    ant
    {
      echo (message: 'hello world!')
    }
  }
}

Expected Behavior

expected the output of

[ant:echo] hello world!

Current Behavior

Execution failed for task ':test'.
> Problem: failed to create task or type call
  Cause: The name is undefined.
  Action: Check the spelling.
  Action: Check that any custom tasks/types have been declared.
  Action: Check that any <presetdef>/<macrodef> declarations have taken place.

Context

The given test case works with 7.5.1, but not with 7.6.

As I was unsure whether it is a bug or intended behavior, I asked in the Gradle forum about it (see here). I was told that this is likely not intended and may relate to the pull request 21242.

Steps to Reproduce

place the example in a "build.gradle" file, add an empty "settings.gradle". Run "gradle test" with the respective versions of Gradle.

Your Environment

Linux, Java 8 (Java HotSpot(TM) 64-Bit Server VM (build 25.271-b09, mixed mode))

@demonti demonti added a:regression This used to work to-triage labels Dec 12, 2022
@xaviarias xaviarias added in:ant-integration ant builder and removed to-triage labels Dec 12, 2022
@xaviarias xaviarias added this to the 7.6.1 milestone Dec 12, 2022
@xaviarias
Copy link
Contributor

Thank you for providing a valid reproducer.

The issue is in the backlog of the relevant team and prioritized by them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants