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

Fix 6.1 checkstyle report finalizer failure #1176

Merged
merged 16 commits into from
Jan 23, 2020

Conversation

CRogers
Copy link
Contributor

@CRogers CRogers commented Jan 20, 2020

Before this PR

See #1173 for a good explanation.

After this PR

==COMMIT_MSG==
Errors of the form The value for Report xml property 'required' is final and cannot be changed any further. are now fixed for the com.palantir.junit-reports plugin.
==COMMIT_MSG==

Possible downsides?

I had to change the configuration of the Checkstyle task to be set at configuration time rather than task runtime as it is being finalised. I think this is actually better though - I assume the previous way was to try and "force" despite any other configuration or because an older version of the API didn't use the Property API.

Fixes #1173.

@changelog-app
Copy link

changelog-app bot commented Jan 20, 2020

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Errors of the form The value for Report xml property 'required' is final and cannot be changed any further. in Gradle 6.1 are now fixed for the com.palantir.junit-reports plugin.

Check the box to generate changelog(s)

  • Generate changelog entry

@policy-bot policy-bot bot requested a review from iamdanfox January 20, 2020 16:20
// not being on Gradle's classpath. So the best we can do to verify that the checkstyle actually ran is to
// verify we get the classpath error that happens when the checkstyle class runs :(
// https://github.com/gradle/gradle/issues/3995
executionResult.standardError.contains 'java.lang.ClassNotFoundException: groovy.util.AntBuilder'
Copy link
Contributor

Choose a reason for hiding this comment

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

would it make sense to just not use nebula for this one test? i.e. to go through all the ProjectBuilder stuff manually?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think we can run with a specified gradle version without using nebula?

Copy link
Contributor Author

@CRogers CRogers Jan 20, 2020

Choose a reason for hiding this comment

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

This also happens in gradle test kit and the other 3rd party gradleTest framework :(

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

@robert3005 robert3005 Jan 20, 2020

Choose a reason for hiding this comment

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

also if you disable debug it will not cause issues. Gradle test runner debug mode is a little too magical on your classpath

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, I gave using testkit/ProjectBuilder directly a go and I just couldn't get it to work (kept saying the existing code worked on Gradle 6.1) :( So this (or no test) may have to suffice.

Copy link
Contributor

@iamdanfox iamdanfox left a comment

Choose a reason for hiding this comment

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

Would be interested to see if a build scan with this reveals any other deprecation warnings we could tackle at the same time!

@bulldozer-bot bulldozer-bot bot merged commit 055867d into develop Jan 23, 2020
@bulldozer-bot bulldozer-bot bot deleted the fix-junit-reportsw-gradle-6.1 branch January 23, 2020 14:15
@svc-autorelease
Copy link
Collaborator

Released 2.49.2

This was referenced Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gradle 6.1 checkstyle task failure
4 participants