This repository has been archived by the owner on Jun 11, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
89 lines (75 loc) · 1.95 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
@file:Suppress("PropertyName", "SpellCheckingInspection")
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.8.10"
id("com.github.johnrengelman.shadow") version "7.1.2"
application
}
group = "com.github.p03w"
version = "2.2.4"
repositories {
mavenCentral()
maven("https://jitpack.io")
}
// Dependency versions
val ktor_version = "1.6.8"
val argparse_version = "2.0.7"
val slf4j_nop_version = "1.7.36"
val jansi_version = "2.4.0"
val inquirer_version = "0.1.0"
val commonImplementaions = setOf(
"io.ktor:ktor-client-core:$ktor_version",
"io.ktor:ktor-client-cio:$ktor_version",
"io.ktor:ktor-client-gson:$ktor_version",
"io.ktor:ktor-server-netty:$ktor_version",
"org.slf4j:slf4j-nop:$slf4j_nop_version",
"org.fusesource.jansi:jansi:$jansi_version",
"com.xenomachina:kotlin-argparser:$argparse_version",
"com.github.kotlin-inquirer:kotlin-inquirer:$inquirer_version",
"com.github.kenneth-lange:java-nlp-text-similarity:-SNAPSHOT",
)
dependencies {
commonImplementaions.forEach {
implementation(it)
}
subprojects.forEach {
implementation(it)
}
}
subprojects {
pluginManager.apply("org.jetbrains.kotlin.jvm")
repositories {
mavenCentral()
maven("https://jitpack.io")
}
dependencies {
commonImplementaions.forEach {
implementation(it)
}
}
}
allprojects {
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "9"
}
tasks.withType<JavaCompile> {
targetCompatibility = "9"
}
}
application {
mainClass.set("com.github.p03w.modifold.MainKt")
}
task("embedVersion") {
doLast {
val file = File("src/main/resources/version.txt")
file.delete()
file.parentFile.mkdirs()
file.createNewFile()
file.writer().use {
it.write(version.toString())
}
}
}
tasks.classes {
dependsOn("embedVersion")
}