Android Kotlin preloaded module

Making address github.com/Jackduhai/A… You can declare asynchronous preloading items during application initialization, such as some HTTP requests, built-in MemeryCache can set the cache effective time, with preloading can improve the efficiency of the project initialization code support multi-process configuration, you can set preloading in what process initialization, so that the project decoupling

# AutoPreload repositories { maven { url 'https://jitpack.io' } } kapt "Com. Making. Jackduhai. AutoPreload: processor: 1.0.1.12" implementation 'com. Making. Jackduhai. AutoPreload: AutoPreload: 1.0.1.12' AutoPreload initialization Preload. SetMultiProcess (true) if / / open process support Preload(application) # AutoPreload(process = ":p2") @autopreload (process = ":p2" Public class Load2 {@loadMethod public void loadMyMessagePre2(){@loadMethod public void loadMyMessagePre2(){ System.out.println("==========loadMyMessagePre2============"); LoadNews {@loadMethod fun loadMyMessagePre(){LoadMethod fun loadMyMessagePre(){ Println ("==========loadMyMessagePre============")}} # MemoryCache can be preloaded cache effectTime put can be set to take effect in 5 minutes by default Memorycache.put ("","") memoryCache.get ("") memoryCache.get ("")Copy the code