jp.tomorrowkey.gradle.notifier.BeepNotifier.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of notifier-plugin Show documentation
Show all versions of notifier-plugin Show documentation
Ring sound when last task is finished
package jp.tomorrowkey.gradle.notifier
import java.awt.*
class BeepNotifier implements Notifier {
def count;
public BeepNotifier(count = 3) {
this.count = count;
}
@Override
void performNotify(Object task, Object state) {
def toolkit = Toolkit.getDefaultToolkit();
count.times {
toolkit.beep()
sleep(100)
}
}
}