-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
75 lines (57 loc) · 1.62 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id("java")
id("com.github.johnrengelman.shadow") version "8.1.1"
id("maven-publish")
}
group = "org.teleight"
version = "1.0"
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
//Tests
testImplementation(platform("org.junit:junit-bom:5.9.2"))
testImplementation("org.junit.jupiter:junit-jupiter")
//Json
implementation("com.fasterxml.jackson.core:jackson-databind:2.17.1")
//Checker
implementation("org.checkerframework:checker:3.42.0")
implementation("org.checkerframework:checker-qual:3.42.0")
//Annotations
implementation("org.jetbrains:annotations:24.0.1")
}
tasks.test {
useJUnitPlatform()
}
tasks.withType<Javadoc> {
options {
(this as CoreJavadocOptions).addStringOption("Xdoclint:all,-missing", "-quiet")
}
}
val javadocJar by tasks.registering(Jar::class) {
archiveClassifier.set("javadoc")
from(sourceSets.getByName("main").allSource)
archiveFileName.set("TeleightBots-javadoc.jar")
}
val sourcesJar by tasks.registering(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets.getByName("main").allSource)
archiveFileName.set("TeleightBots-sources.jar")
}
publishing {
publications {
create<MavenPublication>("maven") {
artifactId = "TeleightBots"
artifact(javadocJar)
artifact(sourcesJar)
project.shadow.component(this)
}
}
}
tasks.withType<ShadowJar> {
archiveClassifier.set("")
archiveVersion.set("")
archiveFileName.set("TeleightBots.jar")
}