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

Swagger Generator does not use the jdk configured in the javaToolchain

Open cgrabmann opened this issue 2 years ago • 0 comments

The task 'clfGenerateSwaggerDocumentation' uses the installed jdk instead of the one configured with the javaToolchain.

Because of that the generation fails if the installed jdk is older then the one configured in the javaToolchain, since it loads the generated classes directly into the gradle process.
This leads to the following error:

Caused by: java.lang.UnsupportedClassVersionError: io/cloudflight/api/model/Model has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

Evaluate if it is possible to run this task in a separate thread that uses the javaToolchain jdk instead of the "default" installed one.
Maybe contribute it directly to the original swagger doc generation plugin: https://github.com/gigaSproule/swagger-gradle-plugin

cgrabmann avatar Aug 23 '22 13:08 cgrabmann