-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
139 lines (121 loc) · 4.53 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
132
133
134
135
136
137
138
139
plugins {
`java-library`
`maven-publish`
}
repositories {
mavenLocal()
maven("https://erethon.de/repo")
maven("https://reposilite.fyreum.de/snapshots/")
maven("https://jitpack.io")
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
maven("https://repo.dmulloy2.net/repository/public/")
maven("https://papermc.io/repo/repository/maven-public/")
mavenCentral()
}
allprojects {
group = "de.erethon.questsxl"
version = "1.0.0-SNAPSHOT"
repositories {
mavenLocal()
maven("https://erethon.de/repo")
maven("https://reposilite.fyreum.de/snapshots/")
maven("https://jitpack.io")
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
maven("https://repo.dmulloy2.net/repository/public/")
maven("https://papermc.io/repo/repository/maven-public/")
mavenCentral()
}
apply(plugin = "java-library")
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
withSourcesJar()
}
tasks.withType<JavaCompile> {
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()
}
}
val papyrusVersion = "1.21.1-R0.1-SNAPSHOT"
dependencies {
annotationProcessor("io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT")
annotationProcessor("de.erethon:bedrock:1.4.0") { isTransitive = false }
annotationProcessor("de.erethon.aether:Aether:1.0.0-SNAPSHOT")
annotationProcessor("de.erethon.aergia:Aergia:1.0.0-SNAPSHOT") { isTransitive = false }
annotationProcessor("de.fyreum:JobsXL:1.0-SNAPSHOT") { isTransitive = false }
annotationProcessor("de.erethon.hephaestus:Hephaestus:1.0-SNAPSHOT")
annotationProcessor("org.eclipse.jgit:org.eclipse.jgit:6.4.0.202211300538-r")
annotationProcessor("com.fastasyncworldedit:FastAsyncWorldEdit-Core:2.3.0") { isTransitive = false }
annotationProcessor("com.fastasyncworldedit:FastAsyncWorldEdit-Bukkit:2.3.0") { isTransitive = false }
annotationProcessor("com.github.MilkBowl:VaultAPI:1.7") { isTransitive = false }
}
tasks.register<JavaCompile>("runAnnotationProcessor") {
dependsOn(":doc-gen:classes", ":plugin:classes")
source = fileTree("plugin/src/main/java")
classpath = files(
sourceSets["main"].runtimeClasspath,
project(":doc-gen").sourceSets["main"].output,
project(":plugin").sourceSets["main"].output,
configurations.runtimeClasspath,
project(":plugin").configurations["compileClasspath"],
project(":plugin").configurations["runtimeClasspath"]
)
destinationDirectory.set(file("plugin/build/classes/java/main"))
options.annotationProcessorPath = files(
project(":doc-gen").sourceSets["main"].output,
configurations["annotationProcessor"],
project(":plugin").sourceSets["main"].output
)
options.compilerArgs.add("-processor")
options.compilerArgs.add("de.erethon.questsxl.QDocGenerator")
options.compilerArgs.add("-AdocOutputDir=${project.rootDir}/docs")
options.encoding = "UTF-8"
options.release.set(21)
}
tasks.register<Javadoc>("generatePluginJavadocs") {
source = fileTree("plugin/src/main/java")
classpath = files(
project(":plugin").sourceSets["main"].runtimeClasspath,
project(":plugin").sourceSets["main"].output,
project(":plugin").configurations["compileClasspath"]
)
setDestinationDir(file("plugin/build/docs/javadoc"))
options.encoding = "UTF-8"
}
tasks.register<Jar>("javadocJar") {
dependsOn("generatePluginJavadocs")
archiveClassifier.set("javadoc")
from(tasks.named<Javadoc>("generatePluginJavadocs").get().destinationDir)
}
subprojects {
apply(plugin = "java-library")
tasks.withType<JavaCompile> {
options.annotationProcessorPath = configurations["annotationProcessor"]
}
}
publishing {
repositories {
maven {
name = "erethon"
url = uri("https://reposilite.fyreum.de/snapshots/")
credentials(PasswordCredentials::class)
authentication {
create<BasicAuthentication>("basic")
}
}
}
publications {
create<MavenPublication>("maven") {
groupId = "${project.group}"
artifactId = "QuestsXL"
version = "${project.version}"
from(components["java"])
artifact(tasks["javadocJar"])
}
}
}