Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-3317

Class generation is not generating dependency injection annotations for some custom tasks.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Won't Fix
    • Affects Version/s: 2.4, 2.5
    • Fix Version/s: None

      Description

      Class generation fails to generate the annotations for methods when there is a class hierarchy with both interfaces and super classes containing the same method signature. e.g:

      In this scenario the generated/decorated class results in a getString() method missing the @Inject annotation.

      ```
      public interface Task

      { public String getString() }

      public interface BinaryFileProviderTask extends Task {}

      public abstract class AbstractTask implements Task{
      public String getString()

      { return "super" }

      }

      public class Jar extends AbstractTask {
      @Inject
      public String getString()

      { return "concrete" }

      }
      class AndroidJarTask extends Jar implements BinaryFileProviderTask {
      }
      ```

        Attachments

          Activity

            People

            Assignee:
            adrianbk Adrian Kelly (Inactive)
            Reporter:
            adrianbk Adrian Kelly (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: