-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
111 lines (95 loc) · 3.11 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
import io.papermc.paperweight.util.constants.PAPERCLIP_CONFIG
plugins {
java
`maven-publish`
id("io.papermc.paperweight.patcher") version "1.7.3"
}
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/") {
content { onlyForConfigurations(PAPERCLIP_CONFIG) }
}
}
dependencies {
remapper("net.fabricmc:tiny-remapper:0.10.3:fat")
decompiler("org.vineflower:vineflower:1.10.1")
paperclip("io.papermc:paperclip:3.0.3")
}
subprojects {
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://jitpack.io")
}
}
paperweight {
serverProject.set(project(":pluto-server"))
remapRepo.set("https://repo.papermc.io/repository/maven-public/")
decompileRepo.set("https://repo.papermc.io/repository/maven-public/")
useStandardUpstream("pufferfish") {
url.set(github("pufferfish-gg", "Pufferfish"))
ref.set(providers.gradleProperty("pufferfishRef"))
withStandardPatcher {
apiSourceDirPath.set("pufferfish-api")
serverSourceDirPath.set("pufferfish-server")
apiOutputDir.set(layout.projectDirectory.dir("pluto-api"))
serverOutputDir.set(layout.projectDirectory.dir("pluto-server"))
}
patchTasks {
register("PaperApiGenerator") {
isBareDirectory.set(true)
upstreamDirPath.set("paper-api-generator/generated")
patchDir.set(layout.projectDirectory.dir("patches/paper-api-generator"))
outputDir.set(layout.projectDirectory.dir("paper-api-generator/generated"))
}
}
}
}
allprojects {
apply(plugin = "java")
apply(plugin = "maven-publish")
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
tasks.withType<JavaCompile>().configureEach {
options.encoding = Charsets.UTF_8.name()
options.release.set(21)
}
tasks.withType<Javadoc> {
options.encoding = Charsets.UTF_8.name()
}
tasks.withType<ProcessResources> {
filteringCharset = Charsets.UTF_8.name()
}
publishing {
repositories {
maven {
name = "yiveRepo"
url = uri("https://repo.yive.dev/snapshots")
credentials {
username = (System.getenv("YIVE_REPO_USERNAME") ?: project.property("yiveRepoUsername")).toString()
password = (System.getenv("YIVE_REPO_PASSWORD") ?: project.property("yiveRepoPassword")).toString()
}
}
}
}
}
tasks.generateDevelopmentBundle {
apiCoordinates.set("dev.yive.pluto:pluto-api")
libraryRepositories.set(
listOf(
"https://repo.maven.apache.org/maven2/",
"https://repo.papermc.io/repository/maven-public/",
"https://repo.yive.dev/snapshots",
)
)
}
publishing {
publications.create<MavenPublication>("devBundle") {
artifact(tasks.generateDevelopmentBundle) {
artifactId = "dev-bundle"
}
}
}