joelittlejohn / jsonschema2pojo

Generate Java types from JSON or JSON Schema and annotate those types for data-binding with Jackson, Gson, etc
http://www.jsonschema2pojo.org
Apache License 2.0
6.24k stars 1.66k forks source link

Add a simple build.gradle to allow publishing to plugins.gradle.org #1466

Closed joelittlejohn closed 1 year ago

joelittlejohn commented 1 year ago

The important file here is jsonschema2pojo-gradle-plugin/build.gradle. We'll give some thought to how to keep the version number up to date, but my plan is to add a step in the release process to run ./gradlew publishPlugins.

Closes #282.

unkish commented 1 year ago

I wonder if git tag's could be used for that (keeping the version number up to date) 🤔

joelittlejohn commented 1 year ago

@unkish Excellent point. Ideally, we should just be able to tag a new release, and all activities (including everything that happens in the upload release script) should be triggered by the creation of a new tag.

unkish commented 1 year ago

Another option might be to do similar solution as Rafael Winterhalter has in byte-buddy-gradle-plugin. It looks like the version is being read from pom.xml (in bytebuddy.gradle which is loaded/applied by build.gradle) and publishing is happening via exec-maven-plugin by invoking gradle and passing params to it.

joelittlejohn commented 1 year ago

Great plan @unkish. I was thinking exactly the same, and I have already made some local changes this week to take version as an arg on the command line. Seems to work well.

joelittlejohn commented 1 year ago

We can either call from mvn during release, or just invoke as a release step from bash.