forked from classmethod/gradle-aws-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
38 lines (29 loc) · 876 Bytes
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// -*- coding: utf-8; mode: groovy -*-
import jp.classmethod.aws.gradle.sqs.AmazonSQSSendMessagesTask;
import jp.classmethod.aws.gradle.sqs.AmazonSQSMessageConsumerTask;
import java.util.stream.Stream;
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "jp.classmethod.aws:gradle-aws-plugin:0.+"
}
}
apply plugin: "jp.classmethod.aws.sqs"
def myQueueName = 'gradle-aws-plugin-sample'
task sendMessages(type: AmazonSQSSendMessagesTask) {
queueName myQueueName
messages Stream.generate { "Message ${UUID.randomUUID()}".toString() }.limit(250)
}
task deleteMessages(type: AmazonSQSMessageConsumerTask) {
queueName myQueueName
showMessages false
}
task viewMessages(type: AmazonSQSMessageConsumerTask) {
queueName myQueueName
deleteMessages false
maxNumberOfMessages 50
}