From 06cfde680a0b3d6a574396bb3c78210f2009efef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Bu=CC=88the?= Date: Mon, 12 Aug 2024 11:26:07 +0200 Subject: [PATCH] add secondary constructor with default tags param, for backwards compatibility upgrading from 1.x --- .../freenow/apis/phraseapi/task/PhraseAppSyncTask.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/freenow/apis/phraseapi/task/PhraseAppSyncTask.kt b/src/main/kotlin/com/freenow/apis/phraseapi/task/PhraseAppSyncTask.kt index fed9d2b..56101c0 100644 --- a/src/main/kotlin/com/freenow/apis/phraseapi/task/PhraseAppSyncTask.kt +++ b/src/main/kotlin/com/freenow/apis/phraseapi/task/PhraseAppSyncTask.kt @@ -9,7 +9,7 @@ import java.nio.file.Files import java.nio.file.Path import java.nio.file.Paths -@Suppress("TooGenericExceptionCaught","SwallowedException") +@Suppress("TooGenericExceptionCaught", "SwallowedException") class PhraseAppSyncTask( private val config: PhraseAppSyncTaskConfig ) : Runnable { @@ -98,4 +98,10 @@ data class PhraseAppSyncTaskConfig @JvmOverloads constructor( val messagesFilePostfix: String = ".properties", val messagesFilePrefix: String = "messages_", val escapeSingleQuotes: Boolean = false -) +) { + constructor( + url: String, + authKey: String, + projectId: String, + ) : this(url = url, authKey = authKey, projectId = projectId, tags = null) +}