Skip to content

Commit 8b4477f

Browse files
committed
新增函数
1 parent bf94c7b commit 8b4477f

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

lib-login/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins {
77

88
communicationConfig{
99
exportModuleName = "communication"
10-
exposeResIds.addAll(arrayOf(
10+
exposeResIds(
1111
"R.drawable.login_logo",
1212
"R.mipmap.login_logo2",
1313
"R.string.login_text",
@@ -28,7 +28,7 @@ communicationConfig{
2828
"R.color.textcolor_btn_tiger_bottom",
2929
"R.font.call_font",
3030
"R.transition.login_tran"
31-
))
31+
)
3232
//直接可以输入 assets 下的文件夹或者文件路径即可
3333
exposeAssets.addAll(arrayOf(
3434
"matching",

lib-user/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ plugins {
77
communicationConfig{
88
exportModuleName = "communication"
99
exportEmptyRoute = false
10-
exposeResIds.addAll(arrayOf(
10+
exposeResIds(
1111
"R.layout.activity_user"
12-
))
12+
)
1313
}
1414
android {
1515
namespace = "com.flyjingfish.user"

module-communication-plugin/src/main/kotlin/com/flyjingfish/module_communication_plugin/CommunicationConfig.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ open class CommunicationConfig {
2020
* 要copy的 assets
2121
*/
2222
val exposeAssets = mutableListOf<String>()
23+
24+
fun exposeResIds(vararg filters: String): CommunicationConfig {
25+
this.exposeResIds.addAll(filters)
26+
return this
27+
}
28+
29+
fun exposeAssets(vararg filters: String): CommunicationConfig {
30+
this.exposeAssets.addAll(filters)
31+
return this
32+
}
2333
override fun toString(): String {
2434
return "CommunicationConfig(exportModuleName='$exportModuleName', exposeResIds=$exposeResIds, exposeAssets=$exposeAssets)"
2535
}

0 commit comments

Comments
 (0)