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

Remove dependency on deprecated conventions API #54

Merged

Conversation

boazy
Copy link
Contributor

@boazy boazy commented Dec 27, 2023

Project.convention and other conventions API methods have been
[deprecated](https://docs.gradle.org/current/userguide/upgrading_version_7.html#all_convention_deprecation] and will be removed in Gradle 9.0. To make things worse, the
Project.convention.plugins["java"] does not return
DefaultJavaPluginConvention anymore, but instead returns a wrapper
class that issues deprecation warnings. Since the plugin cannot find the
expected class, it stopped working properly (this is probably the cause
of #53).

This pull requests simply replaces the single use of
Project.convention.plugins[] (finding the Java test sourceset) with
Project.extensions.findByType.

Fixes: #42, #53

`Project.convention` and other conventions API methods have been
deprecated and will be removed in Gradle 9.0. To make things worse, the
`Project.convention.plugins["java"]` does not return
`DefaultJavaPluginConvention` anymore, but instead returns a wrapper
class that issues deprecation warnings. Since the plugin cannot find the
expected class, it stopped working properly (this is probably the cause
of kotest#53).

This pull requests simply replaces the single use of
`Project.convention.plugins[]` (finding the Java test sourceset) with
`Project.extensions.findByType`.

Fixes: kotest#42, kotest#53
@sksamuel sksamuel merged commit 6abef20 into kotest:master Jan 1, 2024
1 check passed
@sksamuel
Copy link
Member

sksamuel commented Jan 1, 2024

awesome thanks

@roeniss
Copy link

roeniss commented Jan 2, 2024

@sksamuel just quick question - when new release will came out, including this patch?

@sksamuel
Copy link
Member

sksamuel commented Jan 2, 2024 via email

@roeniss
Copy link

roeniss commented Jan 2, 2024

Sorry but which version do you mean? I see 0.4.0 only on release page

@sksamuel
Copy link
Member

sksamuel commented Jan 2, 2024

0.4.11 https://plugins.gradle.org/plugin/io.kotest
Ill upgrade the release tab

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.

Remove deprecated JavaSourceConvention
3 participants