Skip to content
This repository has been archived by the owner on Feb 2, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove deprecated JavaSourceConvention
3 participants