-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
84 lines (75 loc) · 2.51 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
plugins {
java
`kotlin-dsl`
`maven-publish`
id("com.github.johnrengelman.shadow") version("8.1.1")
}
group = "me.xemor"
version = "2.24.1"
repositories {
mavenCentral()
mavenLocal()
maven { url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") }
maven { url = uri("https://oss.sonatype.org/content/groups/public/") }
maven { url = uri("https://jitpack.io/")}
maven { url = uri("https://repo.xemor.zip/releases")}
maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots/") {
name = "sonatype-oss-snapshots"
}
}
dependencies {
compileOnly("org.spigotmc:spigot-api:1.21.3-R0.1-SNAPSHOT")
compileOnly("org.jetbrains:annotations:23.0.0")
shadow("net.kyori:adventure-platform-bukkit:4.3.3-SNAPSHOT")
shadow("net.kyori:adventure-text-minimessage:4.17.0")
shadow("me.xemor:configurationdata:3.5.1-SNAPSHOT")
shadow("me.creeves:ParticlesLibrary:1.1-SNAPSHOT")
}
java {
configurations.shadow.get().dependencies.remove(dependencies.gradleApi())
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
publishing {
repositories {
maven {
name = "xemorReleases"
url = uri("https://repo.xemor.zip/releases")
credentials(PasswordCredentials::class)
authentication {
isAllowInsecureProtocol = true
create<BasicAuthentication>("basic")
}
}
maven {
name = "xemorSnapshots"
url = uri("https://repo.xemor.zip/snapshots")
credentials(PasswordCredentials::class)
authentication {
isAllowInsecureProtocol = true
create<BasicAuthentication>("basic")
}
}
}
publications {
create<MavenPublication>("maven") {
groupId = rootProject.group.toString()
artifactId = rootProject.name
version = rootProject.version.toString()
from(project.components["java"])
}
}
}
tasks.shadowJar {
minimize()
relocate("net.kyori", "me.xemor.skillslibrary2.kyori")
relocate("me.xemor.configurationdata", "me.xemor.skillslibrary2.configurationdata")
configurations = listOf(project.configurations.shadow.get())
val folder = System.getenv("pluginFolder")
destinationDirectory.set(file(folder))
}
tasks.processResources {
inputs.property("version", rootProject.version)
filesMatching("plugin.yml") {
expand("version" to rootProject.version)
}
}