fix(twitter/monochrome-icon): add missing File.write call (#682)

This commit is contained in:
Ushie 2022-09-30 21:00:29 +03:00 committed by GitHub
parent 33959b2b29
commit de22e3f03e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,28 +26,28 @@ class MonochromeIconPatch : ResourcePatch() {
val mipmapV33Directory = resDirectory.resolve("mipmap-anydpi-v33") val mipmapV33Directory = resDirectory.resolve("mipmap-anydpi-v33")
if (!mipmapV33Directory.isDirectory) Files.createDirectories(mipmapV33Directory.toPath()) if (!mipmapV33Directory.isDirectory) Files.createDirectories(mipmapV33Directory.toPath())
FileWriter( FileWriter(mipmapV33Directory.resolve("ic_launcher_twitter.xml")).use {
mipmapV33Directory.resolve("ic_launcher_twitter.xml"), it.write(
).use { "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<adaptive-icon\n" +
"<adaptive-icon\n" + " xmlns:android=\"http://schemas.android.com/apk/res/android\">\n" +
" xmlns:android=\"http://schemas.android.com/apk/res/android\">\n" + " <background android:drawable=\"@color/ic_launcher_background\" />\n" +
" <background android:drawable=\"@color/ic_launcher_background\" />\n" + " <foreground android:drawable=\"@mipmap/ic_launcher_twitter_foreground\" />\n" +
" <foreground android:drawable=\"@mipmap/ic_launcher_twitter_foreground\" />\n" + " <monochrome android:drawable=\"@mipmap/ic_launcher_twitter_foreground\" />\n" +
" <monochrome android:drawable=\"@mipmap/ic_launcher_twitter_foreground\" />\n" + "</adaptive-icon>"
"</adaptive-icon>" )
} }
FileWriter( FileWriter(mipmapV33Directory.resolve("ic_launcher_twitter_round.xml")).use {
mipmapV33Directory.resolve("ic_launcher_twitter_round.xml"), it.write(
).use { "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<adaptive-icon\n" +
"<adaptive-icon\n" + " xmlns:android=\"http://schemas.android.com/apk/res/android\">\n" +
" xmlns:android=\"http://schemas.android.com/apk/res/android\">\n" + " <background android:drawable=\"@color/ic_launcher_background\" />\n" +
" <background android:drawable=\"@color/ic_launcher_background\" />\n" + " <foreground android:drawable=\"@mipmap/ic_launcher_twitter_foreground\" />\n" +
" <foreground android:drawable=\"@mipmap/ic_launcher_twitter_foreground\" />\n" + " <monochrome android:drawable=\"@mipmap/ic_launcher_twitter_foreground\" />\n" +
" <monochrome android:drawable=\"@mipmap/ic_launcher_twitter_foreground\" />\n" + "</adaptive-icon>"
"</adaptive-icon>" )
} }
return PatchResultSuccess() return PatchResultSuccess()