-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
65 lines (55 loc) · 1.62 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
plugins {
id 'java'
id 'war'
}
description = "MYA web-based query tool"
version new File("${projectDir}/VERSION").text.trim()
ext.releaseDate = new Date().format('MMM dd yyyy')
tasks.withType(JavaCompile) {
options.release = 17
options.encoding = 'UTF-8'
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
repositories {
mavenCentral()
}
sourceSets {
integration {
java.srcDir "${projectDir}/src/integration/java"
resources.srcDir "${projectDir}/src/integration/resources"
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
}
}
configurations {
integrationImplementation.extendsFrom testImplementation
integrationRuntimeOnly.extendsFrom runtimeOnly
}
dependencies {
implementation 'org.jlab:jmyapi:9.0.0',
'org.eclipse.parsson:parsson:1.1.1'
providedCompile 'jakarta.servlet:jakarta.servlet-api:6.0.0'
testImplementation 'junit:junit:4.13.2'
}
task integrationTest(type: Test) {
description = 'Runs integration tests.'
group = 'verification'
testClassesDirs = sourceSets.integration.output.classesDirs
classpath = sourceSets.integration.runtimeClasspath
testLogging {
events "passed", "skipped", "failed"
exceptionFormat "full"
showStandardStreams = true
}
}
war {
archiveFileName = 'myquery.war'
filesMatching('WEB-INF/web.xml') {
filter {
String line -> line.replaceAll("@VERSION@", project.version)
}
filter {
String line -> line.replaceAll("@RELEASE_DATE@", releaseDate)
}
}
}