diff --git a/build.gradle b/build.gradle index aa87fb05..a84e87f3 100644 --- a/build.gradle +++ b/build.gradle @@ -32,9 +32,14 @@ publishPlugin { } dependencies { + implementation('com.segment.analytics.java:analytics:3.4.0') { + exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib' + exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-common' + exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk7' + exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8' + } 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(); } - }