Is there a util for converting a Gradle .module me...
# community-support
a
Is there a util for converting a Gradle .module metadata file into a POM.xml? It doesn't have to be rigorous, I want to experiment with something.
v
None I'm aware of. But I guess it is easy to create.
m
That'd be a cool reference
v
Well, I guess just parse the GMM file, Then construct the POM from the parsed information.
group
,
module
,
version
are obvious. And for the dependencies, either rely on the naming, so all that are in
apiElements
go to
compile
scope, all that are in
runtimeElements
but not in
apiElements
go to
runtime
scope. That should be it. Alternatively to relying on the naming, search for those variants with the default capability (without an explicit one) and search for the right variants to use using the attributes, maybe also verifying that the variant has the "default jar" as artifact.