Open Lionertic opened 1 year ago
Hi
Does the project have any of these:
apply plugin: 'com.android.application'
apply plugin: 'com.android.library'
apply plugin: 'java'
As per JsonSchemaPlugin.groovy exception is throw if none of the below evaluates to true
:
https://github.com/joelittlejohn/jsonschema2pojo/blob/98c85ce4d4b9333bafae2c18eca5637ea6a7c5da/jsonschema2pojo-gradle-plugin/src/main/groovy/org/jsonschema2pojo/gradle/JsonSchemaPlugin.groovy#L33
https://github.com/joelittlejohn/jsonschema2pojo/blob/98c85ce4d4b9333bafae2c18eca5637ea6a7c5da/jsonschema2pojo-gradle-plugin/src/main/groovy/org/jsonschema2pojo/gradle/JsonSchemaPlugin.groovy#L35
What Gradle version are you using?
From the README.md for the Gradle plugin:
For Gradle 7.3 and later, you can use the plugins DSL: ... For Gradle 7.2.x and older, there is a bug related to the application order of plugins so you must use legacy plugin application.
Could this be the issue? I think it manifests in this way.
An exception occurred applying plugin request [id: 'org.jsonschema2pojo', version: '1.2.1']