diff --git a/build.gradle b/build.gradle index a4bb960db..04186e11c 100644 --- a/build.gradle +++ b/build.gradle @@ -97,7 +97,9 @@ test { intellij { version = ideaVersion //for a full list of Jetbrains IDEA releases please see https://www.jetbrains.com/intellij-repository/releases pluginName = "Kubernetes by Red Hat" - plugins = ["yaml", "com.redhat.devtools.intellij.telemetry:${telemetryPluginVersion}" ] + // use '/build/idea-sandbox/plugins/Telemetry by Red Hat' if working from source +// plugins = ["yaml", "com.redhat.devtools.intellij.telemetry:${telemetryPluginVersion}" ] + plugins = ["yaml", "/Users/adietish/Documents/jboss-workspaces/intellij-redhat-telemetry/build/idea-sandbox/plugins/Telemetry by Red Hat" ] updateSinceUntilBuild = false } diff --git a/src/main/kotlin/com/redhat/devtools/intellij/kubernetes/telemetry/TelemetryService.kt b/src/main/kotlin/com/redhat/devtools/intellij/kubernetes/telemetry/TelemetryService.kt index 3c91855a6..3fd1178c5 100644 --- a/src/main/kotlin/com/redhat/devtools/intellij/kubernetes/telemetry/TelemetryService.kt +++ b/src/main/kotlin/com/redhat/devtools/intellij/kubernetes/telemetry/TelemetryService.kt @@ -10,6 +10,8 @@ ******************************************************************************/ package com.redhat.devtools.intellij.kubernetes.telemetry +import com.intellij.ide.plugins.PluginManager +import com.intellij.ide.plugins.PluginManagerCore import com.redhat.devtools.intellij.common.validation.KubernetesResourceInfo import com.redhat.devtools.intellij.common.validation.KubernetesTypeInfo import com.redhat.devtools.intellij.kubernetes.model.resource.ResourceKind @@ -29,7 +31,7 @@ object TelemetryService { const val PROP_OPENSHIFT_VERSION = "openshift_version" val instance: TelemetryMessageBuilder by lazy { - TelemetryMessageBuilder(TelemetryService::class.java.classLoader) + TelemetryMessageBuilder(PluginManager.getPluginByClass(javaClass)) } fun sendTelemetry(resources: Collection, telemetry: TelemetryMessageBuilder.ActionMessage) {