-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
171 additions
and
60 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
> | ||
|
||
<uses-feature android:name="android.hardware.touchscreen" android:required="false" /> | ||
<uses-feature android:name="android.software.leanback" android:required="false" /> | ||
<application | ||
|
||
android:allowBackup="true" | ||
android:label="Skeep" | ||
android:icon="@mipmap/icon" | ||
android:roundIcon="@android:drawable/sym_def_app_icon" | ||
android:theme="@style/AppThemeOverride" | ||
android:supportsRtl="true" | ||
> | ||
<profileable android:shell="true" /> | ||
<activity android:name=".MainActivity" | ||
android:banner="@drawable/app_banner" | ||
android:icon="@drawable/app_icon" | ||
android:label="Skeep" | ||
android:logo="@drawable/app_icon" | ||
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden" | ||
android:screenOrientation="sensor" | ||
android:exported="true" | ||
> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN"/> | ||
<category android:name="android.intent.category.LAUNCHER"/> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import io.ktor.client.engine.cio.* | ||
import korlibs.io.file.std.resourcesVfs | ||
import korlibs.io.lang.readProperties | ||
import network.ClientEngineFactory | ||
import network.URLProvider | ||
import org.koin.core.context.startKoin | ||
import org.koin.core.qualifier.named | ||
import org.koin.dsl.bind | ||
import org.koin.dsl.module | ||
import org.koin.mp.KoinPlatform | ||
|
||
class Main | ||
|
||
suspend fun runMain() { | ||
main() | ||
} | ||
suspend fun main() { | ||
val clientProps = resourcesVfs["client.properties"].readProperties() | ||
val url = clientProps["server"]!! | ||
val version = clientProps["version"]!! | ||
startKoin {} | ||
KoinPlatform.getKoin().loadModules(listOf(module { | ||
single(named("version")) { version } | ||
factory { | ||
object : URLProvider { | ||
override val url: String get() = url | ||
} | ||
} bind URLProvider::class | ||
factory { | ||
object : ClientEngineFactory { override fun getEngine() = CIO } | ||
} bind ClientEngineFactory::class | ||
})) | ||
startMain() | ||
} |
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.