-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
88 lines (73 loc) · 2.22 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
import org.jetbrains.dokka.Platform
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("java")
id("maven-publish")
id("org.jetbrains.dokka") version "1.7.20"
kotlin("jvm") version "1.7.20"
}
repositories {
mavenLocal()
mavenCentral()
maven(url = "https://m2.dv8tion.net/releases")
maven(url = "https://jitpack.io")
}
dependencies {
implementation("org.slf4j:slf4j-api:2.0.4")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4")
implementation("jakarta.persistence:jakarta.persistence-api:3.2.0")
implementation("org.json:json:20220924")
implementation("org.jetbrains.kotlin:kotlin-reflect:1.7.20")
implementation("com.ibm.icu:icu4j:72.1")
compileOnly("net.dv8tion:JDA:5.0.0-beta.1")
compileOnly("org.springframework:spring-context:6.0.0")
compileOnly("org.springframework.boot:spring-boot-autoconfigure:2.7.5")
compileOnly("org.springframework.data:spring-data-jpa:2.7.5")
compileOnly("jakarta.persistence:jakarta.persistence-api:2.2.3")
}
group = "com.mrkirby153"
java {
withSourcesJar()
}
kotlin {
jvmToolchain(17)
}
fun publishUrl() = if (project.version.toString().endsWith("-SNAPSHOT")) {
"https://repo.mrkirby153.com/repository/maven-snapshots/"
} else {
"https://repo.mrkirby153.com/repository/maven-releases"
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
}
}
repositories {
maven {
name = "mrkirby153"
url = uri(publishUrl())
credentials {
username = System.getenv("REPO_USERNAME")
password = System.getenv("REPO_PASSWORD")
}
}
}
}
tasks {
withType<DokkaTask>().configureEach {
suppressInheritedMembers.set(true)
}
withType<Jar> {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
withType<KotlinCompile> {
kotlinOptions {
javaParameters = true
// Experimental context receiver support
freeCompilerArgs += "-Xcontext-receivers"
}
}
}