generated from SolteraGG/kotlin-plugin-base
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle.kts
152 lines (122 loc) · 4.84 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
import kr.entree.spigradle.kotlin.jitpack
import kr.entree.spigradle.kotlin.paper
import kr.entree.spigradle.kotlin.vaultAll
plugins {
kotlin("jvm") version "1.4.21"
id("kr.entree.spigradle") version "2.2.3"
id("com.github.johnrengelman.shadow") version "5.2.0"
id("org.jlleitschuh.gradle.ktlint") version "9.4.1"
id("eclipse")
id("net.nemerosa.versioning") version "2.14.0"
}
group = "com.dumbdogdiner"
version = "1.0.0-beta"
repositories {
mavenCentral()
jitpack()
maven("https://s01.oss.sonatype.org/content/repositories/snapshots")
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
maven("https://repo.codemc.org/repository/maven-public/")
maven("https://maven.enginehub.org/repo/")
maven {
credentials {
username = "${property("ghUser")}"
password = "${property("ghPass")}"
}
url = uri("https://maven.pkg.github.com/DumbDogDiner/StickyAPI/")
}
maven("https://raw.githubusercontent.com/JorelAli/CommandAPI/mvn-repo/")
val githubReleases = ivy {
// https://github.com/ervinnnc/VoxelSniper/releases/download/v6.1.2/VoxelSniper-6.1.2.jar
url = uri("https://github.com/")
patternLayout { artifact("/[organisation]/[module]/releases/download/[revision]/[classifier].[ext]") }
// ervinnnc:VoxelSniper:v6.1.2:VoxelSniper-6.1.2@jar
metadataSources { artifact() }
}
// Only use the GitHub Releases Ivy repo for VoxelSniper - speeds up dependency resolution
exclusiveContent {
forRepositories(githubReleases)
filter { includeGroup("ervinnnc") }
}
}
dependencies {
// java 8 fix src: https://stackoverflow.com/questions/64049153/error-while-launching-a-kotlin-coroutine-on-dispatchers-io
implementation(kotlin("stdlib"))
implementation(kotlin("stdlib-jdk8"))
implementation(kotlin("reflect"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.4.2")
implementation("org.jetbrains.exposed:exposed-core:0.29.1")
implementation("org.jetbrains.exposed:exposed-dao:0.29.1")
implementation("org.jetbrains.exposed:exposed-jdbc:0.29.1")
implementation("org.postgresql:postgresql:42.2.16")
compileOnly(vaultAll())
compileOnly(paper("1.16.5"))
compileOnly("me.clip:placeholderapi:2.10.9")
// VoxelSniper Jar (via GitHub releases)
compileOnly("ervinnnc:VoxelSniper:v6.1.2:VoxelSniper-6.1.2@jar")
// FastBoard scoreboard API
implementation("fr.mrmicky:fastboard:1.2.0-SNAPSHOT")
implementation("com.dumbdogdiner:stickyapi-bukkit:3.0.2")
implementation("com.dumbdogdiner:stickyapi-common:3.0.2")
compileOnly("com.sk89q.worldedit:worldedit-bukkit:7.2.2")
compileOnly("dev.jorel:commandapi-annotations:5.10")
kapt("dev.jorel:commandapi-annotations:5.10")
implementation("dev.jorel:commandapi-shade:5.10")
}
tasks {
ktlintKotlinScriptCheck {
dependsOn("ktlintFormat")
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
build {
dependsOn("shadowJar")
}
shadowJar {
archiveClassifier.set("")
relocate("fr.mrmicky.fastboard", "com.dumbdogdiner.stickysurvival.libs.fastboard")
}
spigot {
authors = listOf("spazzylemons")
softDepends = listOf("AnimatedScoreboard", "PlaceholderAPI", "Vault", "VoxelSniper")
depends = listOf("WorldEdit")
// Construct a new version string including git info
version = "${project.version}_${versioning.info.display}"
apiVersion = "1.16"
permissions {
create("stickysurvival.join") {
description = "Allows a user to join and spectate games."
defaults = "true"
}
create("stickysurvival.leave") {
description = "Allows a user to leave games. Does not prevent leaving games by disconnecting."
defaults = "true"
}
create("stickysurvival.reload") {
description = "Allows a user to reload the plugin."
defaults = "op"
}
create("stickysurvival.forcestart") {
description = "Allows a player to force a game to start if there are not enough players."
defaults = "op"
}
create("stickysurvival.version") {
description = "Allows a player to check the plugin version."
defaults = "op"
}
create("stickysurvival.setup") {
description = "Allows a player to use world setup commands."
defaults = "op"
}
}
}
eclipse {
classpath {
containers = mutableSetOf("org.eclipse.buildship.core.gradleclasspathcontainer")
}
}
}