[tinker] Update the way to inject stable-ids - #1603
Merged
Merged
Conversation
Collaborator
|
thx~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tinker原来的插件因为在升级AGP4.1是无法Hook修改
processXXXResource任务的aaptOptions,从而更换了注入--stable-ids的方案修改后的方案存在一些兼容性的问题,如:
./gradlew clean assembleRelease这样的组合命令会出现编译失败processXXXResource的初始化,参数注入会失败,导致无法应用资源ID的Keep规则目前使用的方案回退到了Tinker在AGP4.1之前的实现逻辑,在
processXXXResource开始执行时才决定是否要进行资源ID的Keep注入;同时找到了一个有效的Hook路径来保证AGP4.1以上的兼容性。