-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
54 lines (44 loc) · 1.4 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
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id("com.github.johnrengelman.shadow") version "6.0.0"
kotlin("jvm") version "1.3.72"
}
group = "org.wlosp"
version = "1.0-SNAPSHOT"
/**
* Location of developers plugins directory.
*/
val spigotPluginsDir: String? by project
repositories {
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots")
maven("https://dl.bintray.com/johnnyjayjay/spiglin")
maven("https://repo.byteflux.net/repository/maven-releases/")
mavenCentral()
}
dependencies {
compileOnly("org.spigotmc", "spigot-api", "1.16.1-R0.1-SNAPSHOT")
compileOnly("com.github.johnnyjayjay", "spiglin", "2.0.3")
implementation("net.byteflux", "libby-bukkit", "0.0.1")
compileOnly("org.jetbrains.kotlinx", "kotlinx-coroutines-jdk8", "1.3.4")
implementation(kotlin("stdlib-jdk8"))
}
tasks {
processResources {
from(sourceSets["main"].resources) {
val tokens = mapOf("version" to version)
filter(ReplaceTokens::class, mapOf("tokens" to tokens))
}
}
task<Copy>("installPlugin") {
dependsOn(shadowJar)
from(shadowJar)
include("*-all.jar")
into(spigotPluginsDir ?: error("Please set spigotPluginsDir in gradle.properties"))
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
}