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

The ReportingExtension.getBaseDir() method has been deprecated. #371

Open
chrc opened this issue Dec 25, 2024 · 3 comments
Open

The ReportingExtension.getBaseDir() method has been deprecated. #371

chrc opened this issue Dec 25, 2024 · 3 comments
Labels

Comments

@chrc
Copy link

chrc commented Dec 25, 2024

Capture d’écran 2024-12-25 à 15 41 51
@sponomarev72
Copy link

Grepping the sources there are 2 places where baseDir property is used (PitestPlugin.groovy, line 108, and PitestAggregatorPlugin.groovy, line 132):

gradle-pitest-plugin/src/main/groovy/info/solidsoft/gradle/pitest/PitestPlugin.groovy
132:        extension.reportDir.set(new File(project.extensions.getByType(ReportingExtension).baseDir, PITEST_REPORT_DIRECTORY_NAME))

gradle-pitest-plugin/src/main/groovy/info/solidsoft/gradle/pitest/PitestAggregatorPlugin.groovy
69:            reportDir.set(new File(getReportBaseDirectory(), PitestPlugin.PITEST_REPORT_DIRECTORY_NAME))
106:    private File getReportBaseDirectory() {
108:            return project.extensions.getByType(ReportingExtension).baseDir

It looks like the baseDirectory property was introduced in gradle 8.12 only. Documentation for gradle 8.11 still refers to baseDir property https://docs.gradle.org/8.11/dsl/org.gradle.api.reporting.ReportingExtension.html

@chrc
Copy link
Author

chrc commented Dec 28, 2024

Exactly! I'm use gradle 8.12

@szpak
Copy link
Owner

szpak commented Dec 28, 2024

Groovy can call "things" dynamically, so it should be possible to choose what to use, keeping the compatibility with Gradle 8.12.

Thanks for spotting it out.

@szpak szpak added the gradle label Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants