Gradle Module Metadata for Non-Java Projects

Hi There,

I am checking out Gradle 6 and the new Module Metadata.

However, for my builds I don’t get any .module files. I executed the task generateMetadataFileForMavenPublication directly and got the error message:

Maven publication 'maven' isn't attached to a component. Gradle metadata only supports publications with software components (e.g. from

Which is true, since it is a iOS Project with a custom Xcode-Plugin.

What are the steps necessary to produce and consume Gradle Metadata for Non-Java-Projects?


Gradle Module Metadata only makes sense when it is attached to a published library in a repository.

Since Gradle supports consuming libraries with metadata only from two main repository types: Maven and Ivy, you need to pick one of those if you intend to benefit from library metadata.

This means that on the publication side, you need to pick the repository to publish to and create a custom component.
See the documentation on how to do the custom component or this example from the latest webinar on publication.

Thank you very much. We will try to implement our own custom software component :slight_smile: