-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
88 lines (54 loc) · 1.66 KB
/
build.gradle
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
plugins {
id 'java' // Tell gradle this is a java project.
id 'com.github.johnrengelman.shadow' version '7.1.2' // Import utility to package libraries into .jar file.
id 'eclipse'
id 'org.jetbrains.kotlin.jvm' version '1.9.0' // Import eclipse plugin for IDE integration.
}
group = 'net.trueog.buffrates-og' // Declare bundle identifier.
version = '2.0'
def apiVersion = "1.19" // Declare minecraft server target version.
def targetJavaVersion = 17 // Declare java compatibility minimum.
processResources {
def props = [
version: version,
apiVersion: apiVersion,
]
inputs.properties props // Indicates to rerun if version changes.
filesMatching("plugin.yml") {
expand props
}
}
repositories {
mavenCentral()
maven {
url "https://repo.purpurmc.org/snapshots" // Get purpur API from purpur maven repository.
}
}
dependencies {
compileOnly "org.purpurmc.purpur:purpur-api:1.19.4-R0.1-SNAPSHOT"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" // Declare purpur API version to be packaged.
}
shadowJar {
minimize()
}
jar.dependsOn shadowJar
tasks.jar.configure {
archiveClassifier = "part"
}
tasks.shadowJar.configure {
archiveClassifier = null
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs += ["-parameters"]
options.encoding = 'UTF-8' // Override the system character set with a universal set.
options.fork = true // Enable compilation in a separate daemon process.
}
kotlin {
jvmToolchain(17)
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
vendor = JvmVendorSpec.GRAAL_VM
}
}