Skip to content

Commit c360f8e

Browse files
authored
Refactored cleanup.gradle.kts to include replacement for postSplashScreenTheme property contained in splash.xml (#5)
1 parent 0d37379 commit c360f8e

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

buildSrc/src/main/kotlin/cleanup.gradle.kts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,12 @@ fun changeResourceFiles(name: String) {
220220
.filter { it.name == "themes.xml" }
221221
.forEach { themesFile ->
222222
themesFile.replace(
223-
oldValue = "Theme.ComposeAndroidTemplate", newValue = "Theme.$name"
223+
oldValue = "Theme.ComposeAndroidTemplate",
224+
newValue = "Theme.$name"
225+
)
226+
themesFile.replace(
227+
oldValue = "<item name=\"postSplashScreenTheme\">@style/Theme.ComposeAndroidTemplate</item>",
228+
newValue = "<item name=\"postSplashScreenTheme\">@style/Theme.$name</item>"
224229
)
225230
}
226231

@@ -230,7 +235,8 @@ fun changeResourceFiles(name: String) {
230235
.filter { it.name == "strings.xml" }
231236
.forEach { stringsFile ->
232237
stringsFile.replace(
233-
oldValue = "Compose Android Template", newValue = name
238+
oldValue = "Compose Android Template",
239+
newValue = name
234240
)
235241
}
236242

0 commit comments

Comments
 (0)