Skip to content
This repository has been archived by the owner on Apr 4, 2021. It is now read-only.

Commit

Permalink
aSmack 4.1-SNAPSHOT
Browse files Browse the repository at this point in the history
Add jxmpp and minidns to bootclasspath.

For now we support minidns *and* dnsjava. But dnsjava support will be
dropped in a future release.
  • Loading branch information
Flowdalic committed Jul 15, 2014
1 parent 714be18 commit cb14007
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 14 deletions.
11 changes: 2 additions & 9 deletions README.asmack
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,15 @@ ProGuard
If you use ProGuard, you have to configure it so that no important
Smack classes are optimized away:

# This dnsjava class uses old Sun API
-dontnote org.xbill.DNS.spi.DNSJavaNameServiceDescriptor
-dontwarn org.xbill.DNS.spi.DNSJavaNameServiceDescriptor

# See http://stackoverflow.com/questions/5701126, happens in dnsjava
-optimizations !code/allocation/variable

# Smack specific configuration
-keep class de.measite.smack.AndroidDebugger { *; }
-keep class * implements org.jivesoftware.smack.initializer.SmackInitializer
-keep class * implements org.jivesoftware.smack.provider.IQProvider
-keep class * implements org.jivesoftware.smack.provider.PacketExtensionProvider
-keep class * extends org.jivesoftware.smack.packet.Packet
-keep class org.jivesoftware.smack.XMPPConnection
-keep class org.jivesoftware.smack.ReconnectionManager
-keep class org.jivesoftware.smack.CustomSmackConfiguration
-keep class org.jivesoftware.smackx.disco.ServiceDiscoveryManager
-keep class org.jivesoftware.smackx.xhtmlim.XHTMLManager
-keep class org.jivesoftware.smackx.muc.MultiUserChat
Expand All @@ -49,8 +44,6 @@ Smack classes are optimized away:
-keep class org.jivesoftware.smackx.privacy.PrivacyListManager
-keep class org.jivesoftware.smackx.time.EntityTimeManager
-keep class org.jivesoftware.smackx.vcardtemp.VCardManager
-keep class org.jivesoftware.smack.CustomSmackConfiguration


Problems / Debugging
==============================
Expand Down
2 changes: 1 addition & 1 deletion build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ createbuildsrc() {
execute copyfolder "src/smack/smack-extensions/src/main/resources/" "build/resources" "."
execute copyfolder "src/smack/smack-experimental/src/main/java/" "build/src" "."
execute copyfolder "src/smack/smack-experimental/src/main/resources/" "build/resources" "."
execute copyfolder "src/smack/smack-resolver-dnsjava/src/main/java/" "build/src" "."
execute copyfolder "src/smack/smack-resolver-minidns/src/main/java/" "build/src" "."

execute copyfolder "src/qpid/java" "build/src" "org/apache/qpid/management/common/sasl"
execute copyfolder "src/novell-openldap-jldap" "build/src" "."
Expand Down
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
source="7"
srcdir="build/src"
destdir="build/classes/${android.version}"
bootclasspath="${sdk-location}/platforms/${android.version}/android.jar:lib/org.xbill.dns_2.1.6.jar:${jingle}"
bootclasspath="${sdk-location}/platforms/${android.version}/android.jar:lib/org.xbill.dns_2.1.6.jar:lib/jxmpp-core-0.1.0.jar:lib/jxmpp-util-cache-0.1.0.jar:lib/minidns-0.1.1.jar:${jingle}"
debug="true"
debuglevel="source,lines"
includeantruntime="false"
Expand Down
Binary file added lib/jxmpp-core-0.1.0.jar
Binary file not shown.
Binary file added lib/jxmpp-util-cache-0.1.0.jar
Binary file not shown.
Binary file added lib/minidns-0.1.1.jar
Binary file not shown.
4 changes: 4 additions & 0 deletions .../org/jivesoftware/smack/SmackAndroid.java → patch/4.0/SmackAndroid.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/bin/bash

cat > org/jivesoftware/smack/SmackAndroid.java <<EOF
package org.jivesoftware.smack;
import java.util.logging.Logger;
Expand Down Expand Up @@ -90,3 +93,4 @@ private void maybeRegisterReceiver() {
}
}
}
EOF
4 changes: 4 additions & 0 deletions patch/4.0/dnsjava.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

echo $PWD
cp -r ../../src/smack/smack-resolver-dnsjava/src/main/java/ .
4 changes: 1 addition & 3 deletions static-src/custom/de/measite/smack/AndroidDebugger.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,13 @@ public Writer newConnectionWriter(Writer newWriter) {
}

public void userHasLogged(String user) {
boolean isAnonymous = "".equals(StringUtils.parseName(user));
String title =
"User logged (" + connection.getConnectionCounter() + "): "
+ (isAnonymous ? "" : StringUtils.parseBareAddress(user))
+ user
+ "@"
+ connection.getServiceName()
+ ":"
+ connection.getPort();
title += "/" + StringUtils.parseResource(user);
Log.d("SMACK", title);
// Add the connection listener to the connection so that the debugger can be notified
// whenever the connection is closed.
Expand Down

0 comments on commit cb14007

Please sign in to comment.