Dagger2 v2.28 Release Notes

Release Date: 2020-05-26 // 10 days ago

Previous changes from v2.27

  • What's New

    1. Fix #955: No longer generate MembersInjectors for types without local injection sites. (20f6442)
    2. Fix #1414: Allow multiple scoped component dependencies (113c498) 👍 3. Fix #1734: Add support constructor with content layout id for AndroidX (22b2726) 🚚 4. Fix #1740: Remove a usage of Guava API not available in the '-android' variant in case of processor classpath conflicts. (bfb87d5)
    3. Fix #1665: Add an explicit check for member injection of Kotlin object classes rather than crashing. (550d696)
    4. Fix: #1612: Fix duplicate binding errors when a component dependency has the same method defined multiple times via multiple interfaces (0bb69e9)

    Experimental Error Message Format

    🚀 This release includes a flag for using the new experimental error message format. The format and some content of error messages will be changed with this flag in order to improve readability. Please leave feedback on issue #1769. Pending feedback, this format will eventually become the default and replace current error messages.

    To opt-in to the new format use -Adagger.experimentalDaggerErrorMessages=enabled.

    Currently, this flag:

    • Shortens all class names to the simple class name. A legend is output at the bottom of the errors to map short names to fully qualified names.
    • Reports errors as a single error for each root component.
    • ➕ Adds color to error tags to visibly separate individual errors
    • ⬇️ Reduces some extraneous information from some messages.