Skip to content

Commit 579a9af

Browse files
coltonliangdemoface
authored andcommitted
修复项目中未配置android.aaptOptions.additionalParameters时,tinkerApplyResourcePath不生效
1 parent bcc4d8f commit 579a9af

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

tinker-build/tinker-patch-gradle-plugin/src/main/groovy/com/tencent/tinker/build/gradle/task/TinkerResourceIdTask.groovy

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -429,14 +429,12 @@ public class TinkerResourceIdTask extends DefaultTask {
429429
def processResourcesTask = Compatibilities.getProcessResourcesTask(project, variant)
430430
processResourcesTask.doFirst {
431431
def aaptParams = project.android.aaptOptions.additionalParameters
432-
if (aaptParams != null) {
433-
if (!aaptParams.contains('--stable-ids')) {
434-
addStableIdsFileToAdditionalParameters(processResourcesTask)
435-
} else {
436-
project.logger.error('** [NOTICE] ** Manually specified stable-ids file was detected, '
437-
+ 'Tinker will give up injecting generated stable-ids file. Please ensure your stable-ids file '
438-
+ 'keep ids of all resources in base apk.')
439-
}
432+
if (aaptParams == null || !aaptParams.contains('--stable-ids')) {
433+
addStableIdsFileToAdditionalParameters(processResourcesTask)
434+
} else {
435+
project.logger.error('** [NOTICE] ** Manually specified stable-ids file was detected, '
436+
+ 'Tinker will give up injecting generated stable-ids file. Please ensure your stable-ids file '
437+
+ 'keep ids of all resources in base apk.')
440438
}
441439

442440
if (project.hasProperty("tinker.aapt2.public")) {

0 commit comments

Comments
 (0)