-
Notifications
You must be signed in to change notification settings - Fork 0
fix(ci): fix firebase exception wrapping, missing ADR doc, and gitignore #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,5 +20,4 @@ captures | |
| .pipeline/ | ||
| *.preferences_pb | ||
| /docs/superpowers/ | ||
| /docs/adr/ | ||
| /.claude/worktrees/ | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,21 @@ | ||||||
| # ADR 001: ConfigValues in Multi-Module Projects | ||||||
|
|
||||||
| **Status:** Accepted | ||||||
|
|
||||||
| ## Context | ||||||
|
|
||||||
| In multi-module Android/KMP projects, each feature module may declare its own `ConfigParam` flags. The question is how to compose these into a single `ConfigValues` instance that is shared across the app. | ||||||
|
|
||||||
| ## Decision | ||||||
|
|
||||||
| Each module declares its flags as top-level `ConfigParam` constants. A single `ConfigValues` instance is created at the app level (e.g., in the DI graph) by passing all params through the same providers. | ||||||
|
|
||||||
| The Gradle plugin generates a `FlagRegistrar` per module. The app module aggregates them via the generated `GeneratedFlagRegistry`, which collects every module's registrar at compile time. | ||||||
|
|
||||||
| Modules never create their own `ConfigValues`; they only declare params and read from the shared instance injected from the app layer. | ||||||
|
|
||||||
| ## Consequences | ||||||
|
|
||||||
| - Flag namespacing is flat — param names must be unique across all modules. | ||||||
| - There is one set of local/remote providers for the whole app; per-module providers are not supported. | ||||||
| - The Gradle plugin enforces uniqueness and generates the aggregation boilerplate automatically. | ||||||
|
||||||
| - The Gradle plugin enforces uniqueness and generates the aggregation boilerplate automatically. | |
| - The Gradle plugin currently serializes each module's declared flags, but it does not enforce cross-module uniqueness or generate an app-level aggregation boilerplate automatically. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ import com.google.firebase.remoteconfig.FirebaseRemoteConfigValue | |
| import dev.androidbroadcast.featured.ConfigParam | ||
| import dev.androidbroadcast.featured.ConfigValue | ||
| import dev.androidbroadcast.featured.RemoteConfigValueProvider | ||
| import kotlinx.coroutines.CancellationException | ||
| import kotlinx.coroutines.tasks.await | ||
| import kotlin.reflect.KClass | ||
|
|
||
|
|
@@ -98,7 +99,7 @@ public class FirebaseConfigValueProvider( | |
|
|
||
| try { | ||
| task.await() | ||
| } catch (e: RuntimeException) { | ||
| } catch (e: CancellationException) { | ||
| throw e | ||
| } catch (e: Exception) { | ||
| throw FetchException("Firebase Remote Config fetch failed", e) | ||
|
Comment on lines
100
to
105
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ADR’s “Decision” section describes flags as top-level
ConfigParamconstants and references an app-levelGeneratedFlagRegistry. In this repo, flags are typically declared via thefeatured { }Gradle DSL and the plugin generatesGenerated{Local,Remote}Flagsplus a per-moduleGeneratedFlagRegistrar; there doesn’t appear to be anyGeneratedFlagRegistrytype in the codebase. Please update the ADR to reflect the actual generated artifacts and how multi-module apps should wire things together (and avoid referencing non-existent symbols).