-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
121 lines (106 loc) · 3.31 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import java.time.Duration
plugins {
id 'java'
id 'jacoco'
id 'org.jetbrains.kotlin.jvm' version '2.0.0'
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
jacocoTestReport {
reports {
xml.enabled true
xml.outputLocation.set(file("$buildDir/reports/jacoco/test/xml/index.xml"))
html.enabled false
}
}
test {
useJUnitPlatform()
jvmArgs += '--enable-preview'
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
}
// Set a timeout for tests to prevent hanging tests
timeout = Duration.ofMinutes(2)
// Ensure the test environment is not headless
systemProperty 'java.awt.headless', 'false'
environment 'DISPLAY', ':99.0' // Use Xvfb for Linux environments if needed
}
group 'cyder-utils'
version '0.1.0'
sourceSets {
main {
java {
srcDirs = ['src/main/java']
}
}
}
allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs += '--enable-preview'
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
ext {
annotationsVersion = '23.0.0'
guavaVersion = '31.1-jre'
gsonVersion = '2.10'
jsoupVersion = '1.15.2'
jlayerVersion = '1.0.1'
javaulatorVersion = '3.0.3'
commonsVersion = '3.12.0'
commonsTextVersion = '1.9'
httpClientVersion = '4.5.13'
commonsIoVersion = '20030203.000550'
inflectorVersion = '1.3'
junitVersion = '5.9.1'
zip4jVersion = '2.11.5'
}
dependencies {
implementation 'org.jetbrains:annotations:' + annotationsVersion
implementation 'com.google.guava:guava:' + guavaVersion
implementation 'com.google.code.gson:gson:' + gsonVersion
implementation 'org.jsoup:jsoup:' + jsoupVersion
implementation 'javazoom:jlayer:' + jlayerVersion
implementation 'com.fathzer:javaluator:' + javaulatorVersion
implementation 'org.apache.commons:commons-lang3:' + commonsVersion
implementation 'org.apache.commons:commons-text:' + commonsTextVersion
implementation 'org.apache.httpcomponents:httpclient:' + httpClientVersion
implementation 'commons-io:commons-io:' + commonsIoVersion
implementation 'org.atteo:evo-inflector:' + inflectorVersion
implementation 'org.junit.jupiter:junit-jupiter-api:' + junitVersion
implementation 'net.lingala.zip4j:zip4j:' + zip4jVersion
implementation 'com.github.nathancheshire:gravatarjavaclient:2.0.3'
// Test
testImplementation 'org.junit.jupiter:junit-jupiter-engine:' + junitVersion
testImplementation 'org.mockito:mockito-junit-jupiter:4.5.1'
testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0'
testImplementation 'org.mockito:mockito-inline:4.3.1'
// Selenium dependencies
implementation 'org.seleniumhq.selenium:selenium-java:4.21.0'
implementation 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
}
build.dependsOn(compileJava, compileTestJava)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}