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

Update kotlin.inject to v0.7.1 #305

Merged
merged 1 commit into from
Jun 12, 2024
Merged

Update kotlin.inject to v0.7.1 #305

merged 1 commit into from
Jun 12, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 12, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
me.tatarka.inject:kotlin-inject-runtime 0.6.3 -> 0.7.1 age adoption passing confidence
me.tatarka.inject:kotlin-inject-compiler-ksp 0.6.3 -> 0.7.1 age adoption passing confidence

Release Notes

evant/kotlin-inject (me.tatarka.inject:kotlin-inject-runtime)

v0.7.1

Fixed
  • Removed erroneous @KmpComponentCreator annotation.

v0.7.0

Changed
  • @Scope annotations now take arguments into account. This means for example, if you have
    @​Scope
    annotation class NamedScope(val value: String)
    then the scope: @NamedScope("one") and @NamedScope("two") would be treated as distinct. Previously they were
    treated as the same scope.
  • Legacy implicit assisted injection (not using the @Assisted annotation) is now an error.
  • The build will now fail if multiple qualifiers are applied in the same place, instead of picking the first one. This
    applies both to the new annotation (see below) and javax.inject.Qualifier. A minor exception is you are allowed to
    have one of each type to aid in migration. In that case the me.tatarka.inject one will be chosen.
Added
  • Added a me.tatarka.inject.annotations.Qualifier annotation as an alternative to using typealias. For example, you
    could do:
    @​Qualifier
    annotation class Named(val value: String) 
    
    @​Inject
    class MyClass(@​Named("one") val one: String, @​Named("two") val two: String)
    
    @​Component
    abstract class MyComponent {
      abstract val myClass: MyClass
    
      @​Provides @​Named("one")
      fun provideOne(): String = "one"
    
      @​Provides @​Named("two")
      fun provideTwo(): String = "two" 
    }
    This behaves the same as javax.inject.Qualifier does when you have me.tatarka.inject.enableJavaxAnnotations=true.
  • Added a new @KmpComponentCreate annotation for nicer multiplatform support. This allows you to create component
    instances from common code when generating platform-specific outputs.
    // src/commonMain
    @​Component
    abstract class MyKmpComponent
     
    @​KmpComponentCreate
    expect fun createKmp(): MyKmpComponent
    see the new multiplatform docs for more details.
  • You can now use an @Inject annotation on an inner class provided the outer class can be provided.
    @​Inject class Outer { @​Inject inner class Inner }
    
    @​Component abstract class MyComponent { abstract val inner: Outer.Inner }
Removed
  • The KAPT backend is removed, please migrate to KSP if you haven't already.
Fixed
  • Fixed cases of invalid code generation (#​321, #​337, #​313).
  • Fixed an exception thrown on KSP2 when running multiple rounds (google/ksp#1854).
  • Fixed various issues with handling method overrides in components (#​309, #​375)
  • Allow scope annotations on both an interface and component implementation if they are the same scope (#​320).

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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot enabled auto-merge (squash) June 12, 2024 23:38
@renovate renovate bot merged commit 0ee4901 into main Jun 12, 2024
1 check passed
@renovate renovate bot deleted the renovate/kotlin.inject branch June 12, 2024 23:40
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.

0 participants