From 475492c56978b69c2cf864e1a5069ed3ec3ebf7a Mon Sep 17 00:00:00 2001 From: Nikita Ogorodnikov Date: Wed, 22 Nov 2023 15:05:07 +0100 Subject: [PATCH] Fix CI visibility integration --- .../main/kotlin/com/datadog/gradle/config/KotlinConfig.kt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/buildSrc/src/main/kotlin/com/datadog/gradle/config/KotlinConfig.kt b/buildSrc/src/main/kotlin/com/datadog/gradle/config/KotlinConfig.kt index bdbed4a8..a5ec87af 100644 --- a/buildSrc/src/main/kotlin/com/datadog/gradle/config/KotlinConfig.kt +++ b/buildSrc/src/main/kotlin/com/datadog/gradle/config/KotlinConfig.kt @@ -6,9 +6,9 @@ package com.datadog.gradle.config -import com.android.build.gradle.tasks.factory.AndroidUnitTest import org.gradle.api.JavaVersion import org.gradle.api.Project +import org.gradle.api.tasks.testing.Test import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import java.io.File @@ -22,14 +22,12 @@ fun Project.kotlinConfig() { val moduleName = this@kotlinConfig.name val javaAgentJar = File(File(rootDir, "libs"), "dd-java-agent-0.98.1.jar") - taskConfig { + taskConfig { if (environment["DD_INTEGRATION_JUNIT_5_ENABLED"] == "true") { - val variant = variantName.substringBeforeLast("UnitTest") - // set the `env` tag for the test spans environment("DD_ENV", "ci") // add custom tags based on the module and variant (debug/release, flavors, …) - environment("DD_TAGS", "test.module:$moduleName,test.variant:$variant") + environment("DD_TAGS", "test.module:$moduleName") // disable other Datadog integrations that could interact with the Java Agent environment("DD_INTEGRATIONS_ENABLED", "false")