Skip to content

Commit

Permalink
Fixed gradle javadoc build, fixed javadocs, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fastily committed Sep 4, 2016
1 parent 869a647 commit dbe67ae
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jwiki is a simple Java client library wrapping the [MediaWiki](https://www.media

###Example Code
```java
import jwiki.core.Wiki;
import fastily.jwiki.core.Wiki;

//Edit a Wikipedia page by replacing its text with text of your choosing.
public class JwikiExample
Expand Down
10 changes: 7 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Apply the java plugin to add support for Java
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
Expand Down Expand Up @@ -32,22 +31,27 @@ task writeNewPom << {
distribution 'repo'
}
}

}
}.writeTo("$buildDir/pom.xml")
}

build.finalizedBy(writeNewPom)


task myJavadocs(type: Javadoc) {
task genJavadoc(type: Javadoc) {
source = sourceSets.main.allJava

options
{
links "https://fastily.github.io/jwiki/docs/JSON-java/"
links "https://docs.oracle.com/javase/8/docs/api/"
//setOutputLevel JavadocOutputLevel.VERBOSE

setMemberLevel JavadocMemberLevel.PUBLIC
setAuthor true
}

classpath = configurations.compile
}

// In this section you declare where to find the dependencies of your project
Expand Down
1 change: 1 addition & 0 deletions src/main/java/fastily/jwiki/core/NS.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ protected static class NSManager

/**
* Constructor, takes a Reply with Namespace data.
* @param r A Reply object with a <code>namespaces</code> JSONObject.
*/
protected NSManager(Reply r)
{
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/fastily/jwiki/core/RSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ protected ArrayList<Reply> getJAofJO(String base)
* Selects, for a given key, a JSONArray of JSONObjects, collects the JSONObjects, and maps each JSONObject based on
* a mapping function.
*
* @param <T1> The type of Object contained in the ArrayList returned.
*
* @param base The key pointing to the JSONArray to select.
* @param mapper The mapping function to apply to each JSONObject found in the JSONArray pointed to by
* <code>base</code>
Expand All @@ -77,6 +79,8 @@ protected <T1> ArrayList<T1> getJAofJOas(String base, Function<? super Reply, ?
* Takes a JSONArray of JSONObjects and maps two values in each JSONObhject to a Map. This is NOT subject to
* auto-normalization.
*
* @param The type of Object associated with each key in the HashMap returned.
*
* @param base The key pointing to the root JSONArray of JSONObjects
* @param keyMapper The key mapping function to apply to each JSONObject to extract a value for the Map
* @param valueMapper The value mapping function to apply to each JSONObject to extract a value for the Map
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/fastily/jwiki/core/URLBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ public final class URLBuilder

/**
* Constructor, takes the domain name we'll be working with.
*
* @param domain The domain name to use, in shorthand (e.g. 'commons.wikimedia.org').
* @param action Sets the action param to use in the final URL. (e.g. query, edit, delete)
* @param pl The parameter list to apply to this URLBuilder. These should NOT be URL-encoded.
*/
protected URLBuilder(String domain, String action, HashMap<String, String> pl)
{
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/fastily/jwiki/core/WAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ private WAction()

/**
* Performs an action on wiki requiring a simple POST request.
*
* @param wiki The wiki object to use
* @param ub The URLBuilder to use
* @param action The type of action to perform
* @param params The parameters to post, in order of <code>[ param1, value1, param2, value2 ] </code>.
* @return A reply from the server or null if something went wrong.
*/
Expand Down

0 comments on commit dbe67ae

Please sign in to comment.