Skip to content

Commit

Permalink
修复项目中未配置android.aaptOptions.additionalParameters时,tinkerApplyResource…
Browse files Browse the repository at this point in the history
…Path不生效
  • Loading branch information
coltonliang authored and demoface committed Oct 19, 2022
1 parent bcc4d8f commit 579a9af
Showing 1 changed file with 6 additions and 8 deletions.
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

0 comments on commit 579a9af

Please sign in to comment.