How can I define a custom component that its output can be used as a Maven artifact?

(Behrang Saeedzadeh) #1

Basically, in the Maven publish plugin docs, there’s the following example snippet:

publishing {
    publications {
        mavenJava(MavenPublication) {

How can I define a task that exposes something like and use it with the Maven publish plugin?

Thanks in advance.