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

compatibility with Gradle 9.x #245

Closed
sdavids opened this issue Mar 12, 2024 · 11 comments · Fixed by #247
Closed

compatibility with Gradle 9.x #245

sdavids opened this issue Mar 12, 2024 · 11 comments · Fixed by #247
Assignees
Milestone

Comments

@sdavids
Copy link

sdavids commented Mar 12, 2024

> Task :forbiddenApisMain
The org.gradle.api.plugins.JavaPluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.6/userguide/upgrading_version_8.html#java_convention_deprecation
The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.6/userguide/upgrading_version_8.html#deprecated_access_to_conventions

gradle/libs.versions.toml

[plugins]
forbiddenapis = "de.thetaphi.forbiddenapis:3.6"
@uschindler
Copy link
Member

@sdavids
Copy link
Author

sdavids commented Mar 12, 2024

https://docs.gradle.org/8.6/userguide/upgrading_version_8.html#java_convention_deprecation

Closure targetCompatibilityGetter = { (project.targetCompatibility?.hasProperty('java11Compatible') && project.targetCompatibility?.java11Compatible) ?
project.targetCompatibility.toString() : project.targetCompatibility?.majorVersion };

You might want to check all project.XXX usages.

@uschindler
Copy link
Member

uschindler commented Mar 12, 2024

I am not sure if I have an idea how to fix this. So it could be that I won't have time to fix this for next version coming out with Java 22 next week.

Uwe

@uschindler
Copy link
Member

I will delay changes to after the Java 22 compatibility release. Sorry. I don't feel this is too urgent.

dweiss added a commit to dweiss/forbidden-apis that referenced this issue Mar 23, 2024
@uschindler
Copy link
Member

Hi,
I fixed the problem in this PR: #247

@uschindler uschindler added this to the 3.7 milestone Mar 23, 2024
@uschindler uschindler self-assigned this Mar 23, 2024
@uschindler uschindler linked a pull request Mar 23, 2024 that will close this issue
@sdavids
Copy link
Author

sdavids commented Mar 23, 2024

Will verify with 3.7.

@uschindler
Copy link
Member

@uschindler
Copy link
Member

In addition I also changed the code to fetch sourceSets directly from Java extension, if available (after Gradle 7.1). Tis should make it future proof. Normally there should also be a warning poping up, but it isn't.

@uschindler
Copy link
Member

See 068b0ca

@uschindler
Copy link
Member

uschindler commented Mar 23, 2024

Forbiddenapis v3.7 was released a minute ago.

@sdavids
Copy link
Author

sdavids commented Mar 24, 2024

verified with v3.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants