-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
70 lines (58 loc) · 1.87 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
/*
* EPUB Generator
* Copyright (C) 2022 qwq233 qwq233@qwq2333.top
* https://github.com/qwq233/epub-generator
*
* This software is non-free but opensource software: you can redistribute it
* and/or modify it under the terms of our Licenses
* as published by James Clef; either
* version 2 of the License, or any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the our
* licenses for more details.
*
* You should have received a copy of the our License
* and eula along with this software. If not, see
* <https://github.com/qwq233/License/blob/master/v2/LICENSE.md>.
*/
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.6.20"
kotlin("plugin.serialization") version "1.6.20-M1"
application
java
}
group = "top.qwq2333"
version = "1.0.9"
repositories {
mavenCentral()
}
val kotlinVersion = "1.6.20"
dependencies {
implementation("com.charleskorn.kaml:kaml:_")
implementation("org.dom4j:dom4j:_")
implementation("com.vladsch.flexmark:flexmark-all:_")
implementation(Kotlin.stdlib.common)
implementation(Kotlin.stdlib)
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:_")
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
application {
mainClass.set("top.qwq2333.MainKt")
}
tasks.withType<Jar> {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
manifest {
attributes["Main-Class"] = "top.qwq2333.MainKt"
}
// To add all the dependencies otherwise a "NoClassDefFoundError" error
from(sourceSets.main.get().output)
dependsOn(configurations.runtimeClasspath)
from({
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
})
}