Provide helpers to easily map Trading Card Game into Kotlin Multiplatform libraries / applications
implementation("eu.codlab:tcg-mapper:$version")
This will work on the following platforms :
- Mobile (Android/iOS)
- Web (js)
- Native (MacOS/Linux/Windows)
- JVM (MacOS/Linux/Windows)
Configure the GithubConfiguration to access the raw files remotely
GithubConfiguration.let {
it.githubGroup = "your-group"
it.githubRepo = "your-repo"
}
Loader & AbstractLoader
Gives access to decoding from either remotely or locally
val loader: Loader<SWU> = Loader(
myMokoLocalFile,
"myMokoLocalFile",
SWU.serializer(),
GithubConfiguration(
"great-illuminary",
"some-repo"
)
)
// ...
suspend fun load(): SWU {
val loaded: SWU = loader.loadFromGithub("my-feature-branch")
println("loaded $loaded")
return loaded
}
Http & Serializer provider
- Provider.yaml
- Provider.json
TranslationHolder
Simple class definition to hold multilanguage T object