api / org.gradle.api.java.archives / Manifest / attributes

attributes

abstract fun attributes(attributes: MutableMap<String, *>): Manifest

Adds content to the main attributes of the manifest.

Parameters

attributes - The values to add to the main attributes. The values can be any object. For evaluating the value objects their Object#toString() method is used. This is done lazily either before writing or when #getEffectiveManifest() is called.

Exceptions

ManifestException - If a key is invalid according to the manifest spec or if a key or value is null.

Return
this

abstract fun attributes(attributes: MutableMap<String, *>, sectionName: String): Manifest

Adds content to the given section of the manifest.

Parameters

attributes - The values to add to the section. The values can be any object. For evaluating the value objects their Object#toString() method is used. This is done lazily either before writing or when #getEffectiveManifest() is called.

sectionName - The name of the section

Exceptions

ManifestException - If a key is invalid according to the manifest spec or if a key or value is null.

Return
this