What is equivalent to section of ant and maven into gradle? How can I create another section in manifest file?

I am migrating a project from ANT to gradle. I want to generate similar manifest file.

Here is the manifest section of ANT project:

<manifest>
        <section name="project">
          <attribute name="Framework-Version" value="${Framework.Version}"/>
          <attribute name="Framework-Build" value="${cmbuild.num}"/>
        </section>
      </manifest>

It adds below line in manifest.mf: Name: project

How to achieve the same in gradle?

Adding below one is not allowed: attributes (“Name” : “project”)

Take a look at the Java Doc for the manifest API (http://www.gradle.org/docs/current/javadoc/org/gradle/api/java/archives/Manifest.html#attributes(java.util.Map, java.lang.String))

Simple example:

apply plugin: 'java'
  jar {
   manifest {
      attributes([ "In-Section": "value" ], "section")
      attributes([ "Not-in-section": "value" ])
   }
}