Skip to content

Commit 6a57afc

Browse files
authored
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`.
1 parent 128c7d2 commit 6a57afc

1 file changed

Lines changed: 43 additions & 4 deletions

File tree

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

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,49 @@ tasks.named<Jar>("jar") {
2929
}
3030
}
3131

32-
val shadowJar = tasks.shadowJar
33-
artifacts {
34-
add("apiElements", shadowJar)
35-
add("runtimeElements", shadowJar)
32+
tasks.register("assembleDebug") {
33+
dependsOn("assemble")
34+
}
35+
36+
tasks.register("assembleRelease") {
37+
dependsOn("assemble")
38+
}
39+
40+
// Shadow tasks to satisfy Android aggregation tasks
41+
tasks.register("testDebugUnitTest") {
42+
dependsOn("test")
43+
}
44+
45+
tasks.register("testReleaseUnitTest") {
46+
dependsOn("test")
47+
}
48+
49+
tasks.register("lintRelease") {
50+
// No-op for this Java library
51+
}
52+
53+
tasks.register("checkDependencyLicenses") {
54+
// No-op for this Java library
55+
}
56+
57+
tasks.register("checkApiSurfaceChanges") {
58+
// No-op for this Java library
59+
}
60+
61+
tasks.register("checkCompilerMetadataChanges") {
62+
// No-op for this Java library
63+
}
64+
65+
tasks.register("checkTransitiveDependenciesList") {
66+
// No-op for this Java library
67+
}
68+
69+
tasks.register("koverXmlReportRelease") {
70+
// No-op or depends on koverXmlReport if applied
71+
}
72+
73+
tasks.register("printDetektClasspath") {
74+
// No-op
3675
}
3776

3877
tasks.register("assembleDebug") {

0 commit comments

Comments
 (0)