-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
139 lines (118 loc) · 3.73 KB
/
build.gradle.kts
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
// // // // // // // // // // // // // // // // // // // // // // // // // //
//
// Project Configuration
//
// // // // // // // // // // // // // // // // // // // // // // // // // //
// Project settings
group = "org.veupathdb.lib"
version = "6.0.0"
plugins {
`java-library`
`maven-publish`
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
vendor = JvmVendorSpec.AMAZON
}
withSourcesJar()
withJavadocJar()
}
tasks.withType<Jar> {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
tasks.withType<Test> {
useJUnitPlatform {
excludeTags = setOf("Performance")
}
}
val test by tasks.getting(Test::class) {
// use junit platform for unit tests
useJUnitPlatform {
excludeTags = setOf("Performance")
}
testLogging {
showExceptions = true
showStackTraces = true
showCauses = true
}
}
val perfTest = task<Test>("perfTest") {
useJUnitPlatform {
includeTags = setOf("Performance")
}
outputs.upToDateWhen { false } // Never cache results, we always want to actually run the perf test.
description = "Runs integration tests."
group = "verification"
systemProperties = mapOf(
"numFiles" to System.getProperty("numFiles"),
"recordCount" to System.getProperty("recordCount"),
"cached" to System.getProperty("cached")
)
}
publishing {
repositories {
maven {
name = "GitHub"
url = uri("https://maven.pkg.github.com/veupathdb/lib-eda-subsetting")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN")
}
}
}
publications {
create<MavenPublication>("gpr") {
from(components["java"])
pom {
name.set("EDA Subsetting Library")
description.set("Provides Java interface to query and provide EDA data and metadata from a database")
url.set("https://github.com/VEuPathDB/lib-eda-subsetting")
scm {
connection.set("scm:git:git://github.com/VEuPathDB/lib-eda-subsetting.git")
developerConnection.set("scm:git:ssh://github.com/VEuPathDB/lib-eda-subsetting.git")
url.set("https://github.com/VEuPathDB/lib-eda-subsetting")
}
}
}
}
}
// // // // // // // // // // // // // // // // // // // // // // // // // //
//
// Project Dependencies
//
// // // // // // // // // // // // // // // // // // // // // // // // // //
// Never cache changing dependencies
configurations.all {
resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS)
}
repositories {
mavenCentral()
mavenLocal()
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/veupathdb/maven-packages")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN")
}
}
}
dependencies {
// FgpUtil Dependencies
val fgputil = "2.12.16-jakarta"
implementation("org.gusdb:fgputil-core:${fgputil}")
implementation("org.gusdb:fgputil-db:${fgputil}")
implementation("org.gusdb:fgputil-json:${fgputil}")
implementation("org.gusdb:fgputil-web:${fgputil}")
// Log4J
implementation("org.apache.logging.log4j:log4j-api:2.20.0")
implementation("org.apache.logging.log4j:log4j-core:2.20.0")
// Stub database (included in distribution since StubDB is used in EdaSubsettingService unit tests)
implementation("org.hsqldb:hsqldb:2.7.1")
// Unit Testing
testImplementation("org.junit.jupiter:junit-jupiter:5.11.1")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.11.1")
testImplementation("org.mockito:mockito-core:5.14.0")
testImplementation("org.hamcrest:hamcrest:2.2")
}