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
The newest version!
package jp.tomorrowkey.gradle.notifier
import java.awt.*
class BeepNotifier implements Notifier {
int count;
public BeepNotifier(int count) {
this.count = count;
}
@Override
void performNotify(Object task, Object state) {
def toolkit = Toolkit.getDefaultToolkit();
count.times {
toolkit.beep()
sleep(100)
}
}
}