-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
102 lines (85 loc) · 2.33 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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
import org.jmailen.gradle.kotlinter.tasks.LintTask
import org.jmailen.gradle.kotlinter.tasks.FormatTask
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.kotlinter)
application
alias(libs.plugins.shadowjar)
}
buildscript {
repositories {
mavenCentral()
maven("https://jitpack.io")
}
dependencies {
// ktlint rules
classpath("com.github.Suwayomi:Tachidesk-ktlintRules:a8196206b4")
}
}
group = "suwayomi.tachidesk"
version = "1.0.0"
repositories {
mavenCentral()
}
java {
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_1_8
}
dependencies {
implementation(libs.bundles.coroutines)
implementation(libs.settings.core)
implementation(libs.appdirs)
implementation(libs.okhttp)
// Logging
implementation(libs.slf4japi)
implementation(libs.logback)
implementation(libs.kotlinlogging)
// UI
implementation(libs.darklaf)
implementation(libs.miglayout)
// Config
implementation(libs.config)
implementation(libs.config4k)
// Test
testImplementation(libs.kotlin.test.junit5)
testImplementation(libs.coroutines.test)
}
val MainClass = "suwayomi.tachidesk.launcher.MainKt"
application {
mainClass.set(MainClass)
}
tasks {
test {
useJUnitPlatform()
}
withType<KotlinJvmCompile> {
dependsOn("formatKotlin")
compilerOptions {
jvmTarget = JvmTarget.JVM_1_8
freeCompilerArgs.add("-Xcontext-receivers")
}
}
withType<LintTask> {
source(files("src/kotlin"))
}
withType<FormatTask> {
source(files("src/kotlin"))
}
shadowJar {
manifest {
attributes(
"Main-Class" to MainClass,
"Implementation-Title" to rootProject.name,
"Implementation-Vendor" to "The Suwayomi Project",
"Specification-Version" to project.version.toString(),
)
}
archiveBaseName.set(rootProject.name)
archiveClassifier.set(null as String?)
destinationDirectory.set(File("$rootDir/build"))
}
}