-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
59 lines (50 loc) · 1.55 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id("io.github.goooler.shadow") version "8.1.8"
id("java")
id("java-library")
}
group = "github.xCykrix"
version = "1.2.1"
repositories {
mavenCentral()
// Core Repositories
maven {
url = uri("https://jitpack.io/")
}
maven {
url = uri("https://oss.sonatype.org/content/groups/public/")
}
// Spigot Repository
maven {
url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
}
// Upstream GitHub Packages
maven {
url = uri("https://maven.pkg.github.com/xCykrix/SpigotDevkit")
credentials {
username = project.findProperty("GITHUB_ACTOR").toString() ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("GITHUB_TOKEN").toString() ?: System.getenv("GITHUB_TOKEN")
}
}
}
dependencies {
compileOnly("org.spigotmc:spigot-api:1.21.3-R0.1-SNAPSHOT")
implementation("github.xCykrix:spigotdevkit:1.0.6") {
isTransitive = false
}
}
// Shadow Task
tasks.named<ShadowJar>("shadowJar") {
archiveClassifier = null;
}
// Target Java Build (Java 16 - Minecraft 1.17.x)
val targetJavaVersion = 16
java {
val javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
}