File tree Expand file tree Collapse file tree 5 files changed +10
-6
lines changed
dd-sdk-android-gradle-plugin/src
main/kotlin/com/datadog/gradle/plugin/kcp
test/kotlin/com/datadog/gradle/plugin/kcp
src/androidTest/java/com/datadog/android/instrumented
samples/lib-module/src/main/kotlin/com/datadog/android/compose Expand file tree Collapse file tree 5 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -129,15 +129,15 @@ internal class DefaultPluginContextUtils(
129129 private const val MODIFIER_COMPANION_NAME = " Modifier.Companion"
130130 private val composableFqName = FqName (" androidx.compose.runtime.Composable" )
131131 private val datadogPackageName = FqName (" com.datadog.android.compose" )
132- private val datadogModifierIdentifier = Name .identifier(" datadog " )
132+ private val datadogModifierIdentifier = Name .identifier(" instrumentedDatadog " )
133133 private val composeUiPackageName = FqName (" androidx.compose.ui" )
134134 private val modifierClassRelativeName = Name .identifier(" Modifier" )
135135 private val modifierThenIdentifier = Name .identifier(" then" )
136136 private val navigationPackageName = FqName (" androidx.navigation" )
137137 private val navHostControllerIdentifier = Name .identifier(" NavHostController" )
138138 private val navHostCallName = FqName (" androidx.navigation.compose.NavHost" )
139139 private val datadogTrackEffectPackageName = FqName (" com.datadog.android.compose" )
140- private val datadogTrackEffectIdentifier = Name .identifier(" NavigationViewTrackingEffect " )
140+ private val datadogTrackEffectIdentifier = Name .identifier(" InstrumentedNavigationViewTrackingEffect " )
141141 private val kotlinPackageName = FqName (" kotlin" )
142142 private val applyFunctionIdentifier = Name .identifier(" apply" )
143143 private val foundationPackageName = FqName (" androidx.compose.foundation" )
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ internal open class KotlinCompilerTest {
121121 import androidx.compose.ui.semantics.semantics
122122 import com.datadog.gradle.plugin.kcp.TestCallbackContainer
123123
124- fun Modifier.datadog (name: String, isImageRole: Boolean = false): Modifier {
124+ fun Modifier.instrumentedDatadog (name: String, isImageRole: Boolean = false): Modifier {
125125 TestCallbackContainer.invokeCallback(isImageRole)
126126 return this.semantics {
127127 this.datadog = name
@@ -150,7 +150,7 @@ internal open class KotlinCompilerTest {
150150
151151
152152 @Composable
153- fun NavigationViewTrackingEffect (
153+ fun InstrumentedNavigationViewTrackingEffect (
154154 navController: NavController
155155 ) {
156156 TestCallbackContainer.invokeCallback()
Original file line number Diff line number Diff line change @@ -54,7 +54,8 @@ android {
5454tasks.withType<KotlinCompile >().configureEach {
5555 kotlinOptions {
5656 freeCompilerArgs + = listOf (
57- " -P" , " plugin:com.datadoghq.kotlin.compiler:INSTRUMENTATION_MODE=AUTO"
57+ // RUM-9513: This KCP is disabled to API change of SDK, Restore this test after the next release of SDK
58+ " -P" , " plugin:com.datadoghq.kotlin.compiler:INSTRUMENTATION_MODE=DISABLE"
5859 )
5960 }
6061}
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import androidx.navigation.NavHostController
1515import androidx.test.platform.app.InstrumentationRegistry
1616import fr.xgouchet.elmyr.junit5.ForgeExtension
1717import org.assertj.core.api.Assertions.assertThat
18+ import org.junit.Ignore
1819import org.junit.Rule
1920import org.junit.Test
2021import org.junit.jupiter.api.extension.ExtendWith
@@ -36,6 +37,7 @@ class NavigationTest {
3637 val composeTestRule = createComposeRule()
3738
3839 @Test
40+ @Ignore(" RUM-9513: This test will fail due to API change of SDK, Restore this test after the next release of SDK" )
3941 fun `M call function and have original components W instrument with the Plugin` () {
4042 // Given
4143 val latch = CountDownLatch (1 )
@@ -67,6 +69,7 @@ class NavigationTest {
6769 }
6870
6971 @Test
72+ @Ignore(" RUM-9513: This test will fail due to API change of SDK, Restore this test after the next release of SDK" )
7073 fun `M call function and have original components W instrument nested NavHost with the Plugin` () {
7174 // Given
7275 val latch = CountDownLatch (1 )
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import androidx.compose.ui.semantics.semantics
1212 * This function should have exactly the same package name, function signature and return type
1313 * with the production one.
1414 */
15- fun Modifier.datadog (name : String , isImageRole : Boolean = false): Modifier {
15+ internal fun Modifier.instrumentedDatadog (name : String , isImageRole : Boolean = false): Modifier {
1616 return this .semantics {
1717 this .datadog = name
1818 if (isImageRole) {
You can’t perform that action at this time.
0 commit comments