etiennestuder/gradle-jooq-plugin

Plugin is incompatible with Gradle 9

noavarice opened this issue · 8 comments

Hi. Thanks for plugin! Looks like there's no such issue at the moment so creating this now.

I have convention plugin in buildSrc that configures your plugin. Code looks like this:

plugins {
  java
  id("nu.studer.jooq")
}

jooq {
  configurations {
    create("main")
      ...
    }
  }
}

And the create("main") row have the following warnings:

The Project.getConvention() method has been deprecated.
The org.gradle.api.plugins.Convention type has been deprecated.
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.2/userguide/upgrading_version_8.html#deprecated_access_to_conventions

Upgrade docs link: https://docs.gradle.org/8.2/userguide/upgrading_version_8.html#deprecated_access_to_conventions
It looks like a problem with your plugin, here goes the stacktrace:

at nu.studer.gradle.jooq.JooqPlugin.getSourceSetsDeprecated(JooqPlugin.java:75)
at nu.studer.gradle.jooq.JooqPlugin.getSourceSets(JooqPlugin.java:67)
at nu.studer.gradle.jooq.JooqPlugin.lambda$apply$3(JooqPlugin.java:51)
hantsy commented

Got the warning when building project with Gradle 8.2 and --warning-mode=fail,

userguide/upgrading_version_8.html#deprecated_access_to_conventions
        at Build_gradle$11$1.execute(build.gradle.kts:145)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
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.2/userguide/upgrading_version_8.html#deprecated_access_to_conventions
        at Build_gradle$11$1.execute(build.gradle.kts:145)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
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://do
cs.gradle.org/8.2/userguide/upgrading_version_8.html#java_convention_deprecation
        at Build_gradle$11$1.execute(build.gradle.kts:145)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)

The prolenmatic line is create(main) in build.gradle.kts.

joschi commented

The issue is here:
https://github.com/etiennestuder/gradle-jooq-plugin/blob/v8.2.1/src/main/groovy/nu/studer/gradle/jooq/JooqPlugin.java#L64-L76

It looks like this was changed in c51285a but without providing a lot of context for the change.

Any news on this? we'd prefer to have a warning-free build...

Is there any update?

+1

Fixed in #672

hantsy commented

I have moved to jOOQ official Gradle plugin(in 3.19 release train), worked well.

https://www.jooq.org/doc/3.19/manual/code-generation/codegen-gradle/

The issue has been fixed in 8.2.2 (currently, the latest version is 8.2.3).