Skip to content

Commit

Permalink
feat(common): disable telemetry dependency
Browse files Browse the repository at this point in the history
Signed-off-by: Cloorc <13597105+cloorc@users.noreply.github.com>
  • Loading branch information
cloorc committed Aug 10, 2024
1 parent cea8929 commit 16c3b63
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 6 deletions.
5 changes: 1 addition & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ configurations {
}

test {
systemProperties["com.redhat.devtools.intellij.telemetry.mode"] = "disabled"
afterSuite { desc, result ->
if (!desc.parent)
println("${result.resultType} " +
Expand All @@ -97,12 +96,11 @@ 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}" ]
plugins = ["yaml"]
updateSinceUntilBuild = false
}

runIde {
systemProperties["com.redhat.devtools.intellij.telemetry.mode"] = "debug"
}

patchPluginXml {
Expand All @@ -120,7 +118,6 @@ publishPlugin {

runIdeForUiTests {
systemProperty "robot-server.port", System.getProperty("robot-server.port")
systemProperties["com.redhat.devtools.intellij.telemetry.mode"] = "disabled"
}

task generateSchemas {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ideaVersion=IC-2024.1
# build number ranges
# https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html
sinceIdeaBuild=223
sinceIdeaBuild=241
projectVersion=1.3.1-SNAPSHOT
jetBrainsToken=invalid
jetBrainsChannel=stable
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*******************************************************************************
* Copyright (c) 2024 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
package com.redhat.devtools.intellij.telemetry.core.service;

import kotlin.Exception

class TelemetryMessageBuilder constructor(@Suppress("UNUSED_PARAMETER") cl: ClassLoader) {
class ActionMessage {
fun property(@Suppress("UNUSED_PARAMETER") k: String, @Suppress("UNUSED_PARAMETER") v: String?): TelemetryMessageBuilder.ActionMessage {
return this;
}

fun send() {
// no nothing
}

fun success(): ActionMessage {
return ActionMessage();
}

fun error(@Suppress("UNUSED_PARAMETER") e: String): ActionMessage {
return ActionMessage();
}

fun error(@Suppress("UNUSED_PARAMETER") e: Exception): ActionMessage {
return ActionMessage();
}
}
fun action(@Suppress("UNUSED_PARAMETER") a: String) : ActionMessage {
return ActionMessage();
}
}
1 change: 0 additions & 1 deletion src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@
<depends>org.jetbrains.plugins.yaml</depends>
<depends optional="true" config-file="plugin-json.xml">com.intellij.modules.json</depends>
<depends optional="true">org.jetbrains.plugins.terminal</depends>
<depends>com.redhat.devtools.intellij.telemetry</depends>

<extensions defaultExtensionNs="com.intellij">
<toolWindow id="Kubernetes"
Expand Down

0 comments on commit 16c3b63

Please sign in to comment.