Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# 0.4.0 / 2026-05-30

* [IMPROVEMENT] Make `okhttp`, `gson` and `androidx.work:work-runtime` `compileOnly` dependencies so the SDK no longer forces specific versions on host apps. **Breaking:** integrating apps must now declare `okhttp` and `gson` themselves; `Datadog.initialize()` fails fast with `IllegalStateException` if either is missing. WorkManager remains optional — when absent the SDK logs a warning and disables background upload.
* [IMPROVEMENT] WorkManager presence/initialization is now detected safely (reflection on 2.8.0+, getInstance fallback on older versions) to support it being `compileOnly`.
* [FEATURE] Add no-op variants for Logs, Profiling, Flags, OpenFeature Flags and Session Replay (incl. Compose/Material) feature modules.

---

> The entries above are **FlashCat SDK** releases, versioned independently as `0.x`.
> Everything below is the inherited **upstream Datadog `dd-sdk-android`** changelog (`3.x`) that this fork tracks — kept for reference.

---

# 3.5.0 / 2026-01-08

* [FEATURE] RUM Debug Widget. See [#2943](https://github.com/DataDog/dd-sdk-android/pull/2943)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ object AndroidConfig {
}
// Local development or other branches → Snapshot
else -> {
Version(0, 3, 1, Version.Type.Snapshot)
Version(0, 4, 0, Version.Type.Snapshot)
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions dd-sdk-android-core/api/apiSurface
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,6 @@ fun <T> java.util.concurrent.Future<T>?.getSafe(String, com.datadog.android.api.
object com.datadog.android.core.internal.utils.JsonSerializer
fun toJsonElement(Any?): com.google.gson.JsonElement
fun Map<String, Any?>.safeMapValuesToJson(com.datadog.android.api.InternalLogger): Map<String, com.google.gson.JsonElement>
fun isInitialized(android.content.Context): Boolean
fun getWorkManagerOrNull(android.content.Context): androidx.work.WorkManager?
enum com.datadog.android.core.metrics.MethodCallSamplingRate
constructor(Float)
- ALL
Expand Down
5 changes: 0 additions & 5 deletions dd-sdk-android-core/api/dd-sdk-android-core.api
Original file line number Diff line number Diff line change
Expand Up @@ -890,11 +890,6 @@ public final class com/datadog/android/core/internal/utils/JsonSerializer {
public final fun toJsonElement (Ljava/lang/Object;)Lcom/google/gson/JsonElement;
}

public final class com/datadog/android/core/internal/utils/WorkManagerUtilsKt {
public static final fun getWorkManagerOrNull (Landroid/content/Context;)Landroidx/work/WorkManager;
public static final fun isInitialized (Landroid/content/Context;)Z
}

public final class com/datadog/android/core/metrics/MethodCallSamplingRate : java/lang/Enum {
public static final field ALL Lcom/datadog/android/core/metrics/MethodCallSamplingRate;
public static final field HIGH Lcom/datadog/android/core/metrics/MethodCallSamplingRate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ object Datadog {
Locale.US,
missingDependencies.joinToString(", ")
)
android.util.Log.e("Datadog", message)
Log.e("Datadog", message)
unboundInternalLogger.log(
InternalLogger.Level.ERROR,
InternalLogger.Target.USER,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
package com.datadog.android.core.internal.lifecycle

import android.content.Context
import androidx.work.WorkManager
import com.datadog.android.api.InternalLogger
import com.datadog.android.core.internal.utils.cancelUploadWorker
import com.datadog.android.core.internal.utils.isInitialized
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ private val officialIsInitializedMethod: Method? by lazy {
private var isInitializedCache: Boolean? = null

/**
* 判断 WorkManager 是否已初始化。
* 兼容 WorkManager 2.8.0+ (反射调用官方方法) 和旧版本 (try-catch getInstance)。
* 安全应对 compileOnly 导致的类缺失。
* Checks whether WorkManager has been initialized.
* Compatible with WorkManager 2.8.0+ (reflective call to the official method) and older versions
* (try-catch around getInstance). Safely handles the class being absent due to compileOnly.
*/
fun isInitialized(context: Context): Boolean {
internal fun isInitialized(context: Context): Boolean {
isInitializedCache?.let { return it }

if (!isClassAvailable) {
Expand Down Expand Up @@ -138,18 +138,3 @@ fun isInitialized(context: Context): Boolean {
false
}
}

/**
* 安全获取实例,如果未初始化或库不存在则返回 null
*/
fun getWorkManagerOrNull(context: Context): WorkManager? {
return if (isInitialized(context)) {
try {
WorkManager.getInstance(context)
} catch (e: Throwable) {
null
}
} else {
null
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
package com.datadog.android.error.internal

import android.content.Context
import androidx.work.WorkManager
import com.datadog.android.api.InternalLogger
import com.datadog.android.api.feature.Feature
import com.datadog.android.api.feature.FeatureSdkCore
Expand Down
Loading