-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
69 lines (60 loc) · 2 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
plugins {
id 'java'
id("io.papermc.paperweight.userdev") version "1.5.5"
id("xyz.jpenilla.run-paper") version "2.1.0"
// Adds runServer and runMojangMappedServer tasks for testing
}
group = 'dev.the456gamer'
version = '1.0.1'
description = "Only allow certain Shulker boxes to be used as backpacks."
repositories {
mavenCentral()
maven {
name = "papermc-repo"
url = "https://repo.papermc.io/repository/maven-public/"
}
}
dependencies {
compileOnly(files("libs/CMI-9.6.0.9.jar", "libs/CMILib1.3.1.1.jar"))
paperweight.paperDevBundle("1.20.1-R0.1-SNAPSHOT")
}
def targetJavaVersion = 17
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion.set(JavaLanguageVersion.of(targetJavaVersion))
}
}
tasks.withType(JavaCompile).configureEach {
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release.set(targetJavaVersion)
}
}
tasks {
// Configure reobfJar to run when invoking the build task
assemble {
dependsOn(reobfJar)
}
compileJava {
options.encoding = 'UTF-8' // We want UTF-8 for everything
// Set the release flag. This configures what version bytecode the compiler will emit, as well as what JDK APIs are usable.
// See https://openjdk.java.net/jeps/247 for more information.
options.release.set(17)
}
javadoc {
options.encoding = 'UTF-8' // We want UTF-8 for everything
}
processResources {
filteringCharset = 'UTF-8' // We want UTF-8 for everything
def props = ["name" : project.name,
"version" : project.version,
"description": project.description,
"apiVersion" : "1.20"]
inputs.properties(props)
filesMatching("*plugin.yml") {
expand(props)
}
}
}