-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
123 lines (106 loc) · 3.95 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
buildscript {
ext {
springBootVersion = '2.1.0.RELEASE'
}
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath "gradle.plugin.com.palantir.gradle.docker:gradle-docker:0.21.0"
}
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'com.palantir.docker'
group = 'com.omigost.localaws'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 8
repositories {
mavenCentral()
}
bootJar {
baseName = 'budgets'
version = '0.1.0'
mainClassName = 'com.omigost.localaws.budgets.ServerApplication'
}
configurations {
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}
sourceSets {
integrationTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/integration-test/java')
}
resources.srcDir file('src/integration-test/resources')
}
}
dependencies {
implementation('org.springframework.boot:spring-boot-starter-web')
testImplementation('org.springframework.boot:spring-boot-starter-test')
implementation('org.projectlombok:lombok:1.18.4')
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
compile 'com.h2database:h2:1.3.148'
compile 'org.influxdb:influxdb-java:2.8'
compile "org.testcontainers:influxdb:1.11.2"
implementation('org.postgresql:postgresql:42.2.1')
implementation('com.amazonaws:aws-java-sdk-iam:1.11.457')
implementation('com.amazonaws:aws-java-sdk-organizations:1.11.457')
implementation('com.amazonaws:aws-java-sdk-budgets:1.11.475')
//all of amazon aws sdk
implementation('com.amazonaws:aws-java-sdk:1.11.475')
compile 'org.testcontainers:junit-jupiter:1.11.0'
compile 'org.testcontainers:localstack:1.8.3'
integrationTestCompile 'org.springframework.boot:spring-boot-starter-web'
integrationTestCompile 'org.springframework.boot:spring-boot-starter-test'
integrationTestCompile 'org.projectlombok:lombok:1.18.4'
integrationTestCompile 'junit:junit:4.12'
integrationTestCompile 'org.assertj:assertj-core:3.0.0'
integrationTestCompile 'com.amazonaws:aws-java-sdk-sqs:1.11.524'
integrationTestCompile 'com.amazonaws:aws-java-sdk-s3:1.11.524'
integrationTestCompile 'com.amazonaws:aws-java-sdk-iam:1.11.457'
integrationTestCompile 'com.amazonaws:aws-java-sdk-organizations:1.11.457'
integrationTestCompile 'com.amazonaws:aws-java-sdk-budgets:1.11.475'
integrationTestCompile 'com.amazonaws:aws-java-sdk:1.11.475'
}
task integrationTest(type: Test) {
testClassesDir = sourceSets.integrationTest.output.classesDir
classpath = sourceSets.integrationTest.runtimeClasspath
}
task unpack(type: Copy) {
dependsOn bootJar
from(zipTree(tasks.bootJar.outputs.files.singleFile))
into("build/dependency")
}
task classpathJar(type: Jar) {
inputs.files sourceSets.test.runtimeClasspath
archiveName = "omigost-budgets.jar"
doFirst {
// If run in configuration phase, some artifacts may not exist yet (after clean)
// and File.toURI can’t figure out what is directory to add the critical trailing slash.
manifest {
def classpath = sourceSets.test.runtimeClasspath.files
attributes "Class-Path": classpath.collect {f -> f.toURI().toString()}.join(" ")
}
}
}
bootRun {
classpath = classpathJar.outputs.files
main = 'com.omigost.localaws.budgets.ServerApplication'
}
docker {
name "omigost/local-aws-budgets"
copySpec.from(tasks.unpack.outputs).into("dependency")
dockerfile file('Dockerfile')
buildArgs(['DEPENDENCY': "dependency"])
noCache true
}