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

修复项目中未配置android.aaptOptions.additionalParameters时,tinkerApplyResourcePath中配置了R.txt也不生效 #1687

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -429,14 +429,12 @@ public class TinkerResourceIdTask extends DefaultTask {
def processResourcesTask = Compatibilities.getProcessResourcesTask(project, variant)
processResourcesTask.doFirst {
def aaptParams = project.android.aaptOptions.additionalParameters
if (aaptParams != null) {
if (!aaptParams.contains('--stable-ids')) {
addStableIdsFileToAdditionalParameters(processResourcesTask)
} else {
project.logger.error('** [NOTICE] ** Manually specified stable-ids file was detected, '
+ 'Tinker will give up injecting generated stable-ids file. Please ensure your stable-ids file '
+ 'keep ids of all resources in base apk.')
}
if (aaptParams == null || !aaptParams.contains('--stable-ids')) {
addStableIdsFileToAdditionalParameters(processResourcesTask)
} else {
project.logger.error('** [NOTICE] ** Manually specified stable-ids file was detected, '
+ 'Tinker will give up injecting generated stable-ids file. Please ensure your stable-ids file '
+ 'keep ids of all resources in base apk.')
}

if (project.hasProperty("tinker.aapt2.public")) {
Expand Down