From 2261f9f311d3b6a878592dfad6703280abbda356 Mon Sep 17 00:00:00 2001 From: Fred Bricon Date: Thu, 21 Dec 2023 17:20:31 +0100 Subject: [PATCH] build: update segment-java to 3.4.0 and gson to 2.10.1 Signed-off-by: Fred Bricon --- build.gradle | 8 ++++++-- gradle.properties | 3 +++ ...TelemetryMessageBuilderIntegrationTest.java | 18 +++++++----------- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/build.gradle b/build.gradle index aa87fb05..be56a468 100644 --- a/build.gradle +++ b/build.gradle @@ -32,9 +32,13 @@ publishPlugin { } dependencies { + implementation('com.segment.analytics.java:analytics:3.4.0') { + exclude group: 'org.jetbrains.kotlin' + exclude group: 'com.squareup.retrofit2', module: 'retrofit-mock' + exclude group: 'com.google.auto.value', module: 'auto-value-annotations' + } implementation( - 'com.segment.analytics.java:analytics:2.1.1', - 'com.squareup.okhttp3:okhttp:4.9.3' + 'com.google.code.gson:gson:2.10.1' ) testImplementation( "org.junit.jupiter:junit-jupiter:5.9.1", diff --git a/gradle.properties b/gradle.properties index 4ca80f58..d5bfe268 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,3 +8,6 @@ jetBrainsToken=invalid jetBrainsChannel=stable nexusUser=invalid nexusPassword=invalid + +# https://plugins.jetbrains.com/docs/intellij/using-kotlin.html#kotlin-standard-library +kotlin.stdlib.default.dependency=false \ No newline at end of file diff --git a/src/test/java/com/redhat/devtools/intellij/telemetry/core/service/TelemetryMessageBuilderIntegrationTest.java b/src/test/java/com/redhat/devtools/intellij/telemetry/core/service/TelemetryMessageBuilderIntegrationTest.java index 53383097..dd39ceb5 100644 --- a/src/test/java/com/redhat/devtools/intellij/telemetry/core/service/TelemetryMessageBuilderIntegrationTest.java +++ b/src/test/java/com/redhat/devtools/intellij/telemetry/core/service/TelemetryMessageBuilderIntegrationTest.java @@ -11,7 +11,6 @@ package com.redhat.devtools.intellij.telemetry.core.service; import com.intellij.util.messages.MessageBusConnection; -import com.jakewharton.retrofit.Ok3Client; import com.redhat.devtools.intellij.telemetry.core.IService; import com.redhat.devtools.intellij.telemetry.core.configuration.TelemetryConfiguration; import com.redhat.devtools.intellij.telemetry.core.service.segment.ISegmentConfiguration; @@ -26,7 +25,6 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -import retrofit.client.Client; import java.util.concurrent.TimeUnit; @@ -123,7 +121,7 @@ void should_send_feedback() { // then } - private Analytics createAnalytics(BlockingFlush blockingFlush, Client client) { + private Analytics createAnalytics(BlockingFlush blockingFlush, OkHttpClient client) { return Analytics.builder(SEGMENT_WRITE_KEY) .flushQueueSize(1) .plugin(new StdOutLogging()) @@ -132,13 +130,12 @@ private Analytics createAnalytics(BlockingFlush blockingFlush, Client client) { .build(); } - private Client createClient() { - return new Ok3Client( - new OkHttpClient.Builder() - .connectTimeout(5, TimeUnit.SECONDS) - .readTimeout(5, TimeUnit.SECONDS) - .writeTimeout(5, TimeUnit.SECONDS) - .build()); + private OkHttpClient createClient() { + return new OkHttpClient.Builder() + .connectTimeout(5, TimeUnit.SECONDS) + .readTimeout(5, TimeUnit.SECONDS) + .writeTimeout(5, TimeUnit.SECONDS) + .build(); } private void shutdownAnalytics() { @@ -146,5 +143,4 @@ private void shutdownAnalytics() { blockingFlush.block(); analytics.shutdown(); } - }