This repository has been archived by the owner on Oct 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
131 lines (114 loc) · 3.59 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/*
* This file was generated by the Gradle 'init' task.
*/
plugins {
`java-library`
`maven-publish`
id ("com.github.johnrengelman.shadow") version "8.1.1"
id("io.freefair.lombok") version "8.0.1"
id("io.papermc.paperweight.userdev") version "1.5.5"
}
java {
// Configure the java toolchain. This allows gradle to auto-provision JDK 17 on systems that only have JDK 8 installed for example.
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
repositories {
maven {
url = uri("https://repo.papermc.io/repository/maven-public/")
}
maven {
url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
}
maven {
name = "trustgamesRepoPrivate"
url = uri("http://81.201.49.240:8080/private")
isAllowInsecureProtocol = true
credentials(PasswordCredentials::class)
authentication {
create<BasicAuthentication>("basic")
}
}
maven {
url = uri("https://oss.sonatype.org/content/groups/public/")
}
maven {
url = uri("https://libraries.minecraft.net/")
}
maven {
url = uri("https://repo.dmulloy2.net/repository/public/")
}
maven {
url = uri("https://jitpack.io")
}
maven {
url = uri("https://repo.maven.apache.org/maven2/")
}
mavenLocal()
}
dependencies {
paperweight.paperDevBundle("1.19.4-R0.1-SNAPSHOT")
api("net.trustgames:toolkit:0.1-SNAPSHOT")
api("cloud.commandframework:cloud-paper:1.8.3")
api("cloud.commandframework:cloud-minecraft-extras:1.8.3")
compileOnly("io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT")
compileOnly("net.luckperms:api:5.4")
compileOnly("com.comphenix.protocol:ProtocolLib:5.0.0")
compileOnly("io.github.miniplaceholders:miniplaceholders-api:2.1.0")
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS)
}
group = "net.trustgames"
version = "0.2-SNAPSHOT"
description = "Core"
java.sourceCompatibility = JavaVersion.VERSION_17
publishing {
repositories {
maven {
name = "trustgamesRepoPrivate"
url = uri("http://81.201.49.240:8080/private")
isAllowInsecureProtocol = true
credentials(PasswordCredentials::class)
authentication {
create<BasicAuthentication>("basic")
}
}
}
publications {
create<MavenPublication>("maven") {
groupId = group.toString()
artifactId = rootProject.name
version = version
from(components["java"])
}
}
}
tasks {
// Configure reobfJar to run when invoking the build task
assemble {
dependsOn(shadowJar)
dependsOn(reobfJar)
}
compileJava {
options.encoding = Charsets.UTF_8.name() // 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 = Charsets.UTF_8.name() // We want UTF-8 for everything
}
processResources {
filteringCharset = Charsets.UTF_8.name() // We want UTF-8 for everything
val props = mapOf(
"name" to project.name,
"version" to project.version,
"description" to project.description,
"apiVersion" to "1.19"
)
inputs.properties(props)
filesMatching("plugin.yml") {
expand(props)
}
}
}