Skip to content

Commit

Permalink
test: 修复拆分source sample后插件使用宿主类测试找不到类的问题
Browse files Browse the repository at this point in the history
拆分后sample-app的parent是sample-base了,
由于hostWhiteList是设置在PluginClassLoader上的,
所以需要在sample-base的hostWhiteList上设置白名单,
才能使sample-app可以访问宿主中的类。

fixup! 08da57d
fix Tencent#692
  • Loading branch information
shifujun committed Nov 29, 2021
1 parent a409c3a commit 004c6c5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions projects/sample/source/sample-plugin/sample-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ shadow {
buildTask = ':sample-base:assemblePluginDebug'
apkName = 'sample-base-plugin-debug.apk'
apkPath = 'projects/sample/source/sample-plugin/sample-base/build/outputs/apk/plugin/debug/sample-base-plugin-debug.apk'
hostWhiteList = ["com.tencent.shadow.sample.host.lib"]
}
}
}
Expand Down Expand Up @@ -162,6 +163,7 @@ shadow {
buildTask = ':sample-base:assemblePluginRelease'
apkName = 'sample-base-plugin-release.apk'
apkPath = 'projects/sample/source/sample-plugin/sample-base/build/outputs/apk/plugin/release/sample-base-plugin-release.apk'
hostWhiteList = ["com.tencent.shadow.sample.host.lib"]
}
}
}
Expand Down

0 comments on commit 004c6c5

Please sign in to comment.