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

Bump dagger-compiler from 2.28.3 to 2.33 #102

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 18, 2021

Bumps dagger-compiler from 2.28.3 to 2.33.

Release notes

Sourced from dagger-compiler's releases.

Dagger 2.33

What’s New in Dagger

Bug fixes

What’s New in Hilt

Hilt is now in Beta!

Previously, Hilt has been in Alpha, and it is now officially in Beta. This means that there will be no further changes to the APIs until after Hilt becomes stable. We’ll focus on bug fixes and getting Hilt into a stable release.

(This also means that Hilt artifacts will now be postfixed with -beta instead of -alpha).

New breaking changes

Activity injection is now delayed until OnContextAvailableListener to enable member injecting ViewModels with SavedStateHandle. To use the ContextAware APIs androidx.activity, androidx.fragment and androidx.lifecycle dependencies are updated across the Dagger libraries. (623d3a61e)

Note that this affects Hilt base classes that expected its members to be injected due to another Hilt class extending it. This essentially changes the injection of activities to occur within super.onCreate() instead of before super.onCreate().

@AndroidEntryPoint
public class MainActivity extends BaseActivity {
   // ...
}

abstract class BaseActivity extends FragmentActivity { @​Inject Foo foo;

@​Override protected void onCreate(Bundle savedInstanceState) { foo.doSomething(); // <- This will now result in an NPE since ‘foo’ hasn’t been injected yet. super.onCreate();
} }

For cases where a binding is strictly needed before super.onCreate() then the base class will have to invoke a Hilt generated method inject(). For example:

abstract class BaseActivity extends FragmentActivity {
  @Override
   protected void onCreate(Bundle savedInstanceState) {
    inject(); // <- This will force early injection.
    foo.doSomething();
    super.onCreate();    
  }
}

</tr></table>

... (truncated)

Commits
  • ae991fd 2.33 release
  • 78438d5 Update all "alpha" references to "beta" in preparation for the upcoming beta ...
  • ceccfc6 Add job to GitHub Actions to validate the Dagger version.
  • 8a4b7e2 Remove cache of top level component implementations
  • 8a92723 Fixes to javadoc and links for EarlyEntryPoint
  • 5877be8 Add internal utility method.
  • 1ad74b9 Follow-up changes to the EarlyEntryPoint API
  • 289f59f Add EarlyTestEntryPoints to allow entry points to be called in tests before t...
  • 608e6cc Remove a comment that seems to be left around from Ahead-of-time Subcomponent...
  • 73628bc Enable remaining dagger.android and dagger.hilt tests.
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Mar 18, 2021
@dependabot dependabot bot force-pushed the dependabot/gradle/com.google.dagger-dagger-compiler-2.33 branch from 2c6a0a2 to d54a368 Compare March 23, 2021 20:29
@dependabot dependabot bot force-pushed the dependabot/gradle/com.google.dagger-dagger-compiler-2.33 branch from d54a368 to b6f224a Compare March 27, 2021 15:42
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Apr 8, 2021

Superseded by #119.

@dependabot dependabot bot closed this Apr 8, 2021
@dependabot dependabot bot deleted the dependabot/gradle/com.google.dagger-dagger-compiler-2.33 branch April 8, 2021 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow @AssistedInject objects to be injected and provided by @Provides methods
0 participants