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

Unable to set up a lazy task for zipping test results #28996

Open
liutikas opened this issue Apr 29, 2024 · 1 comment
Open

Unable to set up a lazy task for zipping test results #28996

liutikas opened this issue Apr 29, 2024 · 1 comment
Labels
a:bug in:execution-engine incremental, up-to-date, overlapping outputs re:comprehensibility reasonable errors and warnings, clear dsl, mental overload 👋 team-triage Issues that need to be triaged by a specific team

Comments

@liutikas
Copy link
Contributor

Current Behavior

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':lib:zipTestResults'.
> Property 'outputLocation' is declared as an output property of Report junitXml (type DefaultJUnitXmlReport) but does not have a task associated with it.

Expected Behavior

Success

Context (optional)

val testTask = tasks.named<Test>("test") {
    useJUnitPlatform()
}

val zipTask = project.tasks.register<Zip>("zipTestResults") {
    destinationDirectory.set(layout.buildDirectory.dir("host-test-reports"))
    archiveFileName.set("test-results.zip")
    from(testTask.flatMap { it.reports.junitXml.outputLocation })
}

i would expect this to work. The only current way to make it work is to force Test task to be configured.

Steps to Reproduce

  1. Check out https://github.com/liutikas/gradle-zip-test-results-repro
  2. ./gradlew zipTestResults

Gradle version

8.7

Build scan URL (optional)

https://scans.gradle.com/s/gu43ldzon43rc

Your Environment (optional)

No response

@ov7a ov7a added in:execution-engine incremental, up-to-date, overlapping outputs 👋 team-triage Issues that need to be triaged by a specific team re:comprehensibility reasonable errors and warnings, clear dsl, mental overload and removed to-triage labels May 7, 2024
@ov7a
Copy link
Member

ov7a commented May 7, 2024

This issue needs a decision from the team responsible for that area. They have been informed. Response time may vary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:bug in:execution-engine incremental, up-to-date, overlapping outputs re:comprehensibility reasonable errors and warnings, clear dsl, mental overload 👋 team-triage Issues that need to be triaged by a specific team
Projects
None yet
Development

No branches or pull requests

2 participants