mirror of
https://github.com/Shabinder/SpotiFlyer.git
synced 2024-11-24 18:04:33 +01:00
Console App (Folder) & Mosaic-SubModule
This commit is contained in:
parent
252e0c101d
commit
5102a8ea48
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,3 +1,6 @@
|
|||||||
[submodule "spotiflyer-ios"]
|
[submodule "spotiflyer-ios"]
|
||||||
path = spotiflyer-ios
|
path = spotiflyer-ios
|
||||||
url = https://github.com/Shabinder/spotiflyer-ios
|
url = https://github.com/Shabinder/spotiflyer-ios
|
||||||
|
[submodule "mosaic"]
|
||||||
|
path = mosaic
|
||||||
|
url = https://github.com/JakeWharton/mosaic
|
||||||
|
59
console-app/build.gradle.kts
Normal file
59
console-app/build.gradle.kts
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
plugins {
|
||||||
|
kotlin("jvm")// version "1.4.32"
|
||||||
|
kotlin("plugin.serialization")
|
||||||
|
id("ktlint-setup")
|
||||||
|
id("com.jakewharton.mosaic")
|
||||||
|
application
|
||||||
|
}
|
||||||
|
|
||||||
|
group = "com.shabinder"
|
||||||
|
version = Versions.versionCode
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
application {
|
||||||
|
mainClass.set("MainKt")
|
||||||
|
applicationName = "spotiflyer-console-app"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(Koin.core)
|
||||||
|
implementation(project(":common:database"))
|
||||||
|
implementation(project(":common:data-models"))
|
||||||
|
implementation(project(":common:dependency-injection"))
|
||||||
|
implementation(project(":common:root"))
|
||||||
|
implementation(project(":common:main"))
|
||||||
|
implementation(project(":common:list"))
|
||||||
|
implementation(project(":common:list"))
|
||||||
|
|
||||||
|
|
||||||
|
// Decompose
|
||||||
|
implementation(Decompose.decompose)
|
||||||
|
implementation(Decompose.extensionsCompose)
|
||||||
|
|
||||||
|
// MVI
|
||||||
|
implementation(MVIKotlin.mvikotlin)
|
||||||
|
implementation(MVIKotlin.mvikotlinMain)
|
||||||
|
|
||||||
|
// Koin
|
||||||
|
implementation(Koin.core)
|
||||||
|
|
||||||
|
// Matomo
|
||||||
|
implementation("org.piwik.java.tracking:matomo-java-tracker:1.6")
|
||||||
|
|
||||||
|
implementation(Ktor.slf4j)
|
||||||
|
implementation(Ktor.clientCore)
|
||||||
|
implementation(Ktor.clientJson)
|
||||||
|
implementation(Ktor.clientApache)
|
||||||
|
implementation(Ktor.clientLogging)
|
||||||
|
implementation(Ktor.clientSerialization)
|
||||||
|
implementation(Serialization.json)
|
||||||
|
// testDeps
|
||||||
|
testImplementation(kotlin("test-junit"))
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.test {
|
||||||
|
useJUnit()
|
||||||
|
}
|
20
console-app/src/main/java/main.kt
Normal file
20
console-app/src/main/java/main.kt
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import androidx.compose.runtime.getValue
|
||||||
|
import androidx.compose.runtime.mutableStateOf
|
||||||
|
import androidx.compose.runtime.setValue
|
||||||
|
import com.jakewharton.mosaic.Text
|
||||||
|
import com.jakewharton.mosaic.runMosaic
|
||||||
|
import kotlinx.coroutines.delay
|
||||||
|
|
||||||
|
fun main(/*args: Array<String>*/) = runMosaic {
|
||||||
|
// TODO https://github.com/JakeWharton/mosaic/issues/3
|
||||||
|
var count by mutableStateOf(0)
|
||||||
|
|
||||||
|
setContent {
|
||||||
|
Text("The count is: $count")
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i in 1..20) {
|
||||||
|
delay(250)
|
||||||
|
count = i
|
||||||
|
}
|
||||||
|
}
|
17
console-app/src/main/java/utils/Exceptions.kt
Normal file
17
console-app/src/main/java/utils/Exceptions.kt
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
@file:Suppress("ClassName")
|
||||||
|
|
||||||
|
package utils
|
||||||
|
|
||||||
|
data class ENV_KEY_MISSING(
|
||||||
|
val keyName: String,
|
||||||
|
override val message: String? = "$keyName was not found, please check your ENV variables"
|
||||||
|
) : Exception(message)
|
||||||
|
|
||||||
|
data class HCTI_URL_RESPONSE_ERROR(
|
||||||
|
val response: String,
|
||||||
|
override val message: String? = "Server Error, We Recieved this Resp: $response"
|
||||||
|
) : Exception(message)
|
||||||
|
|
||||||
|
data class RETRY_LIMIT_EXHAUSTED(
|
||||||
|
override val message: String? = "RETRY LIMIT EXHAUSTED!"
|
||||||
|
) : Exception(message)
|
9
console-app/src/main/java/utils/Ext.kt
Normal file
9
console-app/src/main/java/utils/Ext.kt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
package utils
|
||||||
|
|
||||||
|
val String.byProperty: String get() = System.getenv(this)
|
||||||
|
?: throw (ENV_KEY_MISSING(this))
|
||||||
|
|
||||||
|
val String.byOptionalProperty: String? get() = System.getenv(this)
|
||||||
|
|
||||||
|
fun debug(message: String) = println("\n::debug::$message")
|
||||||
|
fun debug(tag: String, message: String) = println("\n::debug::$tag:\n$message")
|
6
console-app/src/main/java/utils/TestClass.kt
Normal file
6
console-app/src/main/java/utils/TestClass.kt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
package utils
|
||||||
|
|
||||||
|
import kotlinx.coroutines.runBlocking
|
||||||
|
|
||||||
|
// Test Class- at development Time
|
||||||
|
fun main(): Unit = runBlocking {}
|
@ -32,7 +32,7 @@ include(
|
|||||||
":maintenance-tasks"
|
":maintenance-tasks"
|
||||||
)
|
)
|
||||||
|
|
||||||
includeBuild("mosaic") {
|
includeBuild("mosaic/mosaic") {
|
||||||
dependencySubstitution {
|
dependencySubstitution {
|
||||||
substitute(module("com.jakewharton.mosaic:mosaic-gradle-plugin")).with(project(":mosaic-gradle-plugin"))
|
substitute(module("com.jakewharton.mosaic:mosaic-gradle-plugin")).with(project(":mosaic-gradle-plugin"))
|
||||||
substitute(module("com.jakewharton.mosaic:mosaic-runtime")).with(project(":mosaic-runtime"))
|
substitute(module("com.jakewharton.mosaic:mosaic-runtime")).with(project(":mosaic-runtime"))
|
||||||
|
Loading…
Reference in New Issue
Block a user