-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
61 lines (49 loc) · 1.41 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
plugins {
id 'java'
id 'application'
}
group 'org.jajaho2'
version '1.0-SNAPSHOT'
// Configure the application plugin
application {
mainClass.set('org.jajaho.main.Main')
}
repositories {
mavenCentral()
}
dependencies {
// Updated JUnit versions for Java 21
implementation 'junit:junit:4.13.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.1'
// Updated JGraphT dependencies
implementation group: 'org.jgrapht', name: 'jgrapht-core', version: '1.5.2'
implementation group: 'org.jgrapht', name: 'jgrapht-ext', version: '1.5.2'
// Removing jgrapht-jdk1.5 as it's very old and incompatible
implementation group: 'info.picocli', name: 'picocli', version: '4.7.5'
annotationProcessor 'info.picocli:picocli-codegen:4.7.5'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
jar {
manifest {
attributes(
'Main-Class': 'org.jajaho.main.Main'
)
}
// Include all dependencies in the JAR
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
// Exclude META-INF signatures to avoid conflicts
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
tasks.withType(JavaCompile) {
options.compilerArgs += ["-Aproject=${project.name}"]
}
test {
useJUnitPlatform()
}