-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle.kts
90 lines (74 loc) · 2.31 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
/*
* This file was generated by the Gradle 'init' task.
*/
@file:Suppress("SpellCheckingInspection")
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
plugins {
java
`maven-publish`
id("com.github.johnrengelman.shadow") version "7.1.2"
id("xyz.jpenilla.run-paper") version "1.0.6"
}
repositories {
// Required for IntellIJ
mavenLocal() {
content {
includeGroup("org.bukkit")
}
}
maven(url = uri("https://papermc.io/repo/repository/maven-public/"))
maven {
url = uri("https://jitpack.io")
}
maven {
url = uri("https://repo.codemc.org/repository/maven-public")
}
maven {
url = uri("https://repo.extendedclip.com/content/repositories/placeholderapi/")
content {
includeGroup("me.clip")
}
}
mavenCentral()
}
dependencies {
implementation("org.json", "json", "20190722")
implementation("org.bstats", "bstats-bukkit", "2.2.1")
implementation("com.github.stefvanschie.inventoryframework", "IF", "0.10.3")
implementation("io.papermc", "paperlib", "1.0.7")
compileOnly("com.github.MilkBowl", "VaultAPI", "1.7")
compileOnly("me.clip", "placeholderapi", "2.10.8")
compileOnly("org.jetbrains", "annotations", "22.0.0")
compileOnly("io.papermc.paper", "paper-api", "1.18.1-R0.1-SNAPSHOT")
}
// Set the default value to the current time as an ISO-8601 string
var time = LocalDateTime.now().format(DateTimeFormatter.ISO_LOCAL_DATE_TIME).replace(":", ".")
var buildNumber: String = System.getenv().getOrDefault("BUILD_NUMBER", time)
group = "pw.chew.transmuteit"
version = "0.5.0-b${buildNumber}"
description = "TransmuteIt"
java {
withSourcesJar()
withJavadocJar()
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}
tasks.withType<JavaCompile>() {
options.encoding = "UTF-8"
}
tasks.shadowJar {
relocate("com.github.stefvanschie.inventoryframework", "pw.chew.transmuteit.inventoryframework")
relocate("org.bstats", "pw.chew.transmuteit.bstats")
relocate("io.papermc.lib", "pw.chew.transmuteit.paperlib")
minimize()
archiveAppendix.set("")
archiveClassifier.set("")
}
tasks.runServer {
minecraftVersion("1.18.1")
}