Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

API classes are copied in projects #626

Description

@DayS

Some API classes are copied in the developer project. As they are also in the API jar, Eclipse have some trouble to compile the project because of classes conflict in classpath. Maven seems to handle that very well.

We have to cleanup all these. I'll take a closer look on all this later this week.

Activity

  1. yDelouis commented on Jun 13, 2013

    @yDelouis
    Contributor

    I don't think the problem is that classes are both in the API jar and generated. (only MediaType is in the two places).
    But the problem is that if you have both the main project and a library project that use AndroidAnnotations, the classes are generated in both projects with the same package which causes the classes conflict.

    So these classes should not be generated and should be placed in the API jar.

  2. DayS commented on Jun 16, 2013

    @DayS
    ContributorAuthor

    The idea behind generating classes at compile time was to reduce the size of the APK.
    The behavior for this is to keep classes in AA-API only if it should be exposed to the developer (like MediaType). And the classes used by generated code (like BackgroundExecutor) should be generated too.

    So, I see some points here :

    • MediaType is duplicated and should only be present in AA-API.
    • The shared preferences classes (LongPrefField, LongPrefEditorField, etc...) should also be in AA-API because there are used by developer while working with preferences.
    • We should also put BackgroundExecutor in AA-API because of some custom possible uses.
    • HasViews, OnViewChangedListener and OnViewChangedNotifier should be generated.

    These points should fix the problem I had. But in case of two projects using AA (a library and an application) I'm not sure this could help.

  3. DayS commented on Jun 16, 2013

    @DayS
    ContributorAuthor

    @pyricau You wanted to be kept updated about this point.

  4. ghost assigned on Jul 12, 2013
  5. DayS commented on Jul 12, 2013

    @DayS
    ContributorAuthor

    Just though about something... I said "HasViews, OnViewChangedListener and OnViewChangedNotifier should be generated." but I think @EActivity is one of the most used annotations on this project. So, we could just keep them in AA-API project

  6. added a commit that references this issue on Jul 12, 2013
    e94261e
  7. DayS commented on Jul 12, 2013

    @DayS
    ContributorAuthor

    Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions