This repository has been archived by the owner on Jan 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
77 lines (67 loc) · 1.8 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
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription.PluginLoadOrder.POSTWORLD
plugins {
kotlin("jvm") version "1.3.72"
id("net.minecrell.plugin-yml.bukkit") version "0.3.0"
`maven-publish`
}
group = "me.syari.ss.item"
version = "1.0"
val ssMavenRepoURL: String by extra
val ssMavenRepoUploadURL: String by extra
val ssMavenRepoUploadUser: String by extra
val ssMavenRepoUploadPassword: String by extra
repositories {
mavenCentral()
maven {
url = uri("https://papermc.io/repo/repository/maven-public/")
}
maven {
url = uri(ssMavenRepoURL)
}
}
dependencies {
implementation("com.destroystokyo.paper:paper-api:1.16.1-R0.1-SNAPSHOT")
implementation("me.syari.ss.core:SS-Core:3.0")
implementation("me.syari.ss.battle:SS-Battle:1.0")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
}
bukkit {
name = project.name
version = project.version.toString()
main = "$group.Main"
author = "sya_ri"
depend = listOf("SS-Core", "SS-Battle")
apiVersion = "1.16"
load = POSTWORLD
}
tasks {
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
}
val jar by tasks.getting(Jar::class) {
from(configurations.compile.get().map {
if (it.isDirectory) it else zipTree(it)
})
}
val sourceJar by tasks.registering(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets.main.get().allJava.srcDirs)
}
publishing {
repositories {
maven {
url = uri(ssMavenRepoUploadURL)
credentials {
username = ssMavenRepoUploadUser
password = ssMavenRepoUploadPassword
}
}
}
publications {
create<MavenPublication>("maven") {
from(components["java"])
artifact(sourceJar.get())
}
}
}