-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
145 lines (127 loc) · 4.19 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
plugins {
id 'war'
id 'java'
id 'jacoco'
id 'application'
id 'maven-publish'
id 'co.uzzu.dotenv.gradle' version '2.0.0'
id 'de.undercouch.download' version '5.0.4'
id 'org.springframework.boot' version '2.6.6'
id 'com.github.ben-manes.versions' version '0.42.0'
id 'com.github.dawnwords.jacoco.badge' version '0.2.4'
}
group = 'org.bbaw.aaew.tla'
version = '0.0.860-dev'
sourceCompatibility = '11'
publishing {
publications {
maven(MavenPublication) {
artifactId = 'tla-es'
pom {
name = 'TLA Elasticsearch Backend'
description = 'Elasticsearch backend for the Thesaurus Linguae Aegyptiae web component'
}
from components.java
}
}
}
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
configurations {
implementation.exclude module: 'spring-boot-starter-tomcat'
implementation.exclude group: 'jakarta.xml.bind'
implementation.exclude group: 'org.xmlunit'
implementation.exclude group: 'org.skyscreamer'
implementation.exclude module: 'jackson-dataformat-smile'
// ES transport client stuff
implementation.exclude module: 'transport'
implementation.exclude module: 'transport-netty4-client'
testImplementation.exclude module: 'junit-vintage-engine'
testImplementation.exclude group: 'org.junit.vintage'
}
dependencies {
implementation 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.22'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
implementation 'com.github.thesaurus-linguae-aegyptiae:tla-common:master-SNAPSHOT'
implementation 'org.modelmapper:modelmapper:3.1.0'
implementation 'org.apache.commons:commons-compress:1.21'
implementation 'org.yaml:snakeyaml:1.30'
implementation 'org.springframework.boot:spring-boot:2.6.6'
implementation 'org.springframework.boot:spring-boot-starter-jetty:2.6.6'
implementation 'org.springframework.boot:spring-boot-autoconfigure:2.6.6'
implementation 'org.springframework.data:spring-data-elasticsearch:4.3.3'
implementation 'org.springframework:spring-web:5.3.18'
implementation 'org.springframework:spring-webmvc:5.3.18'
implementation 'org.apache.logging.log4j:log4j-core:2.17.2'
implementation 'org.slf4j:slf4j-simple:2.0.0-alpha7'
testImplementation 'org.springframework.boot:spring-boot-starter-test:2.6.6'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
}
application {
mainClass = 'tla.backend.App'
}
test {
useJUnitPlatform{
includeTags '!search'
}
environment "ES_PORT", env.fetch("ES_PORT", "9200")
finalizedBy 'jacocoTestReport'
}
task testSearch(type: Test) {
group = 'Verification'
description = 'Runs search integration tests against populated ES instance.'
systemProperty 'spring.profiles.active', 'search'
environment "ES_PORT", env.fetch("ES_PORT", "9200")
useJUnitPlatform {
includeTags 'search'
}
}
task testAll(type: Test) {
group = 'Verification'
description = 'Runs both search integration and unit tests.'
useJUnitPlatform()
environment "ES_PORT", env.fetch("ES_PORT", "9200")
finalizedBy 'jacocoTestReport'
}
jacocoTestReport {
reports {
xml.required.set(true)
html.required.set(true)
}
finalizedBy 'generateJacocoBadge'
}
springBoot {
buildInfo()
}
bootRun {
if (project.hasProperty('args')) {
args project.args.split(',')
}
environment "ES_PORT", env.fetch("ES_PORT", "9200")
environment "ES_HOST", env.fetch("ES_HOST", "localhost")
}
task downloadSample(type: Download) {
group = 'Init'
description = 'Download corpus sample file'
src env.fetch("SAMPLE_URL", "http://")
dest new File('sample.tar.gz')
onlyIfModified true
outputs.files(
file("sample.tar.gz")
)
}
clean {
dependsOn 'cleanDownloadSample'
}
task populate {
group = 'Init'
description = 'Download corpus sample and ingest into database backend'
doLast {
bootRun.args = ['--data-file=sample.tar.gz', '--shutdown']
}
finalizedBy 'bootRun'
}