Commit 52898e0
authored
Prevent task registration collisions by checking for existing tasks before registering (#5)
* 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`.1 parent 6a57afc commit 52898e0
1 file changed
Lines changed: 44 additions & 67 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
79 | 36 | | |
80 | 37 | | |
81 | | - | |
82 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
83 | 42 | | |
84 | 43 | | |
85 | 44 | | |
86 | | - | |
87 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
88 | 49 | | |
89 | 50 | | |
90 | | - | |
91 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
92 | 55 | | |
93 | 56 | | |
94 | | - | |
95 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
96 | 61 | | |
97 | 62 | | |
98 | | - | |
99 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
100 | 67 | | |
101 | 68 | | |
102 | | - | |
103 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
104 | 73 | | |
105 | 74 | | |
106 | | - | |
107 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
108 | 79 | | |
109 | 80 | | |
110 | | - | |
111 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
112 | 85 | | |
113 | 86 | | |
114 | | - | |
115 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
116 | 91 | | |
117 | 92 | | |
118 | | - | |
119 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
120 | 97 | | |
0 commit comments