Skip to content

Commit 1e52381

Browse files
committed
Add Javadoc configuration and publishing setup for LuckPerms Loader Utils
1 parent 8b3738b commit 1e52381

2 files changed

Lines changed: 183 additions & 0 deletions

File tree

common/build.gradle

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,95 @@ dependencies {
105105
compileOnly 'org.yaml:snakeyaml:1.33'
106106
compileOnly 'net.luckperms:rest-api-java-client:0.1'
107107
}
108+
109+
110+
// Only used occasionally for deployment - not needed for normal builds.
111+
javadoc {
112+
title = 'LuckPerms Minestom Loader (v' + project.ext.apiVersion + ')'
113+
options.overview = 'javadoc/overview.html'
114+
options.encoding = 'UTF-8'
115+
options.charSet = 'UTF-8'
116+
options.links(
117+
'https://checkerframework.org/api/',
118+
'https://www.javadocs.dev/org.jetbrains/annotations/26.0.2/'
119+
)
120+
options.addStringOption('Xdoclint:none', '-quiet')
121+
options.addStringOption('-since', '5.0,5.1,5.2,5.3,5.4,5.5')
122+
123+
if (JavaVersion.current() > JavaVersion.VERSION_1_8) {
124+
options.links.add('https://docs.oracle.com/en/java/javase/21/docs/api/')
125+
} else {
126+
options.links.add('https://docs.oracle.com/javase/8/docs/api/')
127+
}
128+
}
129+
130+
java {
131+
withJavadocJar()
132+
withSourcesJar()
133+
}
134+
135+
publishing {
136+
repositories {
137+
maven {
138+
name = 'OneLiteFeatherRepository'
139+
140+
def releasesRepoUrl = uri('https://repo.onelitefeather.dev/onelitefeather-releases')
141+
def snapshotsRepoUrl = uri('https://repo.onelitefeather.dev/onelitefeather-snapshots')
142+
143+
url = (version.toString().contains('BETA')
144+
|| version.toString().contains('ALPHA')
145+
|| version.toString().contains('SNAPSHOT')) ? snapshotsRepoUrl : releasesRepoUrl
146+
147+
credentials(PasswordCredentials) {
148+
username = System.getenv('ONELITEFEATHER_MAVEN_USERNAME')
149+
password = System.getenv('ONELITEFEATHER_MAVEN_PASSWORD')
150+
}
151+
152+
authentication {
153+
basic(BasicAuthentication)
154+
}
155+
}
156+
}
157+
158+
publications {
159+
mavenJava(MavenPublication) {
160+
artifactId = 'common'
161+
162+
from components.java
163+
164+
pom {
165+
name = 'LuckPerms Common'
166+
description = 'A permissions manager for Minecraft servers.'
167+
url = 'https://luckperms.net'
168+
169+
licenses {
170+
license {
171+
name = 'MIT'
172+
url = 'https://opensource.org/licenses/MIT'
173+
}
174+
}
175+
176+
developers {
177+
developer {
178+
id = 'lucko'
179+
name = 'Luck'
180+
url = 'https://lucko.me'
181+
email = 'git@lucko.me'
182+
}
183+
}
184+
185+
scm {
186+
connection = 'scm:git:https://github.com/OneLiteFeatherNET/LuckPerms.git'
187+
developerConnection = 'scm:git:git@github.com:OneLiteFeatherNET/LuckPerms.git'
188+
url = 'https://github.com/OneLiteFeatherNET/LuckPerms'
189+
}
190+
191+
issueManagement {
192+
system = 'GitHub'
193+
url = 'https://github.com/OneLiteFeatherNET/LuckPerms/issues'
194+
}
195+
}
196+
}
197+
}
198+
}
199+

common/loader-utils/build.gradle

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,92 @@
11
// nothing special to do here (yet)!
2+
3+
// Only used occasionally for deployment - not needed for normal builds.
4+
javadoc {
5+
title = 'LuckPerms Minestom Loader (v' + project.ext.apiVersion + ')'
6+
options.overview = 'javadoc/overview.html'
7+
options.encoding = 'UTF-8'
8+
options.charSet = 'UTF-8'
9+
options.links(
10+
'https://checkerframework.org/api/',
11+
'https://www.javadocs.dev/org.jetbrains/annotations/26.0.2/'
12+
)
13+
options.addStringOption('Xdoclint:none', '-quiet')
14+
options.addStringOption('-since', '5.0,5.1,5.2,5.3,5.4,5.5')
15+
16+
if (JavaVersion.current() > JavaVersion.VERSION_1_8) {
17+
options.links.add('https://docs.oracle.com/en/java/javase/21/docs/api/')
18+
} else {
19+
options.links.add('https://docs.oracle.com/javase/8/docs/api/')
20+
}
21+
}
22+
23+
java {
24+
withJavadocJar()
25+
withSourcesJar()
26+
}
27+
28+
publishing {
29+
repositories {
30+
maven {
31+
name = 'OneLiteFeatherRepository'
32+
33+
def releasesRepoUrl = uri('https://repo.onelitefeather.dev/onelitefeather-releases')
34+
def snapshotsRepoUrl = uri('https://repo.onelitefeather.dev/onelitefeather-snapshots')
35+
36+
url = (version.toString().contains('BETA')
37+
|| version.toString().contains('ALPHA')
38+
|| version.toString().contains('SNAPSHOT')) ? snapshotsRepoUrl : releasesRepoUrl
39+
40+
credentials(PasswordCredentials) {
41+
username = System.getenv('ONELITEFEATHER_MAVEN_USERNAME')
42+
password = System.getenv('ONELITEFEATHER_MAVEN_PASSWORD')
43+
}
44+
45+
authentication {
46+
basic(BasicAuthentication)
47+
}
48+
}
49+
}
50+
51+
publications {
52+
mavenJava(MavenPublication) {
53+
artifactId = 'loader-utils'
54+
55+
from components.java
56+
57+
pom {
58+
name = 'LuckPerms Loader Utils'
59+
description = 'A permissions manager for Minecraft servers.'
60+
url = 'https://luckperms.net'
61+
62+
licenses {
63+
license {
64+
name = 'MIT'
65+
url = 'https://opensource.org/licenses/MIT'
66+
}
67+
}
68+
69+
developers {
70+
developer {
71+
id = 'lucko'
72+
name = 'Luck'
73+
url = 'https://lucko.me'
74+
email = 'git@lucko.me'
75+
}
76+
}
77+
78+
scm {
79+
connection = 'scm:git:https://github.com/OneLiteFeatherNET/LuckPerms.git'
80+
developerConnection = 'scm:git:git@github.com:OneLiteFeatherNET/LuckPerms.git'
81+
url = 'https://github.com/OneLiteFeatherNET/LuckPerms'
82+
}
83+
84+
issueManagement {
85+
system = 'GitHub'
86+
url = 'https://github.com/OneLiteFeatherNET/LuckPerms/issues'
87+
}
88+
}
89+
}
90+
}
91+
}
92+

0 commit comments

Comments
 (0)