by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 18 11:31
    ulfandersson commented #2267
  • Sep 06 13:43
    JordiGamez closed #2279
  • Sep 06 13:43
    JordiGamez commented #2279
  • Sep 06 13:42
    JordiGamez reopened #2279
  • Sep 06 13:42
    JordiGamez closed #2279
  • Sep 06 13:42
    JordiGamez edited #2279
  • Sep 06 13:41
    JordiGamez edited #2279
  • Sep 06 13:33
    JordiGamez edited #2279
  • Sep 06 13:32
    JordiGamez edited #2279
  • Sep 06 13:32
    JordiGamez opened #2279
  • Aug 25 08:05
    WonderCsabo commented #2278
  • Aug 19 13:24
    dodgex commented #2278
  • Aug 19 13:11
    ytakahashi1981 commented #2278
  • Aug 19 12:06
    dodgex commented #2278
  • Aug 19 12:05
    dodgex commented #2278
  • Aug 19 09:08
    ytakahashi1981 commented #2278
  • Aug 19 08:41
    ytakahashi1981 commented #2278
  • Aug 19 08:34
    dodgex commented #2278
  • Aug 19 08:31
    ytakahashi1981 opened #2278
  • Aug 14 11:55
    craone commented #686
Adrián Rivero
@smaugho
@EBean
@EViewModel
public class MainViewModel extends ViewModel implements LifecycleObserver {

    private static final long PERIODIC_UPDATES_TIME = 5 * 60 * 1000L;

    @RootView
    MainViewPresenter presenter;

    @Bean
    ArchivesManager archivesManager;

   .....
This is how it is done right now.. then you should inject with
@ViewModel
MainViewModel viewModel;
Kay-Uwe Janssen
@dodgex
and i'm ok with "learning" new annotations.
Adrián Rivero
@smaugho
Ok ok.. I'll guess I'll do it as required by AA.. if I'm not happy with it, maybe I finish with a version for us here in the company :sweat_smile: .. but want also to add this plugin to AA, sounds like a good use..

I'm not sure if i would allow to have @EViewModel together with @EBean

Right, in fact, I tried initially to have @EViewModel implemented as a Generating class.. but it doesn't work right now!

Maybe I should have tell you this before.. (and maybe this could be fixed)
Kay-Uwe Janssen
@dodgex
I'm sorry for the inconvinience but well AA is not designed for stuff like that (one of the reasons why i'd like to rewrite most of it :D)
maybe it is worth researching what is required to add new generating classes
Adrián Rivero
@smaugho
public abstract class ModelConstants {

    public static final Option OPTION_CLASS_SUFFIX = new Option("classSuffix", "_");

    private static String generationSuffix = "_";
    private static String classSuffix;

    public static final List<Class<? extends Annotation>> VALID_ENHANCED_VIEW_SUPPORT_ANNOTATIONS = asList(EActivity.class, EViewGroup.class, EView.class, EBean.class, EFragment.class);

    public static final List<Class<? extends Annotation>> VALID_ENHANCED_COMPONENT_ANNOTATIONS = asList(EApplication.class, EActivity.class, EViewGroup.class, EView.class, EBean.class, EService.class,
            EIntentService.class, EReceiver.class, EProvider.class, EFragment.class);

