Skip to content

Commit 8693188

Browse files
jqctop1txfelixzhou
authored andcommitted
Do not modify R.txt (Tencent#252)
1 parent e528b34 commit 8693188

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

matrix/matrix-android/matrix-gradle-plugin/src/main/groovy/com/tencent/matrix/plugin/task/RemoveUnusedResourcesTask.groovy

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,9 @@ public class RemoveUnusedResourcesTask extends DefaultTask {
237237
//Log.d(TAG, "styleable %s", styleableMap.keySet().size());
238238
String newResTxtFile = resTxtFile.getParentFile().getAbsolutePath() + "/" + resTxtFile.getName().substring(0, resTxtFile.getName().indexOf('.')) + "_shrinked.txt";
239239
shrinkResourceTxtFile(newResTxtFile, resourceMap, styleableMap);
240-
new File(newResTxtFile).renameTo(resTxtFile);
240+
241+
//Other plugins such as "Tinker" may depend on the R.txt file, so we should not modify R.txt directly .
242+
//new File(newResTxtFile).renameTo(resTxtFile);
241243
}
242244

243245
} finally {

0 commit comments

Comments
 (0)