vimeo / stag-java

Speedy Type Adapter Generation
MIT License
351 stars 34 forks source link

version 2.6.0 creates a conflict with dagger #190

Open demonar opened 5 years ago

demonar commented 5 years ago

Issue Summary

the moment i update from 2.5.0 to 2.6.0 dagger stops working, i get an error on kapt

Reproduction Steps

create a project that contains kotlin classes that use dagger and try to add classes that use stag.

Expected Behavior

should compile with both libraries as in version 2.5.0

Actual Behavior

breaks with error: "[ComponentProcessor:MiscError] dagger.internal.codegen.ComponentProcessor was unable to process this class because not all of its dependencies could be resolved. Check for compilation errors or a circular dependency with generated code."

anthonycr commented 5 years ago

Try excluding the nullability annotations from the stag library, there must a conflict between the class declarations:

implementation ("com.vimeo.stag:stag-library:2.6.0") {
    exclude group: 'org.jetbrains', module: 'annotations'
}

I think that stag should probably be using org.jetbrains:annotations:17.0.0 instead of org.jetbrains:annotations-java5:16.0.2@jar.

gjsalot commented 3 years ago

Rather you need:

implementation ("com.vimeo.stag:stag-library:2.6.0") {
    exclude group: 'org.jetbrains', module: 'annotations-java5'
}