-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
121 lines (101 loc) · 4.23 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
application
kotlin("jvm")
id("com.google.devtools.ksp")
id("org.jetbrains.kotlin.plugin.serialization")
id("org.openjfx.javafxplugin")
id("com.github.johnrengelman.shadow")
}
group = "ink.bluecloud"
version = "1.0-SNAPSHOT"
repositories {
mavenLocal()
maven ("https://mirrors.cloud.tencent.com/nexus/repository/maven-public/")
maven ("https://repo.huaweicloud.com/repository/maven/")
maven ("https://maven.aliyun.com/repository/central/")
maven ("https://maven.aliyun.com/repository/public/")
mavenCentral()
}
val javafxVersion:String by properties
val zxingVersion:String by properties
val koinVersion:String by properties
val koinLoggerVersion:String by properties
val koinKspVersion:String by properties
val okhttpVersion:String by properties
val coroutineVersion:String by properties
val kotlinVersion:String by properties
val ztExecVersion:String by properties
val bouncycastleVersion:String by properties
val jsoupVersion:String by properties
val log4jVersion:String by properties
val fastjsonVersion:String by properties
val protobufVersion:String by properties
val h2Version:String by properties
val ktormCoreVersion:String by properties
val ktormKspVersion:String by properties
javafx {
version = javafxVersion
modules = listOf("javafx.controls", "javafx.media")
}
dependencies {
//GUI
implementation(files(
"libs\\ElementFX.jar",
"libs\\CloudTools.jar",
"libs\\KotlinFx.jar"
))
implementation(group = "io.github.palexdev", name = "materialfx", version = "11.13.8")
//Kotlin
implementation(group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-javafx", version = coroutineVersion)
implementation(group = "org.jetbrains.kotlin", name = "kotlin-reflect", version = kotlinVersion)
//koin
implementation("io.insert-koin:koin-core:${koinVersion}")
implementation("io.insert-koin:koin-logger-slf4j:${koinLoggerVersion}")
implementation("io.insert-koin:koin-annotations:${koinKspVersion}")
ksp("io.insert-koin:koin-ksp-compiler:${koinKspVersion}")
//Utils
implementation(group = "org.zeroturnaround", name = "zt-exec", version = ztExecVersion)
//DataBase
// implementation(group = "com.h2database", name = "h2", version = h2Version)
// implementation(group = "org.ktorm", name = "ktorm-core", version = ktormCoreVersion)
// implementation(group = "org.ktorm", name = "ktorm-ksp-api", version = ktormKspVersion)
// ksp(group = "org.ktorm", name = "ktorm-ksp-compiler", version = ktormKspVersion)
//Http
implementation(group = "com.squareup.okhttp3", name = "okhttp", version = okhttpVersion)
implementation(group = "org.jsoup", name = "jsoup", version = jsoupVersion)
implementation(group = "org.bouncycastle", name = "bcprov-jdk15on", version = bouncycastleVersion)
//Serialization
implementation(group = "com.alibaba.fastjson2", name = "fastjson2-kotlin", version = fastjsonVersion)
implementation(group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-protobuf-jvm", version = protobufVersion)
//QRCode
implementation(group = "com.google.zxing", name = "core", version = zxingVersion)
implementation(group = "com.google.zxing", name = "javase", version = zxingVersion)
//Logger
implementation(group = "org.apache.logging.log4j", name = "log4j-core", version = log4jVersion)
implementation(group = "org.apache.logging.log4j", name = "log4j-api", version = log4jVersion)
implementation(group = "org.apache.logging.log4j", name = "log4j-slf4j-impl", version = log4jVersion)
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
}
sourceSets.main {
java.srcDirs("build/generated/ksp/main/kotlin")
}
tasks.test {
useJUnitPlatform()
}
tasks.withType<KotlinCompile> {
kotlinOptions.run {
jvmTarget = "17"
// freeCompilerArgs += "-Xlambdas=indy"
freeCompilerArgs += "-Xcontext-receivers"
}
}
application {
mainClass.set("ink.bluecloud.MainKt")
}
/*
running vm options on hotspot
--add-opens=javafx.controls/javafx.scene.control.skin=ALL-UNNAMED
--add-opens=javafx.media/javafx.scene.media=ALL-UNNAMED
--add-opens=javafx.media/com.sun.media.jfxmedia.locator=ALL-UNNAMED
*/