Open jufickel-b opened 1 year ago
Hello,
I apologise for being slow to respond to issues recently; I've had a lot going on.
I'm not a Gradle expert, but my understanding is that in order to use the plugins
syntax you describe, the plugin must be published to the Gradle Plugin Portal. I opened an account with that portal some time ago, with the intention of publishing my plugin to the portal, but I didn't follow up on the idea when I found that the buildscript
approach worked reasonably well, even if it is a little less convenient.
Now that many more people are using the plugin, it's worth reconsidering the idea of publishing to the Gradle Plugin Portal. I'll look into it over the next few days and I'll let you know the outcome shortly.
Regards, Peter Wall
Hi @pwall567,
Did you have the chance to look into the topic? It would be great if the PR could be merged soon. :-)
Thank you.
Kind regards, Jürgen Fickel
I was unable to get this plugin working following the docs. I think having the plugin id would have helped.
Hi @gino-m , I'm sorry you found it difficult to use the plugin in its current form – I very often struggle with Gradle myself. But I'm not sure that uploading the plugin to the official Gradle plugin repository would would solve all of the problems people encounter when configuring Gradle to use the code generator.
The build process for the code generator is already complex – after making changes to the main repository json-kotlin-schema-codegen I have to build and upload that to Maven Central. I then update the json-kotlin-maven and json-kotlin-gradle projects, and build and upload them as well. Add the upload to the Gradle plugin site, and that would be another step to be performed for every release. I hope you can understand that I'm not keen to add to my workload.
I suspect the problems you were having might have been alleviated with better documentation, and I will endeavour to provide better and more comprehensive documentation on the configuration of the plugin in future.
Regards, Peter
That sounds like a reasonable approach. Indeed 90% of my trouble was certainly due to my lack of understanding of Gradle, especially the Kotlin DSL. Thank you for all your hard work and for a great tool!
Hi @gino-m , I'm sorry you found it difficult to use the plugin in its current form – I very often struggle with Gradle myself. But I'm not sure that uploading the plugin to the official Gradle plugin repository would would solve all of the problems people encounter when configuring Gradle to use the code generator.
The build process for the code generator is already complex – after making changes to the main repository json-kotlin-schema-codegen I have to build and upload that to Maven Central. I then update the json-kotlin-maven and json-kotlin-gradle projects, and build and upload them as well. Add the upload to the Gradle plugin site, and that would be another step to be performed for every release. I hope you can understand that I'm not keen to add to my workload.
I suspect the problems you were having might have been alleviated with better documentation, and I will endeavour to provide better and more comprehensive documentation on the configuration of the plugin in future.
Regards, Peter
Having the gradle plugin ID included would already help, there is no need to upload it to the gradle plugins portal. Your users can just adjust the plugin dependencies to include maven central and it would be found.
Having this would enable the much cleaner plugins
syntax instead of the cumbersome buildscript
, which I fear will probably be phased out at some point anyway. It is completely de-coupled from the gradle plugins portal.
With the generated plugin ID it is possible to use this plugin as follows (in
build.gradle.kts
):