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

Do not attempt to serialize project.version in task of type Test #199

Closed
ysb33r opened this issue Jun 7, 2023 · 0 comments · Fixed by #217
Closed

Do not attempt to serialize project.version in task of type Test #199

ysb33r opened this issue Jun 7, 2023 · 0 comments · Fixed by #217

Comments

@ysb33r
Copy link

ysb33r commented Jun 7, 2023

This line is incorrect

task.systemProperty Metadata.APPLICATION_VERSION, project.version

You do the correct thing when creating the properties in buildProperties task.

Line 407 should also have the same conditional.

NOTE: This bug breaks buildscripts that apply Grails plugins and a pluging that use Grolifant 2.x.

The only workaround in such situations is to add

gradle.taskGraph.whenReady {
    project.tasks.withType(Test).configureEach {
        it.systemProperties['info.app.version'] = project.version.toString()
    }
}

or

gradle.taskGraph.whenReady {
    project.tasks.withType(Test).configureEach {
        it.systemProperties['info.app.version'] = grolifant.versionProvider.get()
    }
}
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 a pull request may close this issue.

1 participant