-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
128 lines (104 loc) · 2.81 KB
/
build.gradle.kts
File metadata and controls
128 lines (104 loc) · 2.81 KB
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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
gradle.startParameter.apply {
systemPropertiesArgs = mapOf(
"org.gradle.internal.http.socketTimeout" to "30000",
"org.gradle.internal.http.connectionTimeout" to "30000"
)
}
plugins {
application
java
alias(libs.plugins.shadowJar)
checkstyle
pmd
alias(libs.plugins.spotbugs)
jacoco
id("jacoco-report-aggregation")
}
defaultTasks = mutableListOf("shadowJar")
checkstyle {
config = resources.text.fromFile("${rootProject.projectDir}/checkstyle.xml")
toolVersion = libs.versions.checkstyle.get()
}
pmd {
toolVersion = libs.versions.pmd.get()
ruleSetConfig = resources.text.fromFile("${rootProject.projectDir}/pmd.xml")
}
spotbugs {
toolVersion = libs.versions.spotbugs
}
jacoco {
toolVersion = libs.versions.jacoco.get()
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
allprojects {
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
group = "org.hyperagents"
version = "0.0.0-SNAPSHOT"
}
dependencies {
implementation(project(":yggdrasil-utils"))
implementation(project(":yggdrasil-core"))
implementation(project(":yggdrasil-cartago"))
implementation(project(":yggdrasil-websub"))
implementation(libs.vertx.core)
implementation(libs.vertx.config)
compileOnly(libs.spotbugs.annotations)
pmd(libs.pmd.java)
pmd(libs.pmd.ant)
testImplementation(platform(libs.junit.platform))
testImplementation(libs.junit.jupiter)
testImplementation(libs.vertx.junit5)
testImplementation(libs.vertx.web)
testImplementation(libs.vertx.web.client)
testImplementation(libs.httpcomponents.core5)
testImplementation(libs.rdf4j.model)
testImplementation(libs.wot.td.java)
testImplementation(libs.hmas.java)
testImplementation(libs.gson)
testImplementation(files("${rootProject.projectDir}/libs/cartago-3.2-SNAPSHOT-all.jar"))
testCompileOnly(libs.spotbugs.annotations)
}
application {
mainClass = "io.vertx.core.Launcher"
}
val mainVerticleName = "org.hyperagents.yggdrasil.MainVerticle"
tasks {
named<ShadowJar>("shadowJar") {
manifest {
attributes(mapOf("Main-Verticle" to mainVerticleName))
}
mergeServiceFiles {
include("META-INF/services/io.vertx.core.spi.VerticleFactory")
}
}
named<JavaExec>("run") {
args = mutableListOf("run", mainVerticleName, "--launcher-class=${application.mainClass.get()}")
}
compileJava {
options.compilerArgs.addAll(listOf("-parameters"))
}
test {
useJUnitPlatform()
finalizedBy(jacocoTestReport)
}
check {
dependsOn(named<JacocoReport>("testCodeCoverageReport"))
}
spotbugsMain {
reports.create("html") {
required.set(true)
}
}
spotbugsTest {
reports.create("html") {
required.set(true)
}
}
}