When i run the generateMetadataFileFormMavenPublication
task, i get a json at build/publications/maven/module.json
which is missing these fields: name, description, minimumCoreVersion, title, version, author. IntelliJ prompts me to add them back in. The author (developer) is present in the generated pom file. What am i missing to also add this (and the other required fields) to the module.json
file?
It seems like an oversight from gradle, because from their examples (and from my own experience) its sufficient to just add this to publish a jar:
publishing { publications { maven(MavenPublication) {
groupId project.group; artifactId project.name; version project.version
from components.java;
} } }
Here is the groovy code i am working with:
publishing {
publications {
maven(MavenPublication) {
pom {
name = project.name
description = (project.name + ' description')
developers {
developer {
id = 'daveankin'
name = 'Dave Ankin'
email = 'daveankin@gmail.com'
organizationUrl = 'https://example.com'
}
}
}
groupId project.group
artifactId project.name
version project.version
from components.java
withBuildIdentifier()
}
}
}