-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
61 lines (51 loc) · 1.53 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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.configurationcache.extensions.capitalized
plugins {
java
}
allprojects {
apply<JavaPlugin>()
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories {
mavenCentral()
}
group = "it.unibo.ise"
}
subprojects {
sourceSets {
main {
resources {
srcDir("src/main/asl")
}
}
}
dependencies {
implementation("io.github.jason-lang:interpreter:3.2.0")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.0")
}
val mas2jFiles = file("${projectDir}/src/main").listFiles()?.filter { it.extension == "mas2j" }
mas2jFiles?.forEach { mas2jFile ->
task<JavaExec>("run${mas2jFile.nameWithoutExtension.capitalized()}Mas") {
group = "run"
classpath = sourceSets.getByName("main").runtimeClasspath
mainClass.set("jason.infra.centralised.RunCentralisedMAS")
args(mas2jFile.path)
standardInput = System.`in`
javaLauncher.set(javaToolchains.launcherFor(java.toolchain))
}
}
tasks.test {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
exceptionFormat = TestExceptionFormat.FULL
showStandardStreams = true
}
include("**/PacmanTest.class")
}
}