/
build.gradle.kts
132 lines (101 loc) · 3.4 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
plugins {
java
`jvm-test-suite`
`maven-publish`
war
id("org.gretty") version "3.1.1"
id("com.github.ben-manes.versions") version "0.51.0"
}
group = "org.jenkins-ci"
description = "User self-service account management app"
version = "2.5"
repositories {
mavenCentral()
maven("https://repo.jenkins-ci.org/public/")
maven("https://git.captcha.com/maven.git/blob_plain/HEAD:/")
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
plugins.withId("java") {
the<JavaPluginExtension>().toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
java {
withSourcesJar()
withJavadocJar()
}
testing {
suites {
@Suppress("UnstableApiUsage") val test by getting(JvmTestSuite::class) {
useJUnitJupiter()
}
@Suppress("UnstableApiUsage", "UNUSED_VARIABLE") val integrationTest by registering(JvmTestSuite::class) {
sources {
java {
setSrcDirs(listOf("src/it/java"))
}
}
dependencies {
implementation(project())
implementation("io.github.bonigarcia:webdrivermanager:5.8.0")
implementation("com.sun.mail:jakarta.mail:2.0.1")
implementation("org.seleniumhq.selenium:selenium-java:4.18.1")
implementation("org.seleniumhq.selenium:selenium-chrome-driver:4.19.0")
implementation("org.assertj:assertj-core:3.25.3")
implementation("com.unboundid:unboundid-ldapsdk:7.0.0")
implementation("com.icegreen:greenmail-junit5:2.0.1")
}
targets {
all {
testTask.configure {
shouldRunAfter(test)
}
}
}
testType.set(TestSuiteType.INTEGRATION_TEST)
}
}
}
tasks.named("check") {
dependsOn(testing.suites.named("integrationTest"))
}
dependencies {
implementation("com.typesafe:config:1.4.3")
implementation("javax.servlet:javax.servlet-api:4.0.1")
implementation("org.glassfish:javax.json:1.1.4")
implementation("commons-codec:commons-codec:1.17.0")
implementation("org.kohsuke.stapler:stapler-jelly:1863.vd250086e9885")
implementation("org.kohsuke.stapler:stapler-openid-server:1.0")
implementation("commons-jelly:commons-jelly-tags-define:1.0")
implementation("com.sun.mail:jakarta.mail:2.0.1")
implementation("com.sun.activation:jakarta.activation:2.0.1")
implementation("org.webjars:webjars-servlet-2.x:1.6")
implementation("org.webjars:jquery:3.7.1")
implementation("org.webjars:jquery-ui:1.13.2")
implementation("org.webjars.bower:fontawesome:4.7.0")
implementation("com.captcha:botdetect-jsp20:4.0.beta3.7")
implementation("com.github.spotbugs:spotbugs-annotations:4.8.5")
implementation("com.google.guava:guava:33.2.0-jre")
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
}
tasks {
test {
useJUnitPlatform()
}
withType<org.akhikhl.gretty.AppBeforeIntegrationTestTask> {
doFirst {
jvmArgs = listOf("-DSMTP_PORT=3025", "-DLDAP_URL=ldap://localhost:3389")
}
}
named("war") {
dependsOn("check")
}
}
gretty {
contextPath = "/"
httpPort = 8080
integrationTestTask = "integrationTest"
servletContainer = "jetty10"
}