Skip to content
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

Add a way to change the default BindGenericAs. #90

Merged
merged 1 commit into from
Oct 1, 2023

Conversation

ansman
Copy link
Owner

@ansman ansman commented Oct 1, 2023

This new annotation, BindGenericAs.Default, can be placed on generic types to indicate how they should be bound by default.

@ansman ansman enabled auto-merge (squash) October 1, 2023 02:31
@ansman ansman disabled auto-merge October 1, 2023 02:31
@ansman ansman enabled auto-merge (squash) October 1, 2023 02:32
@ansman ansman force-pushed the feature/default-bind-generic-as branch 2 times, most recently from 01558a3 to b1d7638 Compare October 1, 2023 02:33
This new annotation, `BindGenericAs.Default`, can be placed on generic
types to indicate how they should be bound by default.
@ansman ansman force-pushed the feature/default-bind-generic-as branch from b1d7638 to 6dddc45 Compare October 1, 2023 02:39
@ansman ansman merged commit b720672 into main Oct 1, 2023
1 check passed
@ansman ansman deleted the feature/default-bind-generic-as branch October 1, 2023 02:45
renovate bot referenced this pull request in sindrenm/android-project-template Oct 1, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[se.ansman.dagger.auto:compiler](https://togithub.com/ansman/auto-dagger)
| `0.9.1` -> `0.10.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/se.ansman.dagger.auto:compiler/0.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/se.ansman.dagger.auto:compiler/0.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/se.ansman.dagger.auto:compiler/0.9.1/0.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/se.ansman.dagger.auto:compiler/0.9.1/0.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[se.ansman.dagger.auto:android](https://togithub.com/ansman/auto-dagger)
| `0.9.1` -> `0.10.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/se.ansman.dagger.auto:android/0.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/se.ansman.dagger.auto:android/0.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/se.ansman.dagger.auto:android/0.9.1/0.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/se.ansman.dagger.auto:android/0.9.1/0.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>ansman/auto-dagger (se.ansman.dagger.auto:compiler)</summary>

###
[`v0.10.0`](https://togithub.com/ansman/auto-dagger/releases/tag/0.10.0)

[Compare
Source](https://togithub.com/ansman/auto-dagger/compare/0.9.1...0.10.0)

##### Changes

##### ⚠️ **Breaking:** Rename of `BindGenericAs` entries ⚠️

`BindGenericAs.Type` has been renamed to `BindGenericAs.ExactType` and
`BindGenericAs.TypeAndWildcard` has been renamed to
`BindGenericAs.ExactTypeAndWildcard`.

These names are much clearer as `Type` wasn't really indicative of what
it did.

##### `BindGenericAs.Default`

There is now a new annotation called `@BindGenericAs.Default` which can
be placed on the target type to set the default value for
`BindGenericAs`.

As a quick example:

```kotlin
@&#8203;BindGenericAs.Default(BindGenericAs.Wildcard)
interface Resource<T>

// This will be bound as Resource<*> since the default has been set to wildcard for Resource.
@&#8203;AutoBindIntoSet
class SomeResource @&#8203;Inject constructor() : Resource<Something>
```

See [the
documentation](https://auto-dagger.ansman.se/0.10.0/usage/auto-bind/#generics)
for more information.

##### Details

- Remove the deprecated typealiases by
[@&#8203;ansman](https://togithub.com/ansman) in
[https://github.com/ansman/auto-dagger/pull/85](https://togithub.com/ansman/auto-dagger/pull/85)
- Bump androidx.lifecycle:lifecycle-viewmodel from 2.6.1 to 2.6.2 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/ansman/auto-dagger/pull/87](https://togithub.com/ansman/auto-dagger/pull/87)
- Add a way to change the default `BindGenericAs`. by
[@&#8203;ansman](https://togithub.com/ansman) in
[https://github.com/ansman/auto-dagger/pull/90](https://togithub.com/ansman/auto-dagger/pull/90)

**Full Changelog**:
ansman/auto-dagger@0.9.1...0.10.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/sindrenm/android-project-template).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjMiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant