代码拉取完成,页面将自动刷新
同步操作将从 齐翊/CC 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
//------------------------------------------------
//
// demo使用的自定义cc-settings文件
// 主要是为了自动注册组件B的processor
//
//------------------------------------------------
apply from: rootProject.file('cc-settings.gradle')
//apply from: 'https://raw.githubusercontent.com/luckybilly/CC/master/cc-settings.gradle'
dependencies {
//这里是为了示例给跨app组件调用添加权限验证
compile project(':component_protect_demo')
}
//auto register extension:
// 源码地址:https://github.com/luckybilly/AutoRegister
// 功能介绍:
// 在编译期扫描将打到apk包中的所有类
// 将 scanInterface的实现类 或 scanSuperClasses的子类
// 并在 codeInsertToClassName 类的 codeInsertToMethodName 方法中生成如下代码:
// codeInsertToClassName.registerMethodName(scanInterface)
// 要点:
// 1. codeInsertToMethodName 若未指定,则默认为static块
// 2. codeInsertToMethodName 与 registerMethodName 需要同为static或非static
// 自动生成的代码示例:
/*
在com.billy.app_lib_interface.CategoryManager.class文件中
static
{
register(new CategoryA()); //scanInterface的实现类
register(new CategoryB()); //scanSuperClass的子类
}
*/
autoregister {
registerInfo = [
//自动注册所有组件类(com.billy.cc.core.component.IComponent接口的实现类)
[
'scanInterface' : 'com.billy.cc.core.component.IComponent'
, 'codeInsertToClassName' : 'com.billy.cc.core.component.ComponentManager'
, 'registerMethodName' : 'registerComponent'
, 'exclude' : [//排除的类,支持正则表达式(包分隔符需要用/表示,不能用.)
'com.billy.cc.core.component.'.replaceAll("\\.", "/") + ".*"
]
],
//自动注册组件B的processor
[
'scanInterface' : 'com.billy.cc.demo.component.b.processor.IActionProcessor'
, 'codeInsertToClassName' : 'com.billy.cc.demo.component.b.ComponentB'
, 'codeInsertToMethodName' : 'initProcessors'
, 'registerMethodName' : 'add'
]
]
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。