1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 20:47:57 +01:00

Javadoc improvements

This commit is contained in:
Florian Schmaus 2015-03-21 18:56:27 +01:00
parent e1686927a2
commit 7c5428ab0e
6 changed files with 22 additions and 36 deletions

View file

@ -64,6 +64,10 @@ allprojects {
':smack-extensions',
':smack-experimental',
].collect{ project(it) }
androidBootClasspathProjects = [
':smack-android',
':smack-android-extensions',
].collect{ project(it) }
androidBootClasspath = getAndroidRuntimeJar()
androidJavadocOffline = getAndroidJavadocOffline()
junitVersion = '4.11'
@ -114,12 +118,6 @@ allprojects {
options.encoding = "utf8"
}
if (JavaVersion.current().isJava8Compatible()) {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
jacoco {
toolVersion = "0.7.4.201502262128"
}
@ -155,9 +153,13 @@ task javadocAll(type: Javadoc) {
// Might need a classpath
classpath = files(subprojects.collect {project ->
project.sourceSets.main.compileClasspath})
classpath += files(androidBootClasspath)
options.linkSource = true
options.use = true
options.links = ["http://docs.oracle.com/javase/$sourceCompatibility/docs/api/"] as String[]
options.links = [
"http://docs.oracle.com/javase/$sourceCompatibility/docs/api/",
"http://jxmpp.org/$jxmppVersion/javadoc/",
] as String[]
}
import org.apache.tools.ant.filters.ReplaceTokens
@ -328,6 +330,15 @@ subprojects*.jar {
}
}
configure(androidBootClasspathProjects) {
compileJava {
options.bootClasspath = androidBootClasspath
}
javadoc {
classpath += files(androidBootClasspath)
}
}
apply plugin: "com.github.kt3k.coveralls"
coveralls {
sourceDirs = files(subprojects.sourceSets.main.allSource.srcDirs).files.absolutePath

View file

@ -7,14 +7,3 @@ dependencies {
compile project(':smack-android')
compile project(':smack-extensions')
}
compileJava {
options.bootClasspath = androidBootClasspath
}
// See http://stackoverflow.com/a/2823592/194894
// TODO this doesn't seem to work right now. But on the other hand it
// is not really required, just to avoid a javadoc compiler warning
javadoc {
options.linksOffline "http://developer.android.com/reference", androidJavadocOffline
}

View file

@ -16,17 +16,6 @@ dependencies {
}
}
compileJava {
options.bootClasspath = androidBootClasspath
}
// See http://stackoverflow.com/a/2823592/194894
// TODO this doesn't seem to work right now. But on the other hand it
// is not really required, just to avoid a javadoc compiler warning
javadoc {
options.linksOffline "http://developer.android.com/reference", androidJavadocOffline
}
configure (androidProjects) {
task compileAndroid(type: JavaCompile) {
source = compileJava.source
@ -36,4 +25,4 @@ configure (androidProjects) {
}
}
test { dependsOn androidProjects*.compileAndroid }
test { dependsOn androidProjects*.compileAndroid }

View file

@ -32,7 +32,7 @@ import org.jxmpp.jid.FullJid;
/**
* The XMPPConnection interface provides an interface for connections to an XMPP server and
* implements shared methods which are used by the different types of connections (e.g.
* {@link XMPPTCPConnection} or {@link XMPPBOSHConnection}). To create a connection to an XMPP server
* <code>XMPPTCPConnection</code> or <code>XMPPBOSHConnection</code>). To create a connection to an XMPP server
* a simple usage of this API might look like the following:
* <p>
*
@ -70,7 +70,6 @@ import org.jxmpp.jid.FullJid;
* @author Matt Tucker
* @author Guenther Niess
*/
@SuppressWarnings("javadoc")
public interface XMPPConnection {
/**

View file

@ -458,7 +458,6 @@ public class Roster extends Manager {
* @param name the nickname of the user.
* @param groups the list of group names the entry will belong to, or <tt>null</tt> if the
* the roster entry won't belong to a group.
* @param approved the pre-approval state.
* @throws NoResponseException if there was no response from the server.
* @throws XMPPErrorException if an XMPP exception occurs.
* @throws NotLoggedInException If not logged in.
@ -502,7 +501,6 @@ public class Roster extends Manager {
* @param name the nickname of the user.
* @param groups the list of group names the entry will belong to, or <tt>null</tt> if the
* the roster entry won't belong to a group.
* @param approved the pre-approval state.
* @throws NoResponseException if there was no response from the server.
* @throws XMPPErrorException if an XMPP exception occurs.
* @throws NotLoggedInException if not logged in.

View file

@ -85,13 +85,13 @@ public class OfferRequestProvider extends IQProvider<IQ> {
}
else if (RoomInvitation.ELEMENT_NAME.equals(elemName)) {
RoomInvitation invitation = (RoomInvitation) PacketParserUtils
.parsePacketExtension(RoomInvitation.ELEMENT_NAME, RoomInvitation.NAMESPACE, parser);
.parseExtensionElement(RoomInvitation.ELEMENT_NAME, RoomInvitation.NAMESPACE, parser);
content = new InvitationRequest(invitation.getInviter(), invitation.getRoom(),
invitation.getReason());
}
else if (RoomTransfer.ELEMENT_NAME.equals(elemName)) {
RoomTransfer transfer = (RoomTransfer) PacketParserUtils
.parsePacketExtension(RoomTransfer.ELEMENT_NAME, RoomTransfer.NAMESPACE, parser);
.parseExtensionElement(RoomTransfer.ELEMENT_NAME, RoomTransfer.NAMESPACE, parser);
content = new TransferRequest(transfer.getInviter(), transfer.getRoom(), transfer.getReason());
}
}