1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-15 00:32:06 +01:00
Commit graph

21 commits

Author SHA1 Message Date
Florian Schmaus
1e5d34eacf Bump to Gradle 8.10.2, require Java 11
Bump Gradle from 6.8.3 to 8.10.2 and increase the minimum required
Java version from 8 to 11 (SMACK-953).

The switch from Java 8 to 11 caused some Bytecode portability issues
regarding NIO Buffers. Java changed with version 9 the return type of
some subclasses of Buffer to return the specific Buffer type instead
of the Buffer superclass [JDK-4774077]. For example, ByteBuffer.filp()
previously returned Buffer, while it does return ByteBuffer now.

This sensible change was not reflected by the Android API [1], which
means that AnimalSniffer rightfully started to complain that there is
no method "ByteBuffer ByteBuffer.flip()" in Android, there is only
"Buffer ByteBuffer.flip()", and those are incompatible methods on
Java's Bytecode layer.

As workaround, this changes

    return charBuffer.flip().toString();

to

    ((java.nio.Buffer) charBuffer).flip();
    return charBuffer.toString();

to restore the Bytecode portability between Android and Java.

Errorprone also got new checks, of which JavaUtilDate and JdkObsolete
are wroth mentioning.

JavaUtilData basically strongly recommends to use Java's newer time
API over java.util.Date. But since Smack was Java 8 until now,
j.u.Date is widely used.

Similar JdkObsolete mentions obsolete JDK APIs, like data structures
like Vector and Stack. But mostly LinkedList, which should usually be
replaced by ArrayList. And this is what this commit largely does.

JDK-4774077: https://bugs.openjdk.org/browse/JDK-4774077
1: https://issuetracker.google.com/issues/369219141
2024-09-25 12:08:50 +02:00
Florian Schmaus
e0f335be40 [smack-repl] Bump Ammonite to 3.0.0-M1 and Scala to 2.13.13 2024-05-08 14:58:43 +02:00
Florian Schmaus
04dc212db8 Add smack-examples 2023-11-28 10:46:16 +01:00
Florian Schmaus
b35b67c360 [repl] Bump Scala to 2.13.12, Ammonite to 2.5.11, and Scalastyle plugin to 2.1.0 2023-11-26 21:34:14 +01:00
Florian Schmaus
2762325639 [repl] Bump Scala to 2.13.6 and Ammonite to 2.4.0 2021-06-21 15:04:26 +02:00
Florian Schmaus
fbddd074bc [gradle] Do not use deprecated 'compile' directive 2021-04-14 20:30:51 +02:00
8a0371bcea
Remove smack-java8-full dependency on smack-omemo-signal 2020-06-16 13:58:27 +02:00
Florian Schmaus
d69f62d012 [repl] Add project description 2020-05-21 09:48:29 +02:00
Florian Schmaus
b5f9d4d7a3 Introduce test fixtures
This also removes the powermock dependency. Although powermock is a
fine library, it currently prevents dropping Junit4. And since we only
use the Whitebox API of powermock, this simply replaced powermock's
Whitebox with our own.
2020-04-11 22:05:36 +02:00
Florian Schmaus
cc636fff21 Introduce Smack's Modular Connection Architecture
This is a complete redesign of what was previously
XmppNioTcpConnection. The new architecture allows to extend an XMPP
client to server (c2s) connection with new transport bindings and
other extensions.
2020-04-04 13:03:31 +02:00
Florian Schmaus
2f667f95a8 gradle: Remove archives configuration
and FileTestUtil in favor of commons-io. This is required because
Eclipse won't put src/test code into the classpath of src/main
code (even though gradle was configured with an according
dependency).
2019-09-16 00:04:47 +02:00
3a0356488d Add OmemoClient repl class 2019-08-05 11:11:38 +02:00
Florian Schmaus
62fd897cf7 Add support for XEP-0418: DNS Queries over XMPP (DoX)
Fixes SMACK-862.
2019-04-09 10:56:47 +02:00
Florian Schmaus
e98d42790a SmackReactor/NIO, Java8/Android19, Pretty print XML, FSM connections
This commit adds
- SmackReactor / NIO
- a framework for finite state machine connections
- support for Java 8
- pretty printed XML debug output

It also
- reworks the integration test framework
- raises the minimum Android API level to 19
- introduces XmppNioTcpConnection

Furthermore fixes SMACK-801 (at least partly). Java 8 language
features are available, but not all runtime library methods. For that
we would need to raise the Android API level to 24 or higher.
2019-02-05 13:18:03 +01:00
Florian Schmaus
ec7badfda0 Add scala code to smack-repl 2018-10-31 14:24:49 +01:00
Florian Schmaus
04f7b0a9c8 Bump Ammonite REPL to 1.3.2 2018-10-27 15:41:17 +02:00
842cc2c2a4
Fix smack-repl build script 2017-04-20 22:40:53 +02:00
Florian Schmaus
e06095ffc2 Bump Ammonite REPL to 0.8.0 2016-12-08 08:29:48 +01:00
Florian Schmaus
b91978dcc4 Add (partial) support for IoT XEPs
That is XEP-0323, -0324, -0325, and -0347.

SMACK-727.
2016-07-21 08:51:11 +02:00
Florian Schmaus
f351919fa5 Switch to Ammonite REPL
It comes with working tab completion. \o/
2016-02-23 16:30:20 +01:00
Florian Schmaus
8f149346a6 Add a REPL for Smack (smack-repl) 2016-02-10 14:52:33 +01:00