Use kotlin coroutines instead of raw threads (+ refactorings) (#6801)

* Refactor: Move classes into their own files

* Handle 404 FileNotFound in UncivServer

* Refactor: Rename method

* Make GameSaver.saveGame throw the exception by default if it is not handled

* Add possibility to work with FileHandles in GameSaver

* Make OnlineMultiplayerGameSaver load the multiplayerServer setting each time it does something

This theoretically makes it unnecessary for the OnlineMultiplayerGameSaver to be re-instantiated each time it is used

* Refactor: Remove duplicated code

* Refactor: Extract NextTurnButton from WorldScreen

* Refactor: Remove WorldScreen-specific code from OptionsPopup

* Use kotlin coroutines everywhere instead of plain threads

This probably also cuts down on our raw thread usage, improving performance, since we now use a cached thread pool (in addition to coroutines being able to reuse threads anyway)

* Improve deep load from notification

* Refactor: Give music download coroutine the proper name
This commit is contained in:
Timo T
2022-05-14 23:52:45 +02:00
committed by GitHub
parent 47728afafa
commit f8e0f572e4
34 changed files with 534 additions and 379 deletions

View File

@ -20,7 +20,9 @@ android {
}
}
packagingOptions {
resources.excludes.add("META-INF/robovm/ios/robovm.xml")
resources.excludes += "META-INF/robovm/ios/robovm.xml"
// part of kotlinx-coroutines-android, should not go into the apk
resources.excludes += "DebugProbesKt.bin"
}
defaultConfig {
applicationId = "com.unciv.app"