Commit 1c69dc8
feat(android-distribution): Add module foundation with compilation stubs (#4712)
* feat(android-distribution): Add module foundation with compilation stubs
This PR establishes the foundational structure for the sentry-android-distribution module with compilation stubs that enable parallel development of individual components.
### Changes
- Android module configuration with necessary dependencies
- AndroidManifest.xml with ContentProvider for auto-initialization
- Distribution object with init(), isEnabled(), checkForUpdate() methods
- DistributionOptions data class for configuration
- UpdateStatus sealed class for result types
- UpdateInfo data class for update details
- Internal stub implementations that compile successfully
### Implementation Strategy
- All methods return placeholder errors ("Implementation coming in future PR")
- Follows zero-dependency design (only depends on sentry module)
- Enables parallel development of binary identifier, HTTP client, API models, and core logic
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* feat(android-distribution): Address PR feedback
- Fix ActivityNotFoundException in downloadUpdate method
- Update AndroidManifest provider to use shorter naming convention
- Add EmptySecureContentProvider for security
- Convert DistributionOptions from data class to regular class
- Add initOrder comment explaining initialization sequence
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* Format code
* feat(android-distribution): Improve API design based on review feedback
- Add lambda-based init pattern matching SentryAndroid.init
- Rename checkForUpdate to checkForUpdateBlocking for clarity
- Replace CompletableFuture with simple callback approach
- Convert DistributionOptions to mutable builder pattern
- Add example for buildConfiguration parameter
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* feat(android-distribution): Add automatic integration and top-level API
- Add automatic distribution module detection in SentryAndroid.java
- Create DistributionIntegration for seamless auto-enablement when module present
- Add Sentry.distribution() top-level API using reflection for build-time safety
- Remove ContentProvider approach in favor of Integration pattern
- Update Distribution API to use callback-based async methods
- Fix ActivityNotFoundException handling in downloadUpdate method
Follows existing patterns from replay/timber/fragment integrations for consistency.
Module works automatically when included, provides compile errors when not.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* Format code
* refactor: Remove unnecessary sentry-android-core dependency and use direct instantiation
- Remove sentry-android-core dependency from distribution module (only needs sentry module)
- Add distribution as compileOnly dependency in sentry-android-core
- Use direct DistributionIntegration instantiation instead of reflection
- Eliminates circular dependency and follows same pattern as other integrations
The distribution module only needs Integration/IScopes/SentryOptions from core sentry,
not anything from sentry-android-core, making the architecture cleaner.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* style: Apply spotless formatting
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* docs: Remove PR submission plan
No longer needed since this is a single PR implementation.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* Fix failing CI tests by adding missing isDistributionAvailable parameter
Added the missing isDistributionAvailable parameter (set to false) to installDefaultIntegrations method calls in test files to fix compilation errors.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* Add distribution() method to API signature file
Update sentry.api to include the new distribution() method signature to fix apiCheck failure.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* Fix R8 minification failure with consumer ProGuard rule for DistributionIntegration
Added consumer ProGuard rule in sentry-android-core to handle missing DistributionIntegration class when the distribution module is not included. This follows the same pattern used for other optional integrations like Replay and Timber.
* Update API dump for distribution module
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
---------
Co-authored-by: Claude <[email protected]>
Co-authored-by: Sentry Github Bot <[email protected]>1 parent 23d6b12 commit 1c69dc8
File tree
19 files changed
+305
-3
lines changed- sentry-android-core
- src
- main/java/io/sentry/android/core
- test/java/io/sentry/android/core
- sentry-android-distribution
- api
- src/main
- java/io/sentry/android/distribution
- internal
- sentry
- api
- src/main/java/io/sentry
19 files changed
+305
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
321 | 322 | | |
322 | 323 | | |
323 | 324 | | |
324 | | - | |
| 325 | + | |
| 326 | + | |
325 | 327 | | |
326 | 328 | | |
327 | 329 | | |
| |||
391 | 393 | | |
392 | 394 | | |
393 | 395 | | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
394 | 399 | | |
395 | 400 | | |
396 | 401 | | |
| |||
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
| 117 | + | |
| 118 | + | |
114 | 119 | | |
115 | 120 | | |
116 | 121 | | |
| |||
131 | 136 | | |
132 | 137 | | |
133 | 138 | | |
134 | | - | |
| 139 | + | |
| 140 | + | |
135 | 141 | | |
136 | 142 | | |
137 | 143 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| |||
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
| 153 | + | |
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
| |||
820 | 822 | | |
821 | 823 | | |
822 | 824 | | |
| 825 | + | |
823 | 826 | | |
824 | 827 | | |
825 | 828 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
| |||
Lines changed: 75 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 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 | + | |
| 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 | + | |
2 | 76 | | |
| 77 | + | |
3 | 78 | | |
4 | 79 | | |
0 commit comments