Bump Kotlin, okhttp, okio, and java-telegram-bot-api libraries (#16458)

* update libs

Signed-off-by: Matthew Skinner <matt@pcmus.com>
This commit is contained in:
Matthew Skinner 2024-03-29 19:43:32 +11:00 committed by GitHub
parent accec17658
commit 09132d9c3b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 93 additions and 52 deletions

View File

@ -42,7 +42,7 @@
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.9.1</version>
<version>${gson.version}</version>
</dependency>
</dependencies>

View File

@ -16,7 +16,7 @@
<properties>
<bnd.importpackage>
!javax.annotation;!android.*,!com.android.*,!com.google.appengine.*,!dalvik.system,!kotlin.*,!kotlinx.*,!org.conscrypt,!sun.security.ssl,!org.apache.harmony.*,!org.apache.http.*,!rx.*,!org.msgpack.*
!javax.annotation;!android.*,!com.android.*,!com.google.appengine.*,!dalvik.system,!kotlin.*,!kotlinx.*,!org.conscrypt,!sun.security.ssl,!org.apache.harmony.*,!org.apache.http.*,!rx.*,!org.msgpack.*,!org.bouncycastle.*,!org.openjsse.*
</bnd.importpackage>
</properties>
@ -45,7 +45,7 @@
<dependency> <!-- also used for querydb library -->
<artifactId>gson</artifactId>
<groupId>com.google.code.gson</groupId>
<version>2.9.1</version>
<version>${gson.version}</version>
</dependency>
<dependency>
<artifactId>gson-fire</artifactId>
@ -55,7 +55,14 @@
<dependency>
<artifactId>okio</artifactId>
<groupId>com.squareup.okio</groupId>
<version>1.17.3</version>
<version>${okio.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio-jvm</artifactId>
<version>${okio.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<artifactId>commons-csv</artifactId>
@ -70,7 +77,7 @@
<dependency>
<artifactId>okhttp</artifactId>
<groupId>com.squareup.okhttp3</groupId>
<version>3.14.4</version>
<version>${okhttp3.version}</version>
</dependency>
<dependency>
<artifactId>retrofit</artifactId>
@ -85,7 +92,7 @@
<dependency>
<artifactId>logging-interceptor</artifactId>
<groupId>com.squareup.okhttp3</groupId>
<version>3.14.4</version>
<version>${okhttp3.version}</version>
</dependency>
<dependency>
<artifactId>rxjava</artifactId>

View File

@ -84,31 +84,31 @@
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>1.7.21</version>
<version>${kotlin.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-core-jvm</artifactId>
<version>1.6.4</version>
<version>1.8.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-serialization-core-jvm</artifactId>
<version>1.4.1</version>
<version>1.6.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-serialization-json-jvm</artifactId>
<version>1.4.1</version>
<version>1.6.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.github.microutils</groupId>
<artifactId>kotlin-logging-jvm</artifactId>
<version>3.0.4</version>
<version>3.0.5</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@ -15,32 +15,44 @@
<name>openHAB Add-ons :: Bundles :: Telegram Binding</name>
<properties>
<bnd.importpackage>!android.*,!com.android.org.*,!dalvik.*,!javax.annotation.meta.*,!org.apache.harmony.*,!org.conscrypt.*,!sun.*</bnd.importpackage>
<bnd.importpackage>!android.*,!com.android.org.*,!dalvik.*,!javax.annotation.meta.*,!org.apache.harmony.*,!org.conscrypt.*,!sun.*,!kotlin.*,!org.bouncycastle.*,!org.openjsse.*</bnd.importpackage>
</properties>
<dependencies>
<dependency>
<groupId>com.github.pengrad</groupId>
<artifactId>java-telegram-bot-api</artifactId>
<version>5.2.0</version>
<version>7.1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>${okhttp.version}</version>
<version>${okhttp3.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
<version>1.15.0</version>
<version>${okio.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio-jvm</artifactId>
<version>${okio.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>logging-interceptor</artifactId>
<version>${okhttp.version}</version>
<version>${okhttp3.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>${kotlin.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@ -360,7 +360,7 @@ public class TelegramHandler extends BaseThingHandler {
} else if (message.photo() != null) {
PhotoSize[] photoSizes = message.photo();
logger.trace("Received photos {}", Arrays.asList(photoSizes));
Arrays.sort(photoSizes, Comparator.comparingInt(PhotoSize::fileSize).reversed());
Arrays.sort(photoSizes, Comparator.comparingLong(PhotoSize::fileSize).reversed());
lastMessageURL = getFullDownloadUrl(photoSizes[0].fileId());
} else if (message.text() != null) {
lastMessageText = message.text();

View File

@ -16,12 +16,12 @@
<properties>
<bnd.importpackage>
!javax.annotation.*;!android.*,!com.android.*,!com.google.appengine.*,!dalvik.system,!kotlin.*,!kotlinx.*,!org.conscrypt,!sun.security.ssl,!org.apache.harmony.*,!org.apache.http.*,!rx.*,!org.msgpack.*
!javax.annotation.*;!android.*,!com.android.*,!com.google.appengine.*,!dalvik.system,!kotlin.*,!kotlinx.*,!org.conscrypt,!sun.security.ssl,!org.apache.harmony.*,!org.apache.http.*,!rx.*,!org.msgpack.*,!org.bouncycastle.*,!org.openjsse.*
</bnd.importpackage>
<okhttp3.version>3.14.9</okhttp3.version>
<retrofit.version>2.7.2</retrofit.version>
<influx2.version>4.3.0</influx2.version>
<influx1.version>2.21</influx1.version>
<retrofit.version>2.10.0</retrofit.version>
<influx2.version>7.0.0</influx2.version>
<influx1.version>2.24</influx1.version>
<io.reactivex.rxjava3>3.1.8</io.reactivex.rxjava3>
</properties>
<dependencies>
@ -36,11 +36,6 @@
<artifactId>influxdb-client-utils</artifactId>
<version>${influx2.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.retrofit2</groupId>
<artifactId>adapter-rxjava2</artifactId>
<version>${retrofit.version}</version>
</dependency>
<dependency>
<groupId>com.influxdb</groupId>
<artifactId>influxdb-client-core</artifactId>
@ -51,6 +46,11 @@
<artifactId>flux-dsl</artifactId>
<version>${influx2.version}</version>
</dependency>
<dependency>
<groupId>com.influxdb</groupId>
<artifactId>influxdb-client-flux</artifactId>
<version>${influx2.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.retrofit2</groupId>
@ -67,6 +67,11 @@
<groupId>com.squareup.retrofit2</groupId>
<version>${retrofit.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.retrofit2</groupId>
<artifactId>adapter-rxjava3</artifactId>
<version>${retrofit.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
@ -78,45 +83,59 @@
<artifactId>logging-interceptor</artifactId>
<version>${okhttp3.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
<version>${okio.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio-jvm</artifactId>
<version>${okio.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.9.1</version>
<version>${gson.version}</version>
</dependency>
<dependency>
<groupId>io.gsonfire</groupId>
<artifactId>gson-fire</artifactId>
<version>1.8.4</version>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
<version>1.17.3</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.8</version>
<version>1.9.0</version>
</dependency>
<dependency>
<artifactId>json</artifactId>
<groupId>org.json</groupId>
<version>20231013</version>
</dependency>
<dependency>
<artifactId>rxjava</artifactId>
<groupId>io.reactivex.rxjava2</groupId>
<version>2.2.19</version>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.10.0</version>
</dependency>
<dependency>
<artifactId>reactive-streams</artifactId>
<groupId>org.reactivestreams</groupId>
<version>1.0.3</version>
<version>1.0.4</version>
</dependency>
<dependency>
<artifactId>swagger-annotations</artifactId>
<groupId>io.swagger</groupId>
<version>1.6.1</version>
<version>1.6.13</version>
</dependency>
<dependency>
<groupId>io.reactivex.rxjava3</groupId>
<artifactId>rxjava</artifactId>
<version>${io.reactivex.rxjava3}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>${kotlin.version}</version>
</dependency>
<!--END InfluxDB 2.0 -->
@ -134,7 +153,7 @@
<dependency>
<groupId>com.squareup.moshi</groupId>
<artifactId>moshi</artifactId>
<version>1.8.0</version>
<version>1.15.1</version>
</dependency>
<!-- Okhttp & Retrofit from 2.0 are ok -->

View File

@ -39,37 +39,37 @@
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.11.0</version>
<version>${okhttp3.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp-urlconnection</artifactId>
<version>4.11.0</version>
<version>${okhttp3.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>1.6.21</version>
<version>${kotlin.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
<version>3.4.0</version>
<version>${okio.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio-jvm</artifactId>
<version>3.4.0</version>
<version>${okio.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.9.1</version>
<version>${gson.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@ -76,7 +76,10 @@
<jna.version>5.14.0</jna.version>
<karaf.version>4.4.5</karaf.version>
<netty.version>4.1.104.Final</netty.version>
<okhttp.version>3.14.9</okhttp.version>
<okhttp3.version>4.12.0</okhttp3.version>
<okio.version>3.9.0</okio.version>
<gson.version>2.9.1</gson.version>
<kotlin.version>1.9.23</kotlin.version>
<sat.version>0.15.0</sat.version>
<slf4j.version>2.0.7</slf4j.version>
<spotless.version>2.38.0</spotless.version>