-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Build errors due to old kotlin and gradle versions (#894)
- Loading branch information
Showing
34 changed files
with
612 additions
and
460 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
BadgeMagicModule/src/commonMain/kotlin/org/fossasia/badgemagic/helpers/JSONHelper.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
package org.fossasia.badgemagic.helpers | ||
|
||
import kotlinx.serialization.encodeToString | ||
import org.fossasia.badgemagic.data.BadgeConfig | ||
import kotlinx.serialization.json.Json | ||
import kotlinx.serialization.json.JsonConfiguration | ||
|
||
object JSONHelper { | ||
fun decodeJSON(badgeJSON: String) = Json(JsonConfiguration.Stable).parse(BadgeConfig.serializer(),badgeJSON) | ||
fun encodeJSON(badgeData: BadgeConfig) = Json(JsonConfiguration.Stable).stringify(BadgeConfig.serializer(),badgeData) | ||
} | ||
private val jsonFormat = Json { encodeDefaults = true } | ||
|
||
fun decodeJSON(badgeJSON: String): BadgeConfig = Json.decodeFromString(badgeJSON) | ||
fun encodeJSON(badgeData: BadgeConfig) = jsonFormat.encodeToString(badgeData) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.