# Chapter 31. The Announce Plugin

The Gradle announce plugin enables you to publish messages on succeeded tasks to your favourite platforms. It supports

- Twitter
- Ubuntu Notify
- Snarl, a Windows Notification System
- Growl, a Mac OS X Notification System

## 31.1. Usage

To use the announce plugin, include in your build script:

Example 31.1. Using the announce plugin

`build.gradle`

    apply plugin: 'announce'

After that, configure you username and password (if required for the service you want to announce to) with:

Example 31.2. Configure the announce plugin

`build.gradle`

    announce {
      username = 'myId'
      password = 'myPassword'
    }

Finally, you can use announce with any task by attaching it via task.dolast() as shown below

Example 31.3. Using the announce plugin

`build.gradle`

    task helloWorld << {
        ant.echo(message: "hello")
    }

    helloWorld.doLast {
        announce("Build complete", "notify-send")
        announce("Build complete", "twitter")
    }

As you can see, the syntax in `.doLast` is

`announce("MESSAGE", "TARGET")`

Where MESSAGE is any GString you pass (and might have constructed before). And TARGET might one of the following:

Table 31.1. announce plugin targets

target literal | target | configuration parameters | more information
twitter | Twitter | username , password |
snarl | Snarl Windows Notification Service |  |
growl | Growl Mac OS X Notification Service |  |
notify-send | Notify Ubuntu Notification Service |  | You need to have notify-send installed for this. Run `sudo apt-get install libnotify-bin` on Ubuntu to install it.

## 31.2. Tasks

TBD

## 31.3. Project layout

TBD

## 31.4. Dependency management

TBD

## 31.5. Convention properties

The announce plugin adds an TBD

TBD