This repository has been archived by the owner on Jan 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
99 lines (83 loc) · 2.96 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
// Build automation
// Plugins definition
plugins {
id "application"
id 'com.github.johnrengelman.shadow' version '2.0.2'
}
// Mandatory parameter for the Application plugin - Main Java class name for building
mainClassName = "eoepca.TemplateService"
// Overidding parameters for the shadow plugin - Generates output to build/libs/<project-name>.jar
shadowJar {
baseName = project.name
classifier = null
version = null
}
// Repositories
repositories {
jcenter()
mavenCentral()
}
// Custom tasks
sourceSets {
integrationTest {
compileClasspath += main.output
compileClasspath += sourceSets["test"].compileClasspath
runtimeClasspath += main.output
runtimeClasspath += sourceSets["test"].runtimeClasspath
}
}
task integrationTest(type: Test) {
group = "verification"
// Runs tests from src/integrationTest
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
useJUnitPlatform()
testLogging {
events "FAILED", "PASSED"
exceptionFormat "short"
maxGranularity = 3 // test method logging
showStandardStreams = true
}
}
// Dependencies configuration parameters
// Feature dependencies
ext.log4j2_ver = "2.10.0"
// Test dependencies
ext.junit_platform_ver = "1.1.0"
ext.junit_jupiter_ver = "5.1.0"
// Dependencies
dependencies {
// Feature dependencies
// Log4j2 + Jackson for YAML config support and SLF4J adapter
compile("org.apache.logging.log4j:log4j-api:$log4j2_ver")
compile("org.apache.logging.log4j:log4j-core:$log4j2_ver")
compile("org.apache.logging.log4j:log4j-slf4j-impl:$log4j2_ver")
compile("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.7.3")
compile("com.fasterxml.jackson.core:jackson-databind:2.5.4")
// Javalin framework
compile("io.javalin:javalin:2.4.0")
// Test dependencies
// Junit 5
testCompile("org.junit.jupiter:junit-jupiter-api:$junit_jupiter_ver")
testRuntime("org.junit.jupiter:junit-jupiter-engine:$junit_jupiter_ver")
testRuntime("org.junit.platform:junit-platform-launcher:$junit_platform_ver")
// Integration Test Dependencies
integrationTestCompile("com.squareup.okhttp3:okhttp:3.12.0")
// Deployment dependencies
compile "io.kubernetes:client-java:3.0.0"
}
// Tasks
task wrapper(type: Wrapper) {
gradleVersion = '4.10.2'
}
test { // for unit test config
useJUnitPlatform()
// See https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.logging.TestLoggingContainer.html
// events values are here: https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/testing/logging/TestLogEvent.html
testLogging {
events "FAILED", "PASSED"
exceptionFormat "short"
maxGranularity = 3 // test method logging
showStandardStreams = true
}
}