    private ModelConstants() {
    }
This is the issue. As you see, on ModelConstants we have those lists with VALID_ENCHANCED_VIEW and so on.. I can definitely create a Generating class, but then you cannot inject any @Bean or almost any other thing on it!
Also, most of annotations stop working then there, you cannot use most of them, since they make check against this list... mm.. maybe I got it wrong in fact, and I should modify that List from within the plugin?
Kay-Uwe Janssen
@dodgex
maybe it is possible to enhance the plugin api to have a way to extend this list
but some annotations check for certain enhanced classes in validation. not sure if this might be a problem
Adrián Rivero
@smaugho
Most of the injecting annotations use the "InjectHelper", that one makes the check
Kay-Uwe Janssen
@dodgex
i think the inject helper does not check the target class
Adrián Rivero
@smaugho

Aah, not exactly like that:

@Override
    public void validateEnclosingElement(Element element, ElementValidation valid) {
        validatorHelper.enclosingElementHasEnhancedComponentAnnotation(element, valid);
    }

The inject helper calls this method, which then validates

This is for the BeanHandler. Here you check basically then against that list in ModelConstants
public void enclosingElementHasEnhancedComponentAnnotation(Element element, ElementValidation valid) {
        enclosingElementHasOneOfAnnotations(element, VALID_ENHANCED_COMPONENT_ANNOTATIONS, valid);
    }
Kay-Uwe Janssen
@dodgex
hm
so this should work if we allow plugins to add its enhancing annotations to the list?
Adrián Rivero
@smaugho
I think so.. though not sure if it would be the same with many other annotations.
Kay-Uwe Janssen
@dodgex
well one could check that
might be a powerfull enhancement to the plugin api
Adrián Rivero
@smaugho
Yeap, I think I will ;) .. and let you know..
Kay-Uwe Janssen
@dodgex
and would allow you to do the view model stuff in a nice AA complaint way ;)
compatible
Adrián Rivero
@smaugho
hehehe, yeap, agree!.. ok ok.. I'll try to "adhere" to AA way, without inventing too much ;-)
Kay-Uwe Janssen
@dodgex
hehe. sorry again for the inconvenience :)
Adrián Rivero
@smaugho
np :+1:
Zulqurnain Haider
@Zulqurnain
Hi, can someone help me out with this strange but i think noob issue: androidannotations/androidannotations#2216
Csaba Kozák
@WonderCsabo
@Zulqurnain i am already helping you there. :)
Zulqurnain Haider
@Zulqurnain
sorry i thought, i would let more people in this issue
Zulqurnain Haider
@Zulqurnain
so @WonderCsabo there is some bug or i am doing something wrong?
Zulqurnain Haider
@Zulqurnain
Anyone ?
Caleb Chiesa
@Orbyt
Knock Knock
I've been trying to get our build times down and as such tried using kapt.use.worker.api=true. When building, the following error occurs:
> Task :sync:kaptDebugKotlin FAILED
.../SyncService.java:25: error: cannot find symbol
    private final Map<RepoType, List<SyncableRepository>> mSyncableRepositories;
                                     ^
  symbol:   class SyncableRepository
  location: class .../SyncService.java:38: error: cannot find symbol
    public synchronized void registerSyncableRepository(RepoType type, SyncableRepository... repo) {
                                                                       ^
  symbol:   class SyncableRepository
  location: class SyncService
> Task :app-state:data:kaptDebugKotlin
warning: The following options were not recognized by any processor: '[androidManifestFile, kapt.kotlin.generated]'
FAILURE: Build failed with an exception.
This is strange; why would it fail to find these classes?
I spent some time searching around and I think something is conflicting with AndroidAnnotations. Has anyone seen something similar?
Csaba Kozák
@WonderCsabo
@Orbyt i do not really think this is due to AndroidAnnotations.
Viacheslav Blinov
@dant3
Hi!
Can anyone help me overcome error: The generated com.my.product.flavour.R class cannot be found durring compilation? This class does not really exists, it should be com.my.product.R instead which is used in manifest - com.my.product.flavour is just an applicationId I use for this particular flavour
Viacheslav Blinov
@dant3
Figured it out myself
Csaba Kozák
@WonderCsabo
Great! :)
Tomas G
@Rebooy
AndroidAnnotations do not use anything so it won't be copatible with the new 64-bit requrement that Google Android is requesting?
Kay-Uwe Janssen
@dodgex
Not sure what exactly you mean, but I think you want to be sure that AA is no Problem with the 64bit requirement? I'm pretty sure that AA is no problem. It does not use any native dependencies, only plain java.
Tomas G
@Rebooy
@dodgex Great :) Exactly what I wanted to know! Thank you very much
SunPeng
@haloSPark
hi, i created a class extends BaseAnnotationHandler , but the androidstudio tell me not implement the abstract method
image.png
image.png
actually i had implement all the abstract methods
ramloul24
@ramloul24
The company I work with is currently using this SDK. We wanted to find a way to consolidate the various SDKs we work with. We were wondering if Android Annotations has an email list we can sign up for updates such as Deprecation Schedules, etc. If someone has this information, could you please share it with me?
Kay-Uwe Janssen
@dodgex
not really a email list but there is https://groups.google.com/forum/#!forum/androidannotations and for releases you can also watch the repository for releases only on github