Giter Club home page Giter Club logo

Comments (7)

kymjs avatar kymjs commented on September 26, 2024

支持的,使用上没有差异。需要在动态加载的模块被加载后手动调用一下路由表填充

from hll-wp-therouter-android.

hutcwp avatar hutcwp commented on September 26, 2024

我这边用1.1.2的版本尝试,在dynamicFeature模块的build中apply therouter插件,发现其并不会把dynamicFeature模块中定义的路由和service插入到TheRouterServiceProvideInjecter的initDefaultRouteMap,autowiredInject等方法中。原因是com.therouter.plugin.TheRouterTransform#theRouterTransform中这个判断为false。想问下上面说的支持dynamicFeature是从哪个版本开始,又或者是我的用法不太对?
if (theRouterClassOutputFile) { TheRouterInjects.injectClassCode(theRouterClassOutputFile, isIncremental) }

from hll-wp-therouter-android.

kymjs avatar kymjs commented on September 26, 2024

我理解错了,我以为是国内的插件化方案。
dynamicFeature可以使用 1.1.3-rc4,构建dynamicFeature模块时,需要将app模块build.gradle中引入的插件去掉

from hll-wp-therouter-android.

hutcwp avatar hutcwp commented on September 26, 2024

看了您兼容dynamicFeature的修改c6081d1fbd40badae735c2bbc2aa3300a5c6aadb。但是感觉跟我遇到的场景不太一样。我这边是国外的项目需要用aab格式上googlePlay,项目中有的moudel用了DynamicFeature类型,但是该moudle不是动态下发的,另外打包的时候dynamicFeature也是跟随app模块一起打包的。不会像插件化那样单独去打插件包。所以我这边思考的方向是在打包的时候去遍历到App模块和所有dynamicfeature模块中的初始化类,然后再插桩到TheRouterServiceProvideInjecter中的初始化方法中去。

from hll-wp-therouter-android.

kymjs avatar kymjs commented on September 26, 2024

插件就是做这件事的,用这种方式就可以

我理解错了,我以为是国内的插件化方案。 dynamicFeature可以使用 1.1.3-rc4,构建dynamicFeature模块时,需要将app模块build.gradle中引入的插件去掉

from hll-wp-therouter-android.

hutcwp avatar hutcwp commented on September 26, 2024

插件就是做这件事的,用这种方式就可以

我理解错了,我以为是国内的插件化方案。 dynamicFeature可以使用 1.1.3-rc4,构建dynamicFeature模块时,需要将app模块build.gradle中引入的插件去掉

app模块和dynamicFeature模块都有路由页面,需要同时在app模块和dynamicFeature模块的build.gradle中依赖插件transform才会遍历到各自moudle中的类和Jar。另外app模块和dynamicFeature模块是一起构建的,没办法做到构建dynamicFeature模块的时候把app模块的build.gradle中引入的插件去掉。

from hll-wp-therouter-android.

kymjs avatar kymjs commented on September 26, 2024

你的dynamicFeature应该也会依赖app吧。

from hll-wp-therouter-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.