-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
73 lines (62 loc) · 1.5 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
plugins {
kotlin("jvm") version "2.1.0-Beta2"
id("com.gradleup.shadow") version "8.3.5"
}
group = "org.zxnoter"
repositories {
mavenCentral()
}
dependencies {
}
tasks.test {
useJUnitPlatform()
}
subprojects {
repositories {
mavenCentral()
}
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "com.gradleup.shadow")
tasks.test {
useJUnitPlatform()
}
dependencies {
// implementation("com.google.code.gson:gson:2.8.9")
// implementation("org.bytedeco:ffmpeg:6.1.1-1.5.10")
testImplementation(kotlin("test"))
}
}
allprojects {
group = "org.zxnoter"
}
task("buildApp") {
group = "zxnoter"
description = "Build the app module"
dependsOn(":zxnoter-app:shadowJar")
}
task("buildExtensionExample") {
group = "zxnoter"
description = "Build the core module"
dependsOn(":extensions:extension-example:shadowJar")
}
task("buildAll") {
group = "zxnoter"
description = "Build all module"
dependsOn(":buildApp", ":buildExtensionExample")
}
task("run") {
group = "zxnoter"
description = "run the app"
dependsOn(":buildAll")
val javaHome = project.findProperty("javaHome") ?: System.getProperty("java.home")
val jarPath = "${Config.runtimeDir.absoluteFile}/zxnoter.jar"
doLast {
exec {
commandLine(
"cmd", "/c", """
chcp 65001 && "${javaHome}/bin/java" -jar "$jarPath"
""".trimIndent()
)
}
}
}