Skip to content

Commit 63ecdf9

Browse files
committed
Add sources & JavaDoc jars to Maven
1 parent 7a55a62 commit 63ecdf9

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

build.gradle.kts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ allprojects{
6363
}
6464
}
6565

66+
java{
67+
withSourcesJar()
68+
withJavadocJar()
69+
}
70+
6671
dependencies{
6772
// Downgrade Java 9+ syntax into being available in Java 8.
6873
annotationProcessor(entity(":downgrader"))
@@ -93,6 +98,10 @@ allprojects{
9398
}
9499
}
95100

101+
tasks.javadoc{
102+
source = files("src/pyguy/jsonlib/JsonLibWrapper.java").asFileTree
103+
}
104+
96105
fun commonPom(pom: MavenPom){
97106
pom.apply{
98107
url = "https://github.com/ThePythonGuy3/CustomJSONLibMaven"
@@ -160,7 +169,7 @@ project(":"){
160169
archiveFileName = "$modArtifact.jar"
161170

162171
from(
163-
files(sourceSets["main"].output.classesDirs)
172+
files("src/pyguy/jsonlib/JsonLibWrapper.java").asFileTree
164173
)
165174

166175
metaInf.from(layout.projectDirectory.file("LICENSE"))
@@ -231,6 +240,9 @@ project(":"){
231240
{
232241
artifact(tasks["lib"])
233242

243+
artifact(tasks["sourcesJar"])
244+
artifact(tasks["javadocJar"])
245+
234246
groupId = "com.github.ThePythonGuy3.CustomJSONLib"
235247
artifactId = "pyguy.jsonlib"
236248

src/pyguy/jsonlib/JsonLibWrapper.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
import arc.util.serialization.JsonValue;
44

55
/**
6-
* The public API to interface with the {@link JsonLib} library.
7-
* <p/>
6+
* The public API to interface with the {@link pyguy.jsonlib.JsonLib} library.
7+
* <p>
88
* All the methods in this class MUST be called within your mod's {@code init()} method or after.
99
* Failing to do so will result in unexpected behavior.
1010
*/
1111
public class JsonLibWrapper
1212
{
13+
private JsonLibWrapper(){}
14+
1315
/**
1416
* Get a {@link String} field from a custom JSON definition.
1517
*
@@ -87,8 +89,8 @@ public static Boolean GetBooleanField(String internalContentName, String fieldNa
8789
}
8890

8991
/**
90-
* Get a raw {@link JsonValue} field from a custom JSON definition.
91-
* <p/>
92+
* Get a raw {@link arc.util.serialization.JsonValue} field from a custom JSON definition.
93+
* <p>
9294
* This must be used to get fields that are objects or arrays.
9395
*
9496
* @param internalContentName The internal name of the piece of content that implements the custom JSON definition.

0 commit comments

Comments
 (0)