Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: update segment-java to 3.4.0 and gson to 2.10.1 #78

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,16 @@ 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.squareup.okio:okio:3.6.0') {
exclude group: 'org.jetbrains.kotlin'
}
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",
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down Expand Up @@ -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())
Expand All @@ -132,19 +130,17 @@ 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() {
analytics.flush();
blockingFlush.block();
analytics.shutdown();
}

}
Loading