Skip to content

Commit 98fbe0e

Browse files
Remove duplicate calls to addPackage (#4285)
* Check for mixed SDK versions * Format code * format + api * Init noops if mixed versions detected * Add BuildConfig * config entries for agentless module sdk names * Add MANIFEST.MF for JARs * Throw on startup; use manifests for backend; reuse code for otel * Format code * Format code * changelog * api * changelog * Remove duplicate addPackage calls * remove test assertion for package * remove test assertion for package --------- Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
1 parent bfbc9e1 commit 98fbe0e

File tree

26 files changed

+0
-52
lines changed

26 files changed

+0
-52
lines changed

sentry-android-fragment/src/main/java/io/sentry/android/fragment/FragmentLifecycleIntegration.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ public class FragmentLifecycleIntegration(
5757
application.registerActivityLifecycleCallbacks(this)
5858
options.logger.log(DEBUG, "FragmentLifecycleIntegration installed.")
5959
addIntegrationToSdkVersion("FragmentLifecycle")
60-
SentryIntegrationPackageStorage.getInstance()
61-
.addPackage("maven:io.sentry:sentry-android-fragment", BuildConfig.VERSION_NAME)
6260
}
6361

6462
override fun close() {

sentry-android-navigation/src/main/java/io/sentry/android/navigation/SentryNavigationListener.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ public class SentryNavigationListener @JvmOverloads constructor(
5050

5151
init {
5252
addIntegrationToSdkVersion("NavigationListener")
53-
SentryIntegrationPackageStorage.getInstance()
54-
.addPackage("maven:io.sentry:sentry-android-navigation", BuildConfig.VERSION_NAME)
5553
}
5654

5755
override fun onDestinationChanged(

sentry-android-replay/src/main/java/io/sentry/android/replay/ReplayIntegration.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,6 @@ public class ReplayIntegration(
158158
}
159159

160160
addIntegrationToSdkVersion("Replay")
161-
SentryIntegrationPackageStorage.getInstance()
162-
.addPackage("maven:io.sentry:sentry-android-replay", BuildConfig.VERSION_NAME)
163161

164162
finalizePreviousReplay()
165163
}

sentry-android-timber/src/main/java/io/sentry/android/timber/SentryTimberIntegration.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ public class SentryTimberIntegration(
3535
Timber.plant(tree)
3636

3737
logger.log(SentryLevel.DEBUG, "SentryTimberIntegration installed.")
38-
SentryIntegrationPackageStorage.getInstance().addPackage("maven:io.sentry:sentry-android-timber", VERSION_NAME)
3938
addIntegrationToSdkVersion("Timber")
4039
}
4140

sentry-apollo-3/src/main/java/io/sentry/apollo3/SentryApollo3HttpInterceptor.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ class SentryApollo3HttpInterceptor @JvmOverloads constructor(
5353
SentryIntegrationPackageStorage.getInstance()
5454
.addIntegration("Apollo3ClientError")
5555
}
56-
SentryIntegrationPackageStorage.getInstance()
57-
.addPackage("maven:io.sentry:sentry-apollo-3", BuildConfig.VERSION_NAME)
5856
}
5957

6058
private val regex: Regex by lazy {

sentry-apollo-3/src/test/java/io/sentry/apollo3/SentryApollo3InterceptorTest.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,6 @@ class SentryApollo3InterceptorTest {
323323
fun `sets SDKVersion Info`() {
324324
assertNotNull(fixture.scopes.options.sdkVersion)
325325
assert(fixture.scopes.options.sdkVersion!!.integrationSet.contains("Apollo3"))
326-
val packageInfo = fixture.scopes.options.sdkVersion!!.packageSet.firstOrNull { pkg -> pkg.name == "maven:io.sentry:sentry-apollo-3" }
327-
assertNotNull(packageInfo)
328-
assert(packageInfo.version == BuildConfig.VERSION_NAME)
329326
}
330327

331328
@Test

sentry-apollo-4/src/main/java/io/sentry/apollo4/SentryApollo4HttpInterceptor.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ class SentryApollo4HttpInterceptor @JvmOverloads constructor(
5252
SentryIntegrationPackageStorage.getInstance()
5353
.addIntegration("Apollo4ClientError")
5454
}
55-
SentryIntegrationPackageStorage.getInstance()
56-
.addPackage("maven:io.sentry:sentry-apollo-4", BuildConfig.VERSION_NAME)
5755
}
5856

5957
private val regex: Regex by lazy {

sentry-apollo-4/src/test/java/io/sentry/apollo4/SentryApollo4HttpInterceptorTest.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,6 @@ abstract class SentryApollo4HttpInterceptorTest(
331331
fun `sets SDKVersion Info`() {
332332
assertNotNull(fixture.scopes.options.sdkVersion)
333333
assert(fixture.scopes.options.sdkVersion!!.integrationSet.contains("Apollo4"))
334-
val packageInfo = fixture.scopes.options.sdkVersion!!.packageSet.firstOrNull { pkg -> pkg.name == "maven:io.sentry:sentry-apollo-4" }
335-
assertNotNull(packageInfo)
336-
assert(packageInfo.version == BuildConfig.VERSION_NAME)
337334
}
338335

339336
@Test

sentry-apollo/src/main/java/io/sentry/apollo/SentryApolloInterceptor.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ class SentryApolloInterceptor(
4747

4848
init {
4949
addIntegrationToSdkVersion("Apollo")
50-
SentryIntegrationPackageStorage.getInstance().addPackage("maven:io.sentry:sentry-apollo", BuildConfig.VERSION_NAME)
5150
}
5251

5352
override fun interceptAsync(request: InterceptorRequest, chain: ApolloInterceptorChain, dispatcher: Executor, callBack: CallBack) {

sentry-compose-helper/src/jvmMain/java/io/sentry/compose/gestures/ComposeGestureTargetLocator.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ public final class ComposeGestureTargetLocator implements GestureTargetLocator {
4141
public ComposeGestureTargetLocator(final @NotNull ILogger logger) {
4242
this.logger = logger;
4343
SentryIntegrationPackageStorage.getInstance().addIntegration("ComposeUserInteraction");
44-
SentryIntegrationPackageStorage.getInstance()
45-
.addPackage("maven:io.sentry:sentry-compose", BuildConfig.VERSION_NAME);
4644
}
4745

4846
@Override

0 commit comments

Comments
 (0)