Commit 8f3a671
authored
feat: Optional Jet Compose (#402)
## Summary
- Configure project so if customers didn't include Jet Compose library
then it wasn't activated
- Create flavor only XML Views test app
https://launchdarkly.atlassian.net/browse/O11Y-812
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Medium risk because it changes session-replay masking traversal and
Gradle dependency scoping to support apps without Compose; mistakes here
could break masking collection or cause runtime
`ClassNotFoundException`s in non-Compose apps.
>
> **Overview**
> Makes Jetpack Compose support *optional* in the Android observability
SDK by switching Compose UI artifacts to `compileOnly`, splitting the
masking API so Compose-specific extensions live in a new
`ComposeMaskingAPI.kt`, and guarding Compose traversal in
`MaskCollector` behind a runtime classpath check.
>
> Updates the Android E2E app to test both paths by adding
`compose`/`noCompose` product flavors, moving Compose
activities/launcher to a flavor manifest, and introducing a full
XML-based `MainActivity` + layout for the `noCompose` variant; CI is
adjusted to run the Compose-flavor unit tests.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
b7d268c. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 5ff93f6 commit 8f3a671
22 files changed
Lines changed: 639 additions & 75 deletions
File tree
- .github/workflows
- e2e/android/app
- src
- compose
- java/com/example/androidobservability
- masking
- ui/theme
- main
- res
- drawable
- values-night
- values
- noCompose
- java/com/example/androidobservability
- res/layout
- sdk/@launchdarkly/observability-android/lib
- src/main/kotlin/com/launchdarkly/observability
- api
- replay/masking
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
55 | 65 | | |
56 | 66 | | |
57 | 67 | | |
| |||
103 | 113 | | |
104 | 114 | | |
105 | 115 | | |
106 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
107 | 120 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
112 | 132 | | |
113 | 133 | | |
114 | | - | |
115 | 134 | | |
116 | 135 | | |
117 | 136 | | |
118 | 137 | | |
| 138 | + | |
119 | 139 | | |
120 | 140 | | |
121 | 141 | | |
122 | 142 | | |
123 | 143 | | |
124 | 144 | | |
125 | 145 | | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | 146 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
65 | 70 | | |
66 | 71 | | |
67 | 72 | | |
| 73 | + | |
68 | 74 | | |
69 | 75 | | |
70 | 76 | | |
71 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
72 | 100 | | |
73 | 101 | | |
74 | 102 | | |
| |||
0 commit comments