Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## org.gradle.api.plugins.osgi
Interface OsgiManifest

    interface OsgiManifest

author:
  Hans Dockter

Method Summary
`Manifest` | `generateManifest()`
`File` | `getClassesDir()` Returns the classes dir.
`List` | `getClasspath()` Returns the classpath.
`List` | `getClasspathTypes()` Returns the classpath types.
`java.lang.String` | `getDescription()` Returns the description.
`java.lang.String` | `getDocURL()` Returns the docURL value.
`Map` | `getInstructions()` Returns all exisiting instruction.
`java.lang.String` | `getLicense()` Returns the license
`java.lang.String` | `getName()` Returns the name
`java.lang.String` | `getSymbolicName()` Returns the symbolic name.
`java.lang.String` | `getVendor()` Returns the vendor.
`java.lang.String` | `getVersion()` Returns the version
`OsgiManifest` | `instruction(java.lang.String name, java.lang.String values)` Adds arguments to an instruction.
`OsgiManifest` | `instructionFirst(java.lang.String name, java.lang.String values)` Adds arguments to an instruction.
`List` | `instructionValue(java.lang.String instructionName)` Returns the list of arguments for a particular instruction.
`OsgiManifest` | `overwrite(GradleManifest manifest)` Generated and writes the OSGi manifest information into a GradleManifest.
`void` | `setClassesDir(File classesDir)` Sets the classes dir.
`void` | `setClasspath(List classpath)` A convenient method for setting a Bundle-Classpath instruction.
`void` | `setClasspathTypes(List types)` Set the dependency types to be taken into account when generating the osgi manifest.
`void` | `setDescription(java.lang.String description)` A convenient method for setting a Bundle-Description instruction.
`void` | `setDocURL(java.lang.String docURL)` A convenient method for setting a Bundle-DocURL instruction.
`void` | `setLicense(java.lang.String license)` A convenient method for setting a Bundle-License instruction.
`void` | `setName(java.lang.String name)` A convenient method for setting a Bundle-Name instruction.
`void` | `setSymbolicName(java.lang.String symbolicName)` A convenient method for setting a Bundle-SymbolicName instruction.
`void` | `setVendor(java.lang.String vendor)` A convenient method for setting a Bundle-Vendor instruction.
`void` | `setVersion(java.lang.String version)` A convenient method for setting a Bundle-Version instruction.

Method Detail

### generateManifest

    public Manifest generateManifest()

### getClassesDir

    public File getClassesDir()

  Returns the classes dir.
  see:
    #setClassesDir(java.io.File)

### getClasspath

    public List getClasspath()

  Returns the classpath.
  see:
    #setClasspath(java.util.List)

### getClasspathTypes

    public List getClasspathTypes()

  Returns the classpath types.
  see:
    #setClasspathTypes(java.util.List)

### getDescription

    public java.lang.String getDescription()

  Returns the description.
  see:
    #setDescription(String)

### getDocURL

    public java.lang.String getDocURL()

  Returns the docURL value.
  see:
    #setDocURL(String)

### getInstructions

    public Map getInstructions()

  Returns all exisiting instruction.
  return:
    A map with instructions. The key of the map is the instruction name, the value a list of arguments.

### getLicense

    public java.lang.String getLicense()

  Returns the license
  see:
    #setLicense(String)

### getName

    public java.lang.String getName()

  Returns the name
  see:
    #setName(String)

### getSymbolicName

    public java.lang.String getSymbolicName()

  Returns the symbolic name.
  see:
    #setSymbolicName(String)

### getVendor

    public java.lang.String getVendor()

  Returns the vendor.
  see:
    #setVendor(String)

### getVersion

    public java.lang.String getVersion()

  Returns the version
  see:
    #setVersion(String)

### instruction

    public OsgiManifest instruction(java.lang.String name, java.lang.String values)

  Adds arguments to an instruction. If the instruction does not exists, it is created. If it does exists, the arguments are appended to the existing arguments.
  param:
    name
  param:
    values
  return:
    this
  see:
    #instructionFirst(String, String[])

### instructionFirst

    public OsgiManifest instructionFirst(java.lang.String name, java.lang.String values)

  Adds arguments to an instruction. If the instruction does not exists, it is created. If it does exists, the arguments are inserted before the existing arguments.
  param:
    name
  param:
    values
  return:
    this
  see:
    #instructionFirst(String, String[])

### instructionValue

    public List instructionValue(java.lang.String instructionName)

  Returns the list of arguments for a particular instruction.
  param:
    instructionName
  return:
    The list of arguments
  see:
    #instruction(String, String[])

### overwrite

    public OsgiManifest overwrite(GradleManifest manifest)

  Generated and writes the OSGi manifest information into a GradleManifest. Existing information in the GradleManifest is removed.
  param:
    manifest The GradleManifest to write into.
  return:
    this

### setClassesDir

    public void setClassesDir(File classesDir)

  Sets the classes dir. This directory is the major source of input for generation the OSGi manifest. All classes are analyzed for its packages and package dependencies. Based on this the Import-Package value is set. This auto generated value can be overwritten by explicitly setting an instruction.
  param:
    classesDir
  see:
    #instruction(String, String[])

### setClasspath

    public void setClasspath(List classpath)

  A convenient method for setting a Bundle-Classpath instruction. The information of the classpath elements are only used if they are OSGi bundles. In this case for example the version information provided by the bundle is used in the Import-Package of the generated OSGi bundle.
  param:
    classpath The classpath elements

### setClasspathTypes

    public void setClasspathTypes(List types)

  Set the dependency types to be taken into account when generating the osgi manifest. Sometimes people add for some reasons archive types like tar.gz to the compile or runtime configuration. OSGi can't cope with such dependencies and throws and exception. By default classpathTypes include 'zip' and 'jar'.

### setDescription

    public void setDescription(java.lang.String description)

  A convenient method for setting a Bundle-Description instruction.
  param:
    description the description to set

### setDocURL

    public void setDocURL(java.lang.String docURL)

  A convenient method for setting a Bundle-DocURL instruction.
  param:
    docURL the docURL to set.

### setLicense

    public void setLicense(java.lang.String license)

  A convenient method for setting a Bundle-License instruction.
  param:
    license The license to set

### setName

    public void setName(java.lang.String name)

  A convenient method for setting a Bundle-Name instruction.
  param:
    name the name to set

### setSymbolicName

    public void setSymbolicName(java.lang.String symbolicName)

  A convenient method for setting a Bundle-SymbolicName instruction.
  param:
    symbolicName the symbolicName to set

### setVendor

    public void setVendor(java.lang.String vendor)

  A convenient method for setting a Bundle-Vendor instruction.
  param:
    vendor The vendor to set

### setVersion

    public void setVersion(java.lang.String version)

  A convenient method for setting a Bundle-Version instruction.
  param:
    version the version to set

Groovy Documentation