Skip to content

Prevent task registration collisions by checking for existing tasks before registering#5

Merged
Fiona2016 merged 10 commits intoflashcatcloud:publishfrom
wnny-indea:noop-logs-profiling-session-replay
Feb 26, 2026
Merged

Prevent task registration collisions by checking for existing tasks before registering#5
Fiona2016 merged 10 commits intoflashcatcloud:publishfrom
wnny-indea:noop-logs-profiling-session-replay

Conversation

@wnny-indea
Copy link

What does this PR do?

Prevent task registration collisions by checking for existing tasks before registering shadow and aggregation tasks in dd-sdk-android-dependencies/build.gradle.kts

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

…to provide empty implementations with minimal footprint.
- 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.
- 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.
* 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.
- 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
* 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` task artifacts from `apiElements` and `runtimeElements` configurations in `dd-sdk-android-dependencies/build.gradle.kts`.
…efore 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`.
@Fiona2016 Fiona2016 merged commit 52898e0 into flashcatcloud:publish Feb 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants