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

10 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
fbddd074bc [gradle] Do not use deprecated 'compile' directive 2021-04-14 20:30:51 +02:00
Florian Schmaus
268425854a resolver-dnsjava: bump to dnsjava 3.0 series 2020-04-12 22:21:30 +02:00
Florian Schmaus
5d10afbb11 resolver-dnsjava: change description
The recommended resolver on Android is MiniDNS.
2020-04-12 22:21:30 +02:00
Florian Schmaus
ac77c969ac gradle: Use project(':foo') intead of project(path: ':foo') when possible 2019-09-01 23:13:20 +02:00
Florian Schmaus
2856b8ace6 Fix dependency version specification
Mathematical range syntax was introduced with
31c53f094c, but unforutantely brackets
and parentheses where reversed.
2015-02-19 14:28:46 +01:00
Florian Schmaus
31c53f094c Use mathematical range syntax for dependencies
In dd84d53bbc the usage of dynamic
dependencies was removed because OSS Sonatype would not longer allow
them, i.e. the '1.2.+' notation, on release artifacts. But they allow
the mathematical range notation '(1.2,1.3]', therefore we use this now.
2014-12-17 16:23:24 +01:00
Florian Schmaus
dd84d53bbc Don't use dynamic dependency for dnsjava 2014-11-29 18:06:26 +01:00
Florian Schmaus
328b733f7e Don't use gradle 'configurations' in smack-core
Fixes SMACK-587
2014-10-09 19:53:53 +02:00
Florian Schmaus
91fd15ad86 Prefix subprojects with 'smack-'
instead of using the old baseName=smack appendix=project.name approach,
we are now going convention over configuration and renaming the
subprojects directories to the proper name.

Having a prefix is actually very helpful, because the resulting
libraries will be named like the subproject. And a core-4.0.0-rc1.jar is
not as explicit about what it actually *is* as a
smack-core-4.0.0-rc1.jar.

SMACK-265
2014-04-28 19:44:14 +02:00
Renamed from resolver-dnsjava/build.gradle (Browse further)