swaggerhub-gradle-plugin icon indicating copy to clipboard operation
swaggerhub-gradle-plugin copied to clipboard

Incompatible with gradle 7+

Open kbjerke opened this issue 2 years ago • 2 comments

https://github.com/swagger-api/swaggerhub-gradle-plugin/blob/2d32c3777083af4b2269c60b624f8ff82150e5d4/src/main/java/io/swagger/swaggerhub/tasks/DownloadTask.java#L83-L87

These changes are not released in a new version of the gradle plugin, and therefore are incompatible with newer versions of gradle, complaining about field incorrectly marked as @Optional

Please release new version.

kbjerke avatar Nov 14 '22 12:11 kbjerke

Confirm Gradle v7.5.1 - fails with:

A problem was found with the configuration of task ':swaggerhubDownload' (type 'DownloadTask').
  - In plugin 'io.swagger.swaggerhub' type 'io.swagger.swaggerhub.tasks.DownloadTask' property 'port' of type int shouldn't be annotated with @Optional.
    
    Reason: Properties of primitive type cannot be optional.

Had to downgrade Gradle to v6.9.3

Bryksin avatar Feb 08 '23 11:02 Bryksin

It seems this issue was solved by https://github.com/swagger-api/swaggerhub-gradle-plugin/pull/12 PR and the specific fix for the compatibility error can be viewed at: https://github.com/swagger-api/swaggerhub-gradle-plugin/pull/12/commits/3f6f211d5f23ecad446189e2e2b09a323e915659

A new release is needed to have the plugin that works with Gradle 7+

HugoMario avatar Mar 31 '23 08:03 HugoMario