Skip to content

Commit f84df1f

Browse files
Fix publish (#13)
* Publish new (#1) * feat: change group id * feat: update maven plugin * feat: flashcat site * chore: configure SDK v0.3.0 release settings - Exclude logs, flags, session-replay modules from publishing - Update version to 0.3.0 with dynamic versioning from git tags - Add JVM --add-opens for java.lang.invoke to fix JDK 17+ reflection - Comment out excluded module dependencies in samples and integration tests - Exclude sample projects from build (depend on removed features) * feat: add ding notify * chore: update GitHub Actions trigger branch to publish Update workflows to trigger on the publish branch instead of publish-new: - publish-maven.yml: Change publish trigger branch - codeql-analysis.yml: Change push and pull request target branches * Add "No-Op" modules for Session Replay, Logs, and Profiling features to provide empty implementations with minimal footprint. * refactor: optimize dependency isolation and compatibility - Downgrade androidx.core to 1.12.0 and move key dependencies (Gson, OkHttp, WorkManager) to compileOnly scope to reduce SDK footprint and avoid version conflicts. - Implement WorkManagerUtils with reflection-based safe initialization check to handle optional WorkManager dependency. - Update API surface and transitive dependency lists across multiple modules. - Fix Detekt configuration to handle missing classpath files gracefully. - Bump SDK version to 0.3.1-SNAPSHOT. * Enable Logging, Session Replay, and Feature Flags in sample applications - Add `setApplicationLaunchSampleRate` and `useCustomEndpoint` to `ProfilingConfiguration.Builder` in the no-op profiling module. - Uncomment and enable Log, Session Replay, Feature Flag, and Timber integration dependencies across multiple sample modules (automotive, benchmark, kotlin, tv, vendor-lib, wear). - Restore initialization code for Logs, Session Replay, and Timber in sample application classes. - Downgrade several transitive dependencies (e.g., Gson, OkHttp, Okio, and various AndroidX libraries) to older versions across multiple modules. - Include `:features:dd-sdk-android-flags` and related modules in the global settings. - Implement a dependency substitution rule in the Kotlin sample to use no-op logs when appropriate. * Add no-op implementations for Feature Flags and OpenFeature modules * feat: add `dd-sdk-android-flags-noop` module - Provides a no-op implementation of the Flags SDK to allow safe compilation without the full feature. - Includes core interfaces: `FlagsClient`, `FlagsConfiguration`, `EvaluationContext`, and `ResolutionDetails`. - Defines `NoOpFlagsClient` which returns default values for all flag evaluations. * feat: add `dd-sdk-android-flags-openfeature-noop` module - Provides a no-op implementation of the OpenFeature provider. - Includes `DatadogFlagsProvider` which implements `FeatureProvider` by returning default values. - Adds `asOpenFeatureProvider()` extension on `FlagsClient`. * chore: update sample application - Configure Kotlin sample to use `noop` variants for the `noop` build flavor. - Uncomment and initialize Feature Flags in `SampleApplication.kt` using the new APIs. * build: include new modules in project settings and build configurations. * Noop logs profiling session replay (#2) * Add "No-Op" modules for Session Replay, Logs, and Profiling features to provide empty implementations with minimal footprint. * refactor: optimize dependency isolation and compatibility - Downgrade androidx.core to 1.12.0 and move key dependencies (Gson, OkHttp, WorkManager) to compileOnly scope to reduce SDK footprint and avoid version conflicts. - Implement WorkManagerUtils with reflection-based safe initialization check to handle optional WorkManager dependency. - Update API surface and transitive dependency lists across multiple modules. - Fix Detekt configuration to handle missing classpath files gracefully. - Bump SDK version to 0.3.1-SNAPSHOT. * Enable Logging, Session Replay, and Feature Flags in sample applications - Add `setApplicationLaunchSampleRate` and `useCustomEndpoint` to `ProfilingConfiguration.Builder` in the no-op profiling module. - Uncomment and enable Log, Session Replay, Feature Flag, and Timber integration dependencies across multiple sample modules (automotive, benchmark, kotlin, tv, vendor-lib, wear). - Restore initialization code for Logs, Session Replay, and Timber in sample application classes. - Downgrade several transitive dependencies (e.g., Gson, OkHttp, Okio, and various AndroidX libraries) to older versions across multiple modules. - Include `:features:dd-sdk-android-flags` and related modules in the global settings. - Implement a dependency substitution rule in the Kotlin sample to use no-op logs when appropriate. * Add no-op implementations for Feature Flags and OpenFeature modules * feat: add `dd-sdk-android-flags-noop` module - Provides a no-op implementation of the Flags SDK to allow safe compilation without the full feature. - Includes core interfaces: `FlagsClient`, `FlagsConfiguration`, `EvaluationContext`, and `ResolutionDetails`. - Defines `NoOpFlagsClient` which returns default values for all flag evaluations. * feat: add `dd-sdk-android-flags-openfeature-noop` module - Provides a no-op implementation of the OpenFeature provider. - Includes `DatadogFlagsProvider` which implements `FeatureProvider` by returning default values. - Adds `asOpenFeatureProvider()` extension on `FlagsClient`. * chore: update sample application - Configure Kotlin sample to use `noop` variants for the `noop` build flavor. - Uncomment and initialize Feature Flags in `SampleApplication.kt` using the new APIs. * build: include new modules in project settings and build configurations. * Update build configuration and test dependencies across SDK modules - Add missing test dependencies (`gson`, `okHttp`, `fresco`, `robolectric`) to multiple feature modules - Update `dd-sdk-android-profiling` to use version catalog for AndroidX Core dependencies - Add several unit test exclusions in `dd-sdk-android-flags` and `dd-sdk-android-internal` - Register no-op and alias tasks in `dd-sdk-android-dependencies` to support Android aggregation tasks (assemble, lint, test, etc.) - Define new AndroidX core versions and modules in `libs.versions.toml` - Temporarily comment out `WorkerParametersForgeryFactory` in core tests * Update shadowJar configuration and dependencies * chore: update shadowJar and jar tasks - Change shadowJar archive classifier to "all" - Configure jar task to depend on and include contents of shadowJar (excluding manifest) * chore: update transitive dependencies - Add okhttp, okio, and collection to dd-sdk-android-flags-noop - Add coroutines and kotlin-stdlib-jdk variants to dd-sdk-android-flags-openfeature-noop * Noop logs profiling session replay (#3) * Add "No-Op" modules for Session Replay, Logs, and Profiling features to provide empty implementations with minimal footprint. * refactor: optimize dependency isolation and compatibility - Downgrade androidx.core to 1.12.0 and move key dependencies (Gson, OkHttp, WorkManager) to compileOnly scope to reduce SDK footprint and avoid version conflicts. - Implement WorkManagerUtils with reflection-based safe initialization check to handle optional WorkManager dependency. - Update API surface and transitive dependency lists across multiple modules. - Fix Detekt configuration to handle missing classpath files gracefully. - Bump SDK version to 0.3.1-SNAPSHOT. * Enable Logging, Session Replay, and Feature Flags in sample applications - Add `setApplicationLaunchSampleRate` and `useCustomEndpoint` to `ProfilingConfiguration.Builder` in the no-op profiling module. - Uncomment and enable Log, Session Replay, Feature Flag, and Timber integration dependencies across multiple sample modules (automotive, benchmark, kotlin, tv, vendor-lib, wear). - Restore initialization code for Logs, Session Replay, and Timber in sample application classes. - Downgrade several transitive dependencies (e.g., Gson, OkHttp, Okio, and various AndroidX libraries) to older versions across multiple modules. - Include `:features:dd-sdk-android-flags` and related modules in the global settings. - Implement a dependency substitution rule in the Kotlin sample to use no-op logs when appropriate. * Add no-op implementations for Feature Flags and OpenFeature modules * feat: add `dd-sdk-android-flags-noop` module - Provides a no-op implementation of the Flags SDK to allow safe compilation without the full feature. - Includes core interfaces: `FlagsClient`, `FlagsConfiguration`, `EvaluationContext`, and `ResolutionDetails`. - Defines `NoOpFlagsClient` which returns default values for all flag evaluations. * feat: add `dd-sdk-android-flags-openfeature-noop` module - Provides a no-op implementation of the OpenFeature provider. - Includes `DatadogFlagsProvider` which implements `FeatureProvider` by returning default values. - Adds `asOpenFeatureProvider()` extension on `FlagsClient`. * chore: update sample application - Configure Kotlin sample to use `noop` variants for the `noop` build flavor. - Uncomment and initialize Feature Flags in `SampleApplication.kt` using the new APIs. * build: include new modules in project settings and build configurations. * Update build configuration and test dependencies across SDK modules - Add missing test dependencies (`gson`, `okHttp`, `fresco`, `robolectric`) to multiple feature modules - Update `dd-sdk-android-profiling` to use version catalog for AndroidX Core dependencies - Add several unit test exclusions in `dd-sdk-android-flags` and `dd-sdk-android-internal` - Register no-op and alias tasks in `dd-sdk-android-dependencies` to support Android aggregation tasks (assemble, lint, test, etc.) - Define new AndroidX core versions and modules in `libs.versions.toml` - Temporarily comment out `WorkerParametersForgeryFactory` in core tests * Update shadowJar configuration and dependencies * chore: update shadowJar and jar tasks - Change shadowJar archive classifier to "all" - Configure jar task to depend on and include contents of shadowJar (excluding manifest) * chore: update transitive dependencies - Add okhttp, okio, and collection to dd-sdk-android-flags-noop - Add coroutines and kotlin-stdlib-jdk variants to dd-sdk-android-flags-openfeature-noop * Remove shadowJar artifacts from API and runtime elements - Remove `shadowJar` task artifacts from `apiElements` and `runtimeElements` configurations in `dd-sdk-android-dependencies/build.gradle.kts`. * Remove shadowJar artifacts from API and runtime elements (#4) * Add "No-Op" modules for Session Replay, Logs, and Profiling features to provide empty implementations with minimal footprint. * refactor: optimize dependency isolation and compatibility - Downgrade androidx.core to 1.12.0 and move key dependencies (Gson, OkHttp, WorkManager) to compileOnly scope to reduce SDK footprint and avoid version conflicts. - Implement WorkManagerUtils with reflection-based safe initialization check to handle optional WorkManager dependency. - Update API surface and transitive dependency lists across multiple modules. - Fix Detekt configuration to handle missing classpath files gracefully. - Bump SDK version to 0.3.1-SNAPSHOT. * Enable Logging, Session Replay, and Feature Flags in sample applications - Add `setApplicationLaunchSampleRate` and `useCustomEndpoint` to `ProfilingConfiguration.Builder` in the no-op profiling module. - Uncomment and enable Log, Session Replay, Feature Flag, and Timber integration dependencies across multiple sample modules (automotive, benchmark, kotlin, tv, vendor-lib, wear). - Restore initialization code for Logs, Session Replay, and Timber in sample application classes. - Downgrade several transitive dependencies (e.g., Gson, OkHttp, Okio, and various AndroidX libraries) to older versions across multiple modules. - Include `:features:dd-sdk-android-flags` and related modules in the global settings. - Implement a dependency substitution rule in the Kotlin sample to use no-op logs when appropriate. * Add no-op implementations for Feature Flags and OpenFeature modules * feat: add `dd-sdk-android-flags-noop` module - Provides a no-op implementation of the Flags SDK to allow safe compilation without the full feature. - Includes core interfaces: `FlagsClient`, `FlagsConfiguration`, `EvaluationContext`, and `ResolutionDetails`. - Defines `NoOpFlagsClient` which returns default values for all flag evaluations. * feat: add `dd-sdk-android-flags-openfeature-noop` module - Provides a no-op implementation of the OpenFeature provider. - Includes `DatadogFlagsProvider` which implements `FeatureProvider` by returning default values. - Adds `asOpenFeatureProvider()` extension on `FlagsClient`. * chore: update sample application - Configure Kotlin sample to use `noop` variants for the `noop` build flavor. - Uncomment and initialize Feature Flags in `SampleApplication.kt` using the new APIs. * build: include new modules in project settings and build configurations. * Update build configuration and test dependencies across SDK modules - Add missing test dependencies (`gson`, `okHttp`, `fresco`, `robolectric`) to multiple feature modules - Update `dd-sdk-android-profiling` to use version catalog for AndroidX Core dependencies - Add several unit test exclusions in `dd-sdk-android-flags` and `dd-sdk-android-internal` - Register no-op and alias tasks in `dd-sdk-android-dependencies` to support Android aggregation tasks (assemble, lint, test, etc.) - Define new AndroidX core versions and modules in `libs.versions.toml` - Temporarily comment out `WorkerParametersForgeryFactory` in core tests * Update shadowJar configuration and dependencies * chore: update shadowJar and jar tasks - Change shadowJar archive classifier to "all" - Configure jar task to depend on and include contents of shadowJar (excluding manifest) * chore: update transitive dependencies - Add okhttp, okio, and collection to dd-sdk-android-flags-noop - Add coroutines and kotlin-stdlib-jdk variants to dd-sdk-android-flags-openfeature-noop * Remove shadowJar artifacts from API and runtime elements - Remove `shadowJar` task artifacts from `apiElements` and `runtimeElements` configurations in `dd-sdk-android-dependencies/build.gradle.kts`. * Prevent task registration collisions by checking for existing tasks before registering shadow and aggregation tasks in `dd-sdk-android-dependencies/build.gradle.kts`. * Update task registration for `assembleDebug`, `assembleRelease`, `testDebugUnitTest`, and `testReleaseUnitTest` to use conditional checks. * Apply the same conditional logic to no-op tasks including `lintRelease`, `checkDependencyLicenses`, `checkApiSurfaceChanges`, `checkCompilerMetadataChanges`, `checkTransitiveDependenciesList`, `koverXmlReportRelease`, and `printDetektClasspath`. * fix(build): resolve R8 conflicts, missing test dependencies, and JDK compatibility issues * Fix R8 "defined multiple times" error by optimizing shadowJar configurations. * Fix WorkManager 2.7.1 unit test compilation and runtime errors. * Enhance reflection tools for JDK 17+ compatibility. * Globally add missing test dependencies (Gson/OkHttp) to fix NoClassDefFoundError in feature and integration modules. * Add Proguard -dontwarn rules for missing classes in reliability tests. * Re-enable publishing and logs/session-replay features * chore: enable publishing for feature flags modules - Uncomment `publishingConfig` in `dd-sdk-android-flags` - Uncomment `publishingConfig` in `dd-sdk-android-flags-openfeature` * feat: restore logs and session-replay in sample applications - Re-enable `dd-sdk-android-logs` dependency and implementation across `vendor-lib`, `benchmark`, `automotive`, `tv`, and `wear` samples - Re-enable `dd-sdk-android-session-replay` (and material/compose variants) in `benchmark` and `tv` samples - Uncomment Log and Session Replay initialization and usage in `LocalServer.kt` and `TvSampleApplication.kt` - Restore Timber integration in the `tv` sample * feat: Publish dd-sdk-android-dependencies artifact Enable publishing for the `dd-sdk-android-dependencies` module. This configures the `maven-publish` plugin to create and publish a shadow JAR containing all transitive dependencies. * Enable publishing for Session Replay and Logs modules - Uncomment `publishingConfig` in `dd-sdk-android-session-replay-compose` - Uncomment `publishingConfig` in `dd-sdk-android-session-replay` - Uncomment `publishingConfig` in `dd-sdk-android-logs` - Uncomment `publishingConfig` in `dd-sdk-android-session-replay-material` * Configure Maven Central publishing and signing for shaded dependencies - Add `com.vanniktech.maven.publish.base` plugin for Maven Central Portal integration - Implement manual Maven publication for the shadow JAR including POM metadata (license, organization, developer, and SCM info) - Add signing configuration using GPG environment variables (`GPG_PRIVATE_KEY`, `GPG_PASSWORD`) - Ensure signing is skipped for local publications or when `dd-skip-signing` is set * Refactor Maven publishing configuration - Introduce `basePublishingConfig` helper in `MavenConfig.kt` to deduplicate logic between Android and Java publishing - Add `publishingJavaConfig` to support Java library publishing via the Vanniktech plugin - Refactor `dd-sdk-android-dependencies` to use the new `publishingJavaConfig` helper - Simplify manual publication in `dd-sdk-android-dependencies` by leveraging common configuration and removing redundant signing/POM setup * Add new configuration options to SessionReplayConfiguration Builder - Add constructors to support setting `sampleRate` with a default of 100.0f - Add `setDynamicOptimizationEnabled(Boolean)` to control Session Replay data recording optimizations - Add `setSystemRequirements(SystemRequirementsConfiguration)` to define minimum device criteria for enabling the feature - Add `startRecordingImmediately(Boolean)` to control whether recording starts automatically or manually --------- Co-authored-by: Fiona <baiyang.feng@outlook.com>
1 parent 6782842 commit f84df1f

3 files changed

Lines changed: 96 additions & 79 deletions

File tree

buildSrc/src/main/kotlin/com/datadog/gradle/config/MavenConfig.kt

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@
77
package com.datadog.gradle.config
88

99
import com.vanniktech.maven.publish.AndroidSingleVariantLibrary
10+
import com.vanniktech.maven.publish.JavaLibrary
11+
import com.vanniktech.maven.publish.JavadocJar
1012
import com.vanniktech.maven.publish.MavenPublishBaseExtension
1113
import org.gradle.api.Project
1214
import org.gradle.api.publish.PublishingExtension
15+
import org.gradle.api.publish.maven.MavenPublication
1316
import org.gradle.kotlin.dsl.configure
1417
import org.gradle.kotlin.dsl.findByType
18+
import org.gradle.kotlin.dsl.get
1519
import org.gradle.plugins.signing.SigningExtension
1620

1721
object MavenConfig {
@@ -23,20 +27,47 @@ fun Project.publishingConfig(
2327
projectDescription: String,
2428
customArtifactId: String = name
2529
) {
26-
val projectName = name
27-
28-
// Apply Vanniktech plugin
29-
pluginManager.apply("com.vanniktech.maven.publish.base")
30-
31-
// Configure Android Library publishing (sources + javadoc)
32-
configure<MavenPublishBaseExtension> {
30+
basePublishingConfig(projectDescription, customArtifactId) {
3331
configure(
3432
AndroidSingleVariantLibrary(
3533
variant = "release",
3634
sourcesJar = true,
3735
publishJavadocJar = true
3836
)
3937
)
38+
}
39+
}
40+
41+
fun Project.publishingJavaConfig(
42+
projectDescription: String,
43+
customArtifactId: String = name,
44+
useJavaLibraryPlatform: Boolean = true
45+
) {
46+
basePublishingConfig(projectDescription, customArtifactId) {
47+
if (useJavaLibraryPlatform) {
48+
configure(
49+
JavaLibrary(
50+
sourcesJar = true,
51+
javadocJar = JavadocJar.Javadoc()
52+
)
53+
)
54+
}
55+
}
56+
}
57+
58+
private fun Project.basePublishingConfig(
59+
projectDescription: String,
60+
customArtifactId: String,
61+
platformConfig: MavenPublishBaseExtension.() -> Unit
62+
) {
63+
val projectName = name
64+
65+
// Apply Vanniktech plugin
66+
pluginManager.apply("com.vanniktech.maven.publish.base")
67+
68+
// Configure publishing
69+
configure<MavenPublishBaseExtension> {
70+
platformConfig()
4071

4172
// Coordinates
4273
coordinates(

dd-sdk-android-dependencies/build.gradle.kts

Lines changed: 8 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,14 @@
44
* Copyright 2016-Present Datadog, Inc.
55
*/
66

7-
import com.datadog.gradle.config.AndroidConfig
87
import com.datadog.gradle.config.MavenConfig
9-
import com.vanniktech.maven.publish.MavenPublishBaseExtension
10-
import java.util.Base64
8+
import com.datadog.gradle.config.publishingJavaConfig
119

1210
plugins {
1311
`java-library`
1412
id("com.gradleup.shadow")
1513
`maven-publish`
1614
signing
17-
id("com.vanniktech.maven.publish.base")
1815
}
1916

2017
dependencies {
@@ -38,83 +35,22 @@ tasks.shadowJar {
3835
configurations = listOf(project.configurations.runtimeClasspath.get())
3936
}
4037

41-
// Use Vanniktech plugin ONLY for Maven Central Portal repository setup (not for artifact configuration)
42-
// This ensures the same publishToSonatype / Central Portal API is used as other modules
43-
configure<MavenPublishBaseExtension> {
44-
publishToMavenCentral(automaticRelease = false)
45-
}
38+
// Configure publishing using common helper
39+
// useJavaLibraryPlatform = false because we manually configure the publication to use shadowJar
40+
publishingJavaConfig(
41+
projectDescription = "Shaded dependencies for FlashCat Android SDK",
42+
useJavaLibraryPlatform = false
43+
)
4644

4745
// Manual publication configuration with shadow jar as the artifact
4846
publishing {
4947
publications {
50-
register<MavenPublication>("maven") {
51-
groupId = MavenConfig.GROUP_ID
52-
artifactId = project.name
53-
version = AndroidConfig.VERSION.name
54-
48+
register<MavenPublication>(MavenConfig.PUBLICATION) {
5549
artifact(tasks.shadowJar)
56-
57-
pom {
58-
name.set(project.name)
59-
description.set("Shaded dependencies for FlashCat Android SDK")
60-
inceptionYear.set("2026")
61-
url.set("https://github.com/flashcatcloud/fc-sdk-android/")
62-
63-
licenses {
64-
license {
65-
name.set("The Apache License, Version 2.0")
66-
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
67-
distribution.set("repo")
68-
}
69-
}
70-
71-
organization {
72-
name.set("FlashCat")
73-
url.set("https://flashcat.cloud/")
74-
}
75-
76-
developers {
77-
developer {
78-
id.set("flashcat")
79-
name.set("FlashCat")
80-
email.set("support@flashcat.cloud")
81-
organization.set("FlashCat")
82-
organizationUrl.set("https://flashcat.cloud/")
83-
}
84-
}
85-
86-
scm {
87-
url.set("https://github.com/flashcatcloud/fc-sdk-android/")
88-
connection.set("scm:git:git@github.com:flashcatcloud/fc-sdk-android.git")
89-
developerConnection.set("scm:git:git@github.com:flashcatcloud/fc-sdk-android.git")
90-
}
91-
}
9250
}
9351
}
9452
}
9553

96-
// Signing configuration (consistent with MavenConfig.publishingConfig())
97-
signing {
98-
val isLocalPublish = gradle.startParameter.taskNames.any {
99-
it.contains("publishToMavenLocal", ignoreCase = true)
100-
}
101-
isRequired = !hasProperty("dd-skip-signing") && !isLocalPublish
102-
103-
val privateKey = System.getenv("GPG_PRIVATE_KEY")
104-
val password = System.getenv("GPG_PASSWORD")
105-
106-
if (privateKey != null && password != null) {
107-
val decodedKey = try {
108-
String(Base64.getDecoder().decode(privateKey))
109-
} catch (e: Exception) {
110-
privateKey // Already decoded / plain text
111-
}
112-
useInMemoryPgpKeys(decodedKey, password)
113-
}
114-
115-
sign(publishing.publications["maven"])
116-
}
117-
11854
// Force the shadowJar to be the ONLY exported artifact for this module
11955
// This prevents R8 duplicate class errors while ensuring the file exists for KSP
12056
configurations.apiElements {

features/dd-sdk-android-session-replay-noop/src/main/kotlin/com/datadog/android/sessionreplay/SessionReplayConfiguration.kt

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
package com.datadog.android.sessionreplay
88

9+
import androidx.annotation.FloatRange
10+
import com.datadog.android.api.InternalLogger
11+
912
/**
1013
* Describes configuration to be used for the Session Replay feature.
1114
*/
@@ -16,6 +19,25 @@ class SessionReplayConfiguration internal constructor() {
1619
* A Builder class for a [SessionReplayConfiguration].
1720
*/
1821
class Builder {
22+
/**
23+
* Calling this constructor will default to a 100% session sampling rate.
24+
*/
25+
constructor() : this(100.0f, InternalLogger.UNBOUND)
26+
27+
/**
28+
* @param sampleRate must be a value between 0 and 100. A value of 0
29+
* means no session will be recorded, 100 means all sessions will be recorded.
30+
* If this value is not provided then Session Replay will default to a 100 sample rate.
31+
*/
32+
constructor(
33+
@FloatRange(from = 0.0, to = 100.0) sampleRate: Float = 100.0f
34+
) : this(sampleRate, InternalLogger.UNBOUND)
35+
36+
internal constructor(
37+
@FloatRange(from = 0.0, to = 100.0) sampleRate: Float,
38+
logger: InternalLogger
39+
) {
40+
}
1941

2042
/**
2143
* Sets the sample rate for this feature.
@@ -87,6 +109,34 @@ class SessionReplayConfiguration internal constructor() {
87109
return this
88110
}
89111

112+
/**
113+
* This option controls whether optimization is enabled or disabled for recording Session Replay data.
114+
* By default the value is true, meaning the dynamic optimization is enabled.
115+
*/
116+
fun setDynamicOptimizationEnabled(dynamicOptimizationEnabled: Boolean): Builder {
117+
return this
118+
}
119+
120+
/**
121+
* Defines the minimum system requirements for enabling the Session Replay feature.
122+
* When [SessionReplay.enable] is invoked, the system configuration is verified against these requirements.
123+
* If the system meets the specified criteria, Session Replay will be successfully enabled.
124+
* If this function is not invoked, no minimum requirements will be enforced, and Session Replay will be
125+
* enabled on all devices.
126+
*/
127+
fun setSystemRequirements(systemRequirementsConfiguration: SystemRequirementsConfiguration): Builder {
128+
return this
129+
}
130+
131+
/**
132+
* Should recording start automatically (or be manually started).
133+
* If not specified then by default it starts automatically.
134+
* @param enabled whether recording should start automatically or not.
135+
*/
136+
fun startRecordingImmediately(enabled: Boolean): Builder {
137+
return this
138+
}
139+
90140
/**
91141
* Builds a [SessionReplayConfiguration] based on the current state of this Builder.
92142
*/

0 commit comments

Comments
 (0)