-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
53 lines (43 loc) · 1.23 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
53 lines (43 loc) · 1.23 KB
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
plugins {
id("java")
id("application")
}
group = "com.worldware"
version = "1.0-SNAPSHOT"
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(23))
}
}
application {
mainClass.set("com.worldware.Main")
}
repositories {
mavenCentral()
}
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter:5.8.1")
}
tasks.test {
useJUnitPlatform()
// Print System.out/System.err from tests unconditionally so we can inspect debug output
testLogging {
showStandardStreams = true
}
}
// Configure run task to accept program arguments
tasks.named<JavaExec>("run") {
// Forward stdin so interactive BASIC programs can read user input instead of immediately seeing EOF
standardInput = System.`in`
if (project.hasProperty("args")) {
args = (project.property("args") as String).split("\\s+").toList()
}
}
// ---- BASIC interpreter integration test task: delegates to Java runner ----
tasks.register<JavaExec>("runTestSuite") {
group = "verification"
description = "Runs all .bas programs in test_suite using TestSuiteRunner"
dependsOn("classes")
mainClass.set("com.worldware.TestSuiteRunner")
classpath = sourceSets["main"].runtimeClasspath
}