-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
67 lines (58 loc) · 1.69 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
group = "com.ddang_"
version = "1.0-SNAPSHOT"
plugins {
id("idea")
kotlin("jvm") version "1.5.20"
id("com.github.johnrengelman.shadow") version "7.0.0"
}
dependencies {
implementation ("org.jetbrains.kotlin:kotlin-stdlib")
compileOnly(files("C:/Users/psych/Desktop/minecraft 2022/servers/1.5.2 craftbukkit/sv.jar"))
}
fun TaskContainer.createJar(name: String, configuration: ShadowJar.() -> Unit) {
create<ShadowJar>(name) {
archiveBaseName.set(project.name)
archiveVersion.set("") // For bukkit plugin update
from(sourceSets["main"].output)
configurations = listOf(project.configurations.shadow.get().apply { isCanBeResolved = true })
configuration()
}
}
tasks {
processResources {
filesMatching("plugin.yml") {
expand("project_version" to project.version)
}
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
createJar("outJar") {
val dest = File("C:/Users/psych/Desktop/minecraft 2022/servers/1.5.2 craftbukkit/plugins")
doLast {
copy {
from(archiveFile)
into(dest)
}
}
}
}
repositories {
mavenCentral()
mavenLocal()
maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
}
maven {
name = "sonatype"
url = uri("https://oss.sonatype.org/content/groups/public/")
}
maven {
url = uri("https://repo.codemc.org/repository/maven-public/")
}
maven { url = uri("https://jitpack.io") }
}