I am working with the JakartaTransformer tool. It takes one jar file, performs transformations on its contents and saves those changes as another JAR file.
In particular, we are using it to apply transformation of the Hibernate ORM jars from the previous JPA contracts (
javax.persistence package) to the new Jakarta EE persistence APIs (
I’d like to publish both of those artifacts. At the moment this is done by creating a whole new project (
hibernate-core-jakarta) that depends on the “real” one (
hibernate-core) and transforms the resolved dependency artifact file, publishing the transformed JAR as its artifact.
It seems like publishing the
*-jakarta artifact would be better handled as a variant or classifier. I understand how to accomplish this via classifier, but the recommendation in the docs is to prefer module variants. What I am concerned with specifically is allowing users of build tools other than Gradle to be able to consume this transformed artifact. But I am completely lost how to do that.
How can library producers mix variants and classifiers such that users Gradle as well as other build tools can consume them?