forked from xtclang/xvm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
76 lines (64 loc) · 2.01 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
/*
* Build file for the Java tools portion of the XDK.
*/
plugins {
java
}
tasks.register<Copy>("copyImplicits") {
group = "Build"
description = "Copy the implicit.x from :lib_ecstasy project into the build directory."
from(file(project(":lib_ecstasy").property("implicit.x")!!))
into(file("$buildDir/resources/main/"))
doLast {
println("Finished task: copyImplicits")
}
}
tasks.register<Copy>("copyUtils") {
group = "Build"
description = "Copy the classes from :javatools_utils project into the build directory."
dependsOn(project(":javatools_utils").tasks["classes"])
from(file("${project(":javatools_utils").buildDir}/classes/java/main"))
include("**/*.class")
into(file("$buildDir/classes/java/main"))
doLast {
println("Finished task: copyUtils")
}
}
tasks.jar {
val copyImplicits = tasks["copyImplicits"]
val copyUtils = tasks["copyUtils"]
dependsOn(copyImplicits)
dependsOn(copyUtils)
mustRunAfter(copyImplicits)
mustRunAfter(copyUtils)
val version = rootProject.version
manifest {
attributes["Manifest-Version"] = "1.0"
attributes["Sealed"] = "true"
attributes["Main-Class"] = "org.xvm.tool.Launcher"
attributes["Name"] = "/org/xvm/"
attributes["Specification-Title"] = "xvm"
attributes["Specification-Version"] = version
attributes["Specification-Vendor"] = "xtclang.org"
attributes["Implementation-Title"] = "xvm-prototype"
attributes["Implementation-Version"] = version
attributes["Implementation-Vendor"] = "xtclang.org"
}
}
tasks.compileTestJava {
dependsOn(tasks["copyImplicits"])
dependsOn(tasks["copyUtils"])
}
tasks.test {
useJUnit();
maxHeapSize = "1G"
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
dependencies {
implementation("org.xtclang.xvm:javatools_utils:")
// Use JUnit test framework
testImplementation("junit:junit:4.12")
}