Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问关于 插件访问宿主类 #26

Closed
onlylikews opened this issue Jul 2, 2019 · 5 comments
Closed

请问关于 插件访问宿主类 #26

onlylikews opened this issue Jul 2, 2019 · 5 comments

Comments

@onlylikews
Copy link

请问介绍里的 插件访问宿主类 这个能力示例里面有吗?

@shifujun
Copy link
Collaborator

shifujun commented Jul 2, 2019

sample里没补充这个场景呢。不过test里面有这个测试用例。sample就是从test里抽出来的。

插件要访问宿主中的类,需要在编插件包的时候在config.json里配置白名单。这个白名单可以在Gradle打包配置里配置,可以参考
https://github.com/Tencent/Shadow/blob/dev/projects/test/plugin/general-cases/test-plugin-general-cases/build.gradle#L43

这个白名单会被注入到PluginClassLoader中,见
com.tencent.shadow.core.loader.classloaders.PluginClassLoader#allHostWhiteList

@onlylikews
Copy link
Author

恩,谢谢,我先探索一下

@onlylikews
Copy link
Author

可以了,厉害,哈哈,这功能很好用

@shifujun
Copy link
Collaborator

shifujun commented Jul 2, 2019

你探索Shadow的功能,写的测试代码都可以贡献给Shadow呀。test自动化测试可能写起来麻烦些,sample总是好写的吧?参与进来哈!

@onlylikews
Copy link
Author

恩,拥抱开源

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants