forked from xtclang/xvm
/
build.gradle.kts
77 lines (66 loc) · 2.15 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
77
import org.gradle.language.base.plugins.LifecycleBasePlugin.BUILD_GROUP
/*
* Build file for the Java tools portion of the XDK.
*/
plugins {
java
}
dependencies {
implementation("org.xtclang.xvm:javatools_utils:")
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
testing {
suites {
val test by getting(JvmTestSuite::class) {
useJUnitJupiter()
}
}
}
tasks {
val copyImplicits by registering(Copy::class) {
group = BUILD_GROUP
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 {
logger.info("Finished task: copyImplicits")
}
}
val copyUtils by registering(Copy::class) {
group = BUILD_GROUP
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 {
logger.info("Finished task: copyUtils")
}
}
jar {
dependsOn(copyImplicits, copyUtils)
mustRunAfter(copyImplicits, 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"
}
}
compileTestJava {
dependsOn(copyImplicits, copyUtils)
}
test {
maxHeapSize = "1G"
}
}