mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2025-11-08 16:10:26 +00:00
add template for startup and readme
This commit is contained in:
16
startup/template/server/build.gradle
Normal file
16
startup/template/server/build.gradle
Normal file
@@ -0,0 +1,16 @@
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.multiplatform"
|
||||
id "org.jetbrains.kotlin.plugin.serialization"
|
||||
}
|
||||
|
||||
apply from: "$mppJavaProjectPresetPath"
|
||||
|
||||
kotlin {
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
api project(":${rootProject.name}.module_name.common")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package group_name.module_name.server
|
||||
|
||||
import dev.inmo.micro_utils.startup.plugin.StartPlugin
|
||||
import kotlinx.serialization.json.JsonObject
|
||||
import org.koin.core.Koin
|
||||
import org.koin.core.module.Module
|
||||
|
||||
object ServerPlugin : StartPlugin {
|
||||
override fun Module.setupDI(config: JsonObject) {
|
||||
}
|
||||
|
||||
override suspend fun startPlugin(koin: Koin) {
|
||||
super.startPlugin(koin)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package group_name.module_name.server
|
||||
|
||||
import group_name.module_name.common.CommonJVMPlugin
|
||||
import dev.inmo.micro_utils.startup.plugin.StartPlugin
|
||||
import kotlinx.serialization.json.JsonObject
|
||||
import org.koin.core.Koin
|
||||
import org.koin.core.module.Module
|
||||
|
||||
object ServerJVMPlugin : StartPlugin {
|
||||
override fun Module.setupDI(config: JsonObject) {
|
||||
with(CommonJVMPlugin) { setupDI(config) }
|
||||
with(ServerPlugin) { setupDI(config) }
|
||||
}
|
||||
|
||||
override suspend fun startPlugin(koin: Koin) {
|
||||
super.startPlugin(koin)
|
||||
CommonJVMPlugin.startPlugin(koin)
|
||||
ServerPlugin.startPlugin(koin)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user