Skip to content

Commit

Permalink
javadocs preparation
Browse files Browse the repository at this point in the history
  • Loading branch information
WesJD committed Jul 15, 2019
1 parent 60a74d2 commit 5e3ab1f
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 18 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ src/libs
# Javadocs
/javadocs

*/javadocs
*/javadoc-bundle-options
*/google-java-format.xml

dependency-reduced-pom.xml
11 changes: 0 additions & 11 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,6 @@
<build>
<defaultGoal>clean install javadoc:javadoc</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<configuration>
<outputDirectory>${project.basedir}/javadocs</outputDirectory>
<reportOutputDirectory>${project.basedir}/javadocs</reportOutputDirectory>
<destDir>javadocs</destDir>
<failOnError>false</failOnError> <!-- if any fix is possible around @deprecated, please let me know -->
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
Expand Down
14 changes: 7 additions & 7 deletions api/src/main/java/net/wesjd/anvilgui/AnvilGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ public class AnvilGUI {
*/
private final boolean preventClose;
/**
* An {@link Consumer<Player>} that is called when the anvil GUI is closed
* An {@link Consumer} that is called when the anvil GUI is closed
*/
private final Consumer<Player> closeListener;
/**
* An {@link BiFunction<Player, String, Response>} that is called when the {@link Slot#OUTPUT} slot has been clicked
* An {@link BiFunction} that is called when the {@link Slot#OUTPUT} slot has been clicked
*/
private final BiFunction<Player, String, Response> completeFunction;

Expand Down Expand Up @@ -108,7 +108,7 @@ public AnvilGUI(Plugin plugin, Player holder, String insert, BiFunction<Player,
* @param player The {@link Player} to open the inventory for
* @param text What to have the text already set to
* @param preventClose Whether to prevent the inventory from closing
* @param closeListener A {@link Consumer<Player>} when the inventory closes
* @param closeListener A {@link Consumer} when the inventory closes
* @param completeFunction A {@link BiFunction} that is called when the player clicks the {@link Slot#OUTPUT} slot
*/
private AnvilGUI(
Expand Down Expand Up @@ -229,15 +229,15 @@ public void onInventoryClose(InventoryCloseEvent event) {
public static class Builder {

/**
* An {@link Consumer<Player>} that is called when the anvil GUI is closed
* An {@link Consumer} that is called when the anvil GUI is closed
*/
private Consumer<Player> closeListener;
/**
* A state that decides where the anvil GUI is able to be closed by the user
*/
private boolean preventClose = false;
/**
* An {@link BiFunction<Player, String, Response>} that is called when the anvil output slot has been clicked
* An {@link BiFunction} that is called when the anvil output slot has been clicked
*/
private BiFunction<Player, String, Response> completeFunction;
/**
Expand All @@ -260,7 +260,7 @@ public Builder preventClose() {

/**
* Listens for when the inventory is closed
* @param closeListener An {@link Consumer<Player>} that is called when the anvil GUI is closed
* @param closeListener An {@link Consumer} that is called when the anvil GUI is closed
* @return The {@link Builder} instance
* @throws IllegalArgumentException when the closeListener is null
*/
Expand All @@ -272,7 +272,7 @@ public Builder onClose(Consumer<Player> closeListener) {

/**
* Handles the inventory output slot when it is clicked
* @param completeFunction An {@link BiFunction<Player, String, Response>} that is called when the user clicks the output slot
* @param completeFunction An {@link BiFunction} that is called when the user clicks the output slot
* @return The {@link Builder} instance
* @throws IllegalArgumentException when the completeFunction is null
*/
Expand Down
26 changes: 26 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@
</repositories>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<configuration>
<outputDirectory>${project.basedir}/javadocs</outputDirectory>
<reportOutputDirectory>${project.basedir}/javadocs</reportOutputDirectory>
<destDir>${project.basedir}/javadocs</destDir>
<failOnError>false</failOnError> <!-- if any fix is possible around @deprecated, please let me know -->
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -43,6 +58,17 @@
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<configuration>
<outputDirectory>${project.basedir}/javadocs</outputDirectory>
<reportOutputDirectory>${project.basedir}/javadocs</reportOutputDirectory>
<destDir>${project.basedir}/javadocs</destDir>
<failOnError>false</failOnError> <!-- if any fix is possible around @deprecated, please let me know -->
</configuration>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit 5e3ab1f

Please sign in to comment.