-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
110 lines (88 loc) · 2.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
plugins {
id "application"
id "com.diffplug.spotless" version "6.15.0"
id "jacoco"
id "me.qoomon.git-versioning" version "6.4.0"
}
version = "develop"
gitVersioning.apply {
refs {
tag("v(?<version>.*)") {
version = '${ref.version}'
}
rev {
version = 'develop-${commit.short}'
}
}
}
group = "chotto"
repositories {
mavenCentral()
maven { url "https://artifacts.consensys.net/public/maven/maven/" }
}
dependencies {
def logbackVersion = "1.4.5"
def javalinVersion = "5.3.0"
def picocliVersion = "4.7.0"
def junitVersion = "5.9.1"
implementation("ch.qos.logback:logback-core:${logbackVersion}")
implementation("ch.qos.logback:logback-classic:${logbackVersion}")
implementation("org.slf4j:slf4j-api:2.0.5")
implementation("com.fasterxml.jackson.core:jackson-databind:2.14.1")
implementation("io.javalin:javalin:${javalinVersion}")
implementation("info.picocli:picocli:${picocliVersion}")
annotationProcessor("info.picocli:picocli-codegen:${picocliVersion}")
implementation("tech.pegasys:jblst:0.3.10")
implementation("org.apache.tuweni:tuweni-units:2.3.1")
implementation('com.networknt:json-schema-validator:1.0.76')
implementation("gg.jte:jte:2.2.4")
implementation("com.pivovarit:throwing-function:1.5.1")
testImplementation("org.junit.jupiter:junit-jupiter:${junitVersion}")
testImplementation("org.junit.jupiter:junit-jupiter-params:${junitVersion}")
testImplementation("org.mockito:mockito-core:5.1.0")
testImplementation("org.assertj:assertj-core:3.24.1")
testImplementation("org.skyscreamer:jsonassert:1.5.1")
testImplementation("io.javalin:javalin-testtools:${javalinVersion}")
testImplementation("org.mock-server:mockserver-netty-no-dependencies:5.15.0")
testImplementation("org.awaitility:awaitility:4.2.0")
testImplementation("io.github.hakky54:logcaptor:2.8.0")
}
application {
mainClass.set("chotto.Chotto")
}
java {
sourceCompatibility = 11
targetCompatibility = 11
}
compileJava {
options.compilerArgs += ["-Aproject=${project.group}/${project.name}"]
}
def generatedResources = "$buildDir/generated-resources/main"
sourceSets {
main {
//register an output folder on the main SourceSet:
output.dir(generatedResources, builtBy: "generateVersionTxt")
//it is now a part of the 'main' classpath and will be a part of the jar
}
}
tasks.register("generateVersionTxt") {
description "Creates a version.txt file with build info that is added to the root of the jar"
doLast {
new File(generatedResources).mkdirs()
def generated = new File(generatedResources, "version.txt")
generated.text = "Version: $rootProject.version"
}
}
spotless {
java {
googleJavaFormat("1.15.0")
}
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
}
jacocoTestReport {
reports {
xml.required = true
}
}