-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
59 lines (49 loc) · 1.49 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
plugins {
id("com.github.johnrengelman.shadow") version "7.1.2"
id("application")
id("java")
}
group = "org.hyperion"
version = "1.0.1"
repositories {
mavenCentral()
}
val graalVersion = "21.3.0"
val junitVersion = "5.8.2"
dependencies {
implementation("org.apache.mina:mina-core:2.0.16") // 2.0.17 and beyond seem to have compatibility issues, need to look into
implementation("org.slf4j:slf4j-api:1.7.32")
implementation("org.slf4j:slf4j-jdk14:1.7.32")
implementation("org.apache.commons:commons-compress:1.21")
implementation("org.bouncycastle:bcprov-jdk15on:1.69")
implementation("org.graalvm.sdk:graal-sdk:$graalVersion")
implementation("org.graalvm.js:js:$graalVersion")
implementation("org.graalvm.js:js-scriptengine:$graalVersion")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
tasks {
test {
useJUnitPlatform()
}
}
val appMainClass = "org.hyperion.Server"
application {
mainClass.set(appMainClass)
applicationDefaultJvmArgs = listOf("-Dpolyglot.js.nashorn-compat=true")
}
tasks.withType<Jar> {
manifest {
attributes["Main-Class"] = appMainClass
}
}
task("generateRsaKeys", JavaExec::class) {
dependsOn("classes")
main = "org.hyperion.util.RsaKeyGenerator"
classpath = sourceSets.main.get().runtimeClasspath
}