Skip to content

Commit 551a0e7

Browse files
committed
Enhance Gradle build configuration with Javadoc and publishing setup for Minestom integration
1 parent 05b20d5 commit 551a0e7

3 files changed

Lines changed: 272 additions & 1 deletion

File tree

minestom/app/build.gradle

Lines changed: 91 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,94 @@ dependencies {
4343
blossom {
4444
replaceTokenIn('src/main/java/me/lucko/luckperms/minestom/app/LuckPermsApplication.java')
4545
replaceToken '@version@', project.ext.fullVersion
46-
}
46+
}
47+
48+
// Only used occasionally for deployment - not needed for normal builds.
49+
javadoc {
50+
title = 'LuckPerms Minestom App (v' + project.ext.apiVersion + ')'
51+
options.overview = 'javadoc/overview.html'
52+
options.encoding = 'UTF-8'
53+
options.charSet = 'UTF-8'
54+
options.links(
55+
'https://checkerframework.org/api/',
56+
'https://javadoc.io/static/org.jetbrains/annotations/26.0.2/'
57+
)
58+
options.addStringOption('Xdoclint:none', '-quiet')
59+
options.addStringOption('-since', '5.0,5.1,5.2,5.3,5.4,5.5')
60+
61+
if (JavaVersion.current() > JavaVersion.VERSION_1_8) {
62+
options.links.add('https://docs.oracle.com/en/java/javase/21/docs/api/')
63+
} else {
64+
options.links.add('https://docs.oracle.com/javase/8/docs/api/')
65+
}
66+
}
67+
68+
java {
69+
withJavadocJar()
70+
withSourcesJar()
71+
}
72+
73+
publishing {
74+
repositories {
75+
maven {
76+
name = 'OneLiteFeatherRepository'
77+
78+
def releasesRepoUrl = uri('https://repo.onelitefeather.dev/onelitefeather-releases')
79+
def snapshotsRepoUrl = uri('https://repo.onelitefeather.dev/onelitefeather-snapshots')
80+
81+
url = (version.toString().contains('BETA')
82+
|| version.toString().contains('ALPHA')
83+
|| version.toString().contains('SNAPSHOT')) ? snapshotsRepoUrl : releasesRepoUrl
84+
85+
credentials(PasswordCredentials) {
86+
username = System.getenv('ONELITEFEATHER_MAVEN_USERNAME')
87+
password = System.getenv('ONELITEFEATHER_MAVEN_PASSWORD')
88+
}
89+
90+
authentication {
91+
basic(BasicAuthentication)
92+
}
93+
}
94+
}
95+
96+
publications {
97+
mavenJava(MavenPublication) {
98+
artifactId = 'minestom-app'
99+
100+
from components.java
101+
102+
pom {
103+
name = 'LuckPerms Minestom App'
104+
description = 'A permissions manager for Minecraft servers.'
105+
url = 'https://luckperms.net'
106+
107+
licenses {
108+
license {
109+
name = 'MIT'
110+
url = 'https://opensource.org/licenses/MIT'
111+
}
112+
}
113+
114+
developers {
115+
developer {
116+
id = 'lucko'
117+
name = 'Luck'
118+
url = 'https://lucko.me'
119+
email = 'git@lucko.me'
120+
}
121+
}
122+
123+
scm {
124+
connection = 'scm:git:https://github.com/OneLiteFeatherNET/LuckPerms.git'
125+
developerConnection = 'scm:git:git@github.com:OneLiteFeatherNET/LuckPerms.git'
126+
url = 'https://github.com/OneLiteFeatherNET/LuckPerms'
127+
}
128+
129+
issueManagement {
130+
system = 'GitHub'
131+
url = 'https://github.com/OneLiteFeatherNET/LuckPerms/issues'
132+
}
133+
}
134+
}
135+
}
136+
}

minestom/build.gradle

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

minestom/loader/build.gradle

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,94 @@ shadowJar {
3636
artifacts {
3737
archives shadowJar
3838
}
39+
40+
// Only used occasionally for deployment - not needed for normal builds.
41+
javadoc {
42+
title = 'LuckPerms Minestom Loader (v' + project.ext.apiVersion + ')'
43+
options.overview = 'javadoc/overview.html'
44+
options.encoding = 'UTF-8'
45+
options.charSet = 'UTF-8'
46+
options.links(
47+
'https://checkerframework.org/api/',
48+
'https://javadoc.io/static/org.jetbrains/annotations/26.0.2/'
49+
)
50+
options.addStringOption('Xdoclint:none', '-quiet')
51+
options.addStringOption('-since', '5.0,5.1,5.2,5.3,5.4,5.5')
52+
53+
if (JavaVersion.current() > JavaVersion.VERSION_1_8) {
54+
options.links.add('https://docs.oracle.com/en/java/javase/21/docs/api/')
55+
} else {
56+
options.links.add('https://docs.oracle.com/javase/8/docs/api/')
57+
}
58+
}
59+
60+
java {
61+
withJavadocJar()
62+
withSourcesJar()
63+
}
64+
65+
publishing {
66+
repositories {
67+
maven {
68+
name = 'OneLiteFeatherRepository'
69+
70+
def releasesRepoUrl = uri('https://repo.onelitefeather.dev/onelitefeather-releases')
71+
def snapshotsRepoUrl = uri('https://repo.onelitefeather.dev/onelitefeather-snapshots')
72+
73+
url = (version.toString().contains('BETA')
74+
|| version.toString().contains('ALPHA')
75+
|| version.toString().contains('SNAPSHOT')) ? snapshotsRepoUrl : releasesRepoUrl
76+
77+
credentials(PasswordCredentials) {
78+
username = System.getenv('ONELITEFEATHER_MAVEN_USERNAME')
79+
password = System.getenv('ONELITEFEATHER_MAVEN_PASSWORD')
80+
}
81+
82+
authentication {
83+
basic(BasicAuthentication)
84+
}
85+
}
86+
}
87+
88+
publications {
89+
mavenJava(MavenPublication) {
90+
artifactId = 'minestom-loader'
91+
92+
from components.java
93+
94+
pom {
95+
name = 'LuckPerms Minestom Loader'
96+
description = 'A permissions manager for Minecraft servers.'
97+
url = 'https://luckperms.net'
98+
99+
licenses {
100+
license {
101+
name = 'MIT'
102+
url = 'https://opensource.org/licenses/MIT'
103+
}
104+
}
105+
106+
developers {
107+
developer {
108+
id = 'lucko'
109+
name = 'Luck'
110+
url = 'https://lucko.me'
111+
email = 'git@lucko.me'
112+
}
113+
}
114+
115+
scm {
116+
connection = 'scm:git:https://github.com/OneLiteFeatherNET/LuckPerms.git'
117+
developerConnection = 'scm:git:git@github.com:OneLiteFeatherNET/LuckPerms.git'
118+
url = 'https://github.com/OneLiteFeatherNET/LuckPerms'
119+
}
120+
121+
issueManagement {
122+
system = 'GitHub'
123+
url = 'https://github.com/OneLiteFeatherNET/LuckPerms/issues'
124+
}
125+
}
126+
}
127+
}
128+
}
129+

0 commit comments

Comments
 (0)