Skip to content

Commit b8c4a6e

Browse files
authored
fixes
1 parent d1b2761 commit b8c4a6e

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

contributor-docs/components/dependencies.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,14 @@ To declare a required dependency use the following in your `ComponentRegistrar`:
9595

9696
The provider will return `null` if the dependency is not present in the app.
9797

98-
{: warning }
98+
{: .warning }
9999
When the app uses [Play's dynamic feature delivery](https://developer.android.com/guide/playcore/feature-delivery),
100100
`provider.get()` can return your dependency when it becomes available, so be prepared for that.
101101
And don't store references to the result of `provider.get()` calls.
102102

103103
See [Dynamic Module Support]({{ site.baseurl }}{% link components/dynamic_modules.md %}) for details
104104

105-
{: warning }
105+
{: .warning }
106106
See Deferred dependencies if you your dependency has a callback based apis
107107

108108
## Deferred Dependencies
@@ -166,7 +166,7 @@ To consume such a set the interested `Component` needs to declare a special kind
166166
is that the `Set` is not initialized until the first call to `provider.get()` at which point all elements of the
167167
set will get initialized.
168168

169-
{: warning }
169+
{: .warning }
170170
Similar to optional `Provider` dependencies, where an optional dependency can become available at runtime due to
171171
[Play's dynamic feature delivery](https://developer.android.com/guide/playcore/feature-delivery),
172172
`Set` dependencies can change at runtime by new elements getting added to the set.

contributor-docs/onboarding/new_sdk.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ For Kotlin
188188
class FirebaseFooRegistrar : ComponentRegistrar {
189189
override fun getComponents() =
190190
listOf(
191-
Component.builder(FirebaseFoo::class.java).factory { container -> FirebaseFoo() }.build()
191+
Component.builder(FirebaseFoo::class.java).factory { container -> FirebaseFoo() }.build(),
192+
LibraryVersionComponent.create("fire-foo", BuildConfig.VERSION_NAME)
192193
)
193194
}
194195
```
@@ -205,8 +206,10 @@ For Java
205206
public class FirebaseFooRegistrar implements ComponentRegistrar {
206207
@Override
207208
public List<Component<?>> getComponents() {
208-
return Collections.singletonList(
209-
Component.builder(FirebaseFoo.class).factory(c -> new FirebaseFoo()).build());
209+
return Arrays.asList(
210+
Component.builder(FirebaseFoo.class).factory(c -> new FirebaseFoo()).build(),
211+
LibraryVersionComponent.create("fire-foo", BuildConfig.VERSION_NAME));
212+
210213
}
211214
}
212215
```

0 commit comments

Comments
 (0)