-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathbuild.gradle.kts
86 lines (73 loc) · 2.59 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
java apply true
`java-gradle-plugin` apply true
`version-catalog` apply true
kotlin("jvm") version libs.versions.kotlin apply true
id("com.gradleup.shadow") version "8.3.3" apply false // Building fat jar
id("org.inferred.processors") version "3.7.0" apply false // Annotation processing
id("io.papermc.paperweight.userdev") version libs.versions.paperweight apply false // NMS Paper
id("org.flywaydb.flyway") version libs.versions.flyway apply false // Flyway
}
repositories {
mavenCentral()
}
subprojects {
if (project.name == "private") {
return@subprojects
}
repositories {
gradlePluginPortal()
mavenLocal()
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://oss.sonatype.org/content/repositories/snapshots/")
maven("https://mvn.lumine.io/repository/maven-public/")
maven("https://repo.xenondevs.xyz/releases")
maven("https://repo.dmulloy2.net/repository/public/")
maven("https://repo.spongepowered.org/maven/")
maven("https://maven.aestrus.io/releases")
maven("https://repo.opencollab.dev/maven-releases/")
maven("https://repo.md-5.net/repository/public/")
maven("https://catcoder.pl.ua/snapshots")
maven("https://jitpack.io")
maven("https://repo.viaversion.com")
maven {
url = uri("http://mykindos.me:8081/repository/maven-public/")
isAllowInsecureProtocol = true
}
}
// Set java language version
plugins.apply("java")
plugins.apply("org.inferred.processors")
plugins.apply("com.gradleup.shadow")
plugins.apply("org.jetbrains.kotlin.jvm")
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
// Shadow
tasks.withType<ShadowJar>().configureEach {
relocate("com.github.benmanes.caffeine", "me.mykindos.betterpvp.caffeine")
archiveBaseName.set(project.name)
archiveVersion.set("")
archiveClassifier.set("")
destinationDirectory.set(file("$rootDir/build/"))
mergeServiceFiles()
}
tasks.assemble.configure {
dependsOn(tasks.withType<ShadowJar>())
}
// Change output jar location
//tasks.named("assemble").configure {
// tasks.findByName("reobfJar")?.let { reobf ->
// this@configure.dependsOn(reobf)
// }
//}
// Make tests use JUnit
tasks {
test {
useJUnitPlatform()
}
}
}