-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
103 lines (85 loc) · 2.91 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import com.amazonaws.services.dynamodbv2.model.AttributeDefinition
import com.amazonaws.services.dynamodbv2.model.KeySchemaElement
import com.amazonaws.services.dynamodbv2.model.KeyType
import com.amazonaws.services.dynamodbv2.model.ScalarAttributeType
import com.nike.pdm.localstack.aws.dynamodb.CreateDynamoDbTableTask
import com.nike.pdm.localstack.aws.s3.CreateS3BucketsTask
import com.nike.pdm.localstack.aws.sns.CreateSnsTopicWithSqsEndpointTask
import com.nike.pdm.localstack.aws.sqs.CreateSqsQueueWithDlqTask
buildscript {
dependencies {
classpath "com.nike.pdm.localstack:gradle-localstack-plugin"
}
}
plugins {
id "java"
id "org.springframework.boot" version "2.2.4.RELEASE"
id "io.spring.dependency-management" version "1.0.9.RELEASE"
id "org.unbroken-dome.test-sets" version "3.0.1"
id "com.github.hierynomus.license" version "0.15.0"
}
apply plugin: "com.nike.pdm.localstack"
// Project Configuration
project.group = "com.nike.pdm.localstack"
project.version = "1.0.0"
project.description = "Example project that demonstrates the use of the Gradle LocalStack Plugin"
// Version Configuration
project.ext.awsVersion = "1.11.447"
repositories {
mavenCentral()
jcenter()
}
// Dependency Configuration
dependencies {
implementation "org.springframework.boot:spring-boot-starter-web"
implementation "com.amazonaws:aws-java-sdk-dynamodb:${awsVersion}"
implementation "com.amazonaws:aws-java-sdk-sqs:${awsVersion}"
implementation "com.amazonaws:aws-java-sdk-sns:${awsVersion}"
testImplementation "org.springframework.boot:spring-boot-starter-test"
}
// Spring Boot Configuration
bootRun {
jvmArgs = ['-Dspring.profiles.active=local']
}
// LocalStack Configuration
localstack {
host = 'localhost'
port = 4566
signingRegion = 'us-east-1'
springboot {
profiles = [ 'local' ]
}
}
task setupLocalQueue(type: CreateSqsQueueWithDlqTask) {
queueName = 'catalog-product-change-notification'
}
task setupLocalTopic(type: CreateSnsTopicWithSqsEndpointTask) {
topicName = 'catalog-product-drops'
}
task setupLocalTable(type: CreateDynamoDbTableTask) {
tableName = 'catalog.products'
keySchema = [
new KeySchemaElement("id", KeyType.HASH)
]
attributeDefinitions = [
new AttributeDefinition("id", ScalarAttributeType.S)
]
initializer = 'example.buildsrc.dynamodb.ProductTableInitializer'
}
task setupS3Bucket(type: CreateS3BucketsTask) {
buckets = [ 'catalog-product-bucket' ]
}
// Integration Test Configuration
testSets {
integTest
}
integTest {
dependsOn('startLocalStack')
finalizedBy('killLocalStack')
}
// Licensing Configuration
license {
header rootProject.file('codequality/LICENSE_HEADER')
strictCheck true
excludes([ "**/*.json", "**/*.yml", "**/*.yaml", "**/*.properties", "**/*.html", "**/*.js", "**/*.css", "**/*.map"])
}