1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-10-31 17:25:58 +01:00

Add smack-bosh to Android Projects

Replace SaslException with SmackException in XMPPBOSHConnection, that is
the exception which is used in XMPPTCPConnection for the same purpose.

Also make androidProjects a multi-line list.
This commit is contained in:
Florian Schmaus 2015-01-25 10:35:44 +01:00
parent 4b10f36e9e
commit 616768a5a9
2 changed files with 12 additions and 5 deletions

View file

@ -33,7 +33,16 @@ allprojects {
// build, causing unnecessary rebuilds. // build, causing unnecessary rebuilds.
builtDate = (new java.text.SimpleDateFormat("yyyy-MM-dd")).format(new Date()) builtDate = (new java.text.SimpleDateFormat("yyyy-MM-dd")).format(new Date())
oneLineDesc = 'An Open Source XMPP (Jabber) client library' oneLineDesc = 'An Open Source XMPP (Jabber) client library'
androidProjects = [':smack-tcp', ':smack-core', ':smack-im', ':smack-resolver-minidns', ':smack-sasl-provided', ':smack-extensions', ':smack-experimental'].collect{ project(it) } androidProjects = [
':smack-tcp',
':smack-bosh',
':smack-core',
':smack-im',
':smack-resolver-minidns',
':smack-sasl-provided',
':smack-extensions',
':smack-experimental',
].collect{ project(it) }
androidBootClasspath = getAndroidRuntimeJar() androidBootClasspath = getAndroidRuntimeJar()
androidJavadocOffline = getAndroidJavadocOffline() androidJavadocOffline = getAndroidJavadocOffline()
} }

View file

@ -25,8 +25,6 @@ import java.io.Writer;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import javax.security.sasl.SaslException;
import org.jivesoftware.smack.AbstractXMPPConnection; import org.jivesoftware.smack.AbstractXMPPConnection;
import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.SmackException.NotConnectedException; import org.jivesoftware.smack.SmackException.NotConnectedException;
@ -239,7 +237,7 @@ public class XMPPBOSHConnection extends AbstractXMPPConnection {
saslAuthentication.authenticate(resource, config.getCallbackHandler()); saslAuthentication.authenticate(resource, config.getCallbackHandler());
} }
} else { } else {
throw new SaslException("No non-anonymous SASL authentication mechanism available"); throw new SmackException("No non-anonymous SASL authentication mechanism available");
} }
bindResourceAndEstablishSession(resource); bindResourceAndEstablishSession(resource);
@ -257,7 +255,7 @@ public class XMPPBOSHConnection extends AbstractXMPPConnection {
} }
else { else {
// Authenticate using Non-SASL // Authenticate using Non-SASL
throw new SaslException("No anonymous SASL authentication mechanism available"); throw new SmackException("No anonymous SASL authentication mechanism available");
} }
bindResourceAndEstablishSession(null); bindResourceAndEstablishSession(null);