generated from VEuPathDB/example-jaxrs-container-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
155 lines (118 loc) · 4.13 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
import org.veupathdb.lib.gradle.container.util.Logger.Level
plugins {
java
id("org.veupathdb.lib.gradle.container.container-utils") version "4.8.10"
id("com.github.johnrengelman.shadow") version "7.1.2"
}
// configure VEupathDB container plugin
containerBuild {
// Change if debugging the build process is necessary.
logLevel = Level.Info
// General project level configuration.
project {
// Project Name
name = "user-dataset-import"
// Project Group
group = "org.veupathdb.service"
// Project Version
version = "3.0.0"
// Project Root Package
projectPackage = "org.veupathdb.service.userds"
// Main Class Name
mainClassName = "Main"
}
// Docker build configuration.
docker {
// Docker build context
context = "."
// Name of the target docker file
dockerFile = "Dockerfile"
// Resulting image tag
imageName = "user-dataset-import"
}
generateJaxRS {
// List of custom arguments to use in the jax-rs code generation command
// execution.
arguments = listOf(/*arg1, arg2, arg3*/)
// Map of custom environment variables to set for the jax-rs code generation
// command execution.
environment = mapOf(/*Pair("env-key", "env-val"), Pair("env-key", "env-val")*/)
}
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
tasks.shadowJar {
exclude("**/Log4j2Plugins.dat")
archiveFileName.set("service.jar")
}
repositories {
mavenLocal()
mavenCentral()
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")
}
}
maven {
url =
uri("https://raw.githubusercontent.com/DICE-UNC/DICE-Maven/master/releases")
}
}
//
// Project Dependencies
//
// versions of VEuPathDB libs
val coreLib = "7.0.1" // Container core lib version
val edaCommon = "11.7.2" // EDA Common version
val fgputil = "2.13.1-jakarta" // FgpUtil version
// ensures changing modules are never cached
configurations.all {
resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS)
}
dependencies {
// Core lib, prefers local checkout if available
implementation(findProject(":core") ?: "org.veupathdb.lib:jaxrs-container-core:${coreLib}")
// published VEuPathDB libs
implementation("org.gusdb:fgputil-db:${fgputil}")
// Postgres
implementation("org.postgresql:postgresql:42.5.0")
implementation("com.zaxxer:HikariCP:5.0.1")
implementation("io.vulpine.lib:sql-import:0.2.1")
// iRODS
implementation("org.irods.jargon:jargon-core:4.3.1.0-RELEASE")
// Jersey
implementation("org.glassfish.jersey.core:jersey-server:3.1.1")
implementation("org.glassfish.jersey.media:jersey-media-json-jackson:3.1.1")
implementation("org.glassfish.jersey.media:jersey-media-multipart:3.1.1")
// Jackson
implementation("com.fasterxml.jackson.core:jackson-databind:2.15.3")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.3")
// Log4J
implementation("org.apache.logging.log4j:log4j-api:2.20.0")
implementation("org.apache.logging.log4j:log4j-core:2.20.0")
// Metrics
implementation("io.prometheus:simpleclient:0.16.0")
implementation("io.prometheus:simpleclient_common:0.16.0")
// CLI
implementation("info.picocli:picocli:4.7.3")
annotationProcessor("info.picocli:picocli-codegen:4.7.3")
// Utils
implementation("io.vulpine.lib:Jackfish:1.1.0")
implementation("com.devskiller.friendly-id:friendly-id:1.1.0")
implementation("io.vulpine.lib:iffy:1.0.1")
// Unit Testing
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
testImplementation("org.mockito:mockito-core:5.2.0")
}
val test by tasks.getting(Test::class) {
// Use junit platform for unit tests
useJUnitPlatform()
}