Skip to content

Commit ef06fe1

Browse files
committed
Make tags and languageValuesOverridePathMap non-nullable in PoEditorStringsImporter.importPoEditorStrings
1 parent db8e295 commit ef06fe1

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

src/main/kotlin/com/hyperdevs/poeditor/gradle/Main.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,15 @@ fun main() {
3737
.takeIf { it.isNotBlank() }
3838
?.split(",")
3939
?.map { it.trim() }
40+
?: emptyList()
4041
val languageValuesOverridePathMap = dotenv.get("LANGUAGE_VALUES_OVERRIDE_PATH_MAP", "")
4142
.takeIf { it.isNotBlank() }
4243
?.split(",")
4344
?.associate {
4445
val (key, value) = it.split(":")
4546
key to value
4647
}
48+
?: emptyMap()
4749

4850
PoEditorStringsImporter.importPoEditorStrings(
4951
apiToken,

src/main/kotlin/com/hyperdevs/poeditor/gradle/PoEditorPlugin.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ class PoEditorPlugin : Plugin<Project> {
184184
private fun getConfigs(productFlavors: List<String>,
185185
buildType: String?): Set<String> = (productFlavors + buildType).filterNotNull().toSet()
186186

187+
@Suppress("NestedBlockDepth")
187188
private fun generatePoEditorTasks(configs: Set<String>,
188189
project: Project,
189190
configsExtensionContainer: NamedDomainObjectContainer<PoEditorPluginExtension>,

src/main/kotlin/com/hyperdevs/poeditor/gradle/PoEditorStringsImporter.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ object PoEditorStringsImporter {
7979
projectId: Int,
8080
defaultLang: String,
8181
resDirPath: String,
82-
tags: List<String>?,
83-
languageValuesOverridePathMap: Map<String, String>?) {
82+
tags: List<String>,
83+
languageValuesOverridePathMap: Map<String, String>) {
8484
try {
8585
val poEditorApiController = PoEditorApiControllerImpl(apiToken, poEditorApi)
8686

src/main/kotlin/com/hyperdevs/poeditor/gradle/xml/XmlPostProcessor.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ class XmlPostProcessor {
167167
rootNode?.replaceChild(copiedNodeElement, nodeElement)
168168
}
169169

170+
@Suppress("NestedBlockDepth")
170171
private fun extractMatchingNodes(nodeList: NodeList, regexString: String): List<Node> {
171172
val matchedNodes = mutableListOf<Node>()
172173
val regex = Regex(regexString)

0 commit comments

Comments
 (0)