@@ -52,11 +52,11 @@ private fun escapeAppName(name: String): String? {
5252internal fun baseCustomBrandingPatch (
5353 defaultAppName : String ,
5454 appNameValues : Map <String , String >,
55- resourceFolder : String ,
56- adaptiveAnydpiFileNames : Array <String >,
57- mipmapIconFileNames : Array <String >,
58- legacyMipmapIconFileNames : Array <String >,
59- monochromeIconFileNames : Array <String >,
55+ patchResourceFolder : String ,
56+ adaptiveAnyDpiFileNames : Array <String >,
57+ adaptiveMipmapFileNames : Array <String >,
58+ legacyMipmapFileNames : Array <String >,
59+ monochromeFileNames : Array <String >,
6060 block : ResourcePatchBuilder .() -> Unit = {},
6161 executeBlock : ResourcePatchContext .() -> Unit = {}
6262): ResourcePatch = resourcePatch(
@@ -84,10 +84,10 @@ internal fun baseCustomBrandingPatch(
8484 ${formatResourceFileList(mipmapDirectories)}
8585
8686 Each of these folders must contain the following files:
87- ${formatResourceFileList((mipmapIconFileNames + legacyMipmapIconFileNames ))}
87+ ${formatResourceFileList((adaptiveMipmapFileNames + legacyMipmapFileNames ))}
8888
8989 Optionally, a 'drawable' folder with the monochrome icon files:
90- ${formatResourceFileList(monochromeIconFileNames )}
90+ ${formatResourceFileList(monochromeFileNames )}
9191 """ .trimIndentMultiline(),
9292 )
9393
@@ -99,24 +99,24 @@ internal fun baseCustomBrandingPatch(
9999 if (iconPathTrimmed == REVANCED_ICON ) {
100100 // Copy adaptive icons.
101101 copyResources(
102- resourceFolder ,
103- ResourceGroup (" mipmap-anydpi" , * adaptiveAnydpiFileNames )
102+ patchResourceFolder ,
103+ ResourceGroup (" mipmap-anydpi" , * adaptiveAnyDpiFileNames )
104104 )
105105
106106 // Copy legacy icons.
107107 mipmapDirectories.map { directory ->
108108 ResourceGroup (
109109 directory,
110- * legacyMipmapIconFileNames ,
110+ * legacyMipmapFileNames ,
111111 )
112112 }.forEach { groupResources ->
113- copyResources(resourceFolder , groupResources)
113+ copyResources(patchResourceFolder , groupResources)
114114 }
115115
116116 // Copy monochrome icons.
117117 copyResources(
118- resourceFolder ,
119- ResourceGroup (" drawable" , * monochromeIconFileNames )
118+ patchResourceFolder ,
119+ ResourceGroup (" drawable" , * monochromeFileNames )
120120 )
121121 } else {
122122 val iconPathFile = File (iconPathTrimmed)
@@ -127,7 +127,7 @@ internal fun baseCustomBrandingPatch(
127127 mipmapDirectories.map { directory ->
128128 ResourceGroup (
129129 directory,
130- * mipmapIconFileNames ,
130+ * adaptiveMipmapFileNames ,
131131 )
132132 }.forEach { groupResources ->
133133 val groupResourceDirectoryName = groupResources.resourceDirectoryName
@@ -147,7 +147,7 @@ internal fun baseCustomBrandingPatch(
147147 }
148148
149149 // Replace monochrome icons if provided.
150- monochromeIconFileNames .forEach { iconFileName ->
150+ monochromeFileNames .forEach { iconFileName ->
151151 val resourceType = " drawable"
152152 val replacement = iconPathFile.resolve(resourceType).resolve(iconFileName)
153153 if (replacement.exists()) {
0 commit comments