-
-
Notifications
You must be signed in to change notification settings - Fork 468
Expand file tree
/
Copy pathSentryNdkUtil.java
More file actions
30 lines (25 loc) · 821 Bytes
/
SentryNdkUtil.java
File metadata and controls
30 lines (25 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package io.sentry.android.ndk;
import io.sentry.SentryIntegrationPackageStorage;
import io.sentry.protocol.SdkVersion;
import org.jetbrains.annotations.Nullable;
/**
* Util class to make SentryNdk testable, as SentryNdk inits native libraries and it breaks on init.
*/
final class SentryNdkUtil {
static {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-android-ndk", BuildConfig.VERSION_NAME);
}
private SentryNdkUtil() {}
/**
* Adds the sentry-android-ndk package into the package list
*
* @param sdkVersion the SdkVersion object
*/
static void addPackage(@Nullable final SdkVersion sdkVersion) {
if (sdkVersion == null) {
return;
}
sdkVersion.addPackage("maven:io.sentry:sentry-android-ndk", BuildConfig.VERSION_NAME);
}
}