refactor
This commit is contained in:
@@ -12,9 +12,9 @@ plugins {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(libs.migration)
|
||||
implementation(libs.ktor.server)
|
||||
implementation(libs.exposed)
|
||||
implementation(libs.migration)
|
||||
}
|
||||
|
||||
publishing {
|
||||
|
||||
@@ -2,13 +2,12 @@
|
||||
kotlin = "2.2.10"
|
||||
ktor = "3.2.3"
|
||||
exposed = "0.61.0"
|
||||
migration = "1.1.0"
|
||||
migration = "1.1.1"
|
||||
|
||||
[plugins]
|
||||
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
||||
|
||||
[libraries]
|
||||
ktor-server = { module = "io.ktor:ktor-server-core-jvm", version.ref = "ktor" }
|
||||
|
||||
exposed = { module = "org.jetbrains.exposed:exposed-core", version.ref = "exposed" }
|
||||
migration = { module = "com.infendro:migration", version.ref = "migration" }
|
||||
ktor-server = { module = "io.ktor:ktor-server-core-jvm", version.ref = "ktor" }
|
||||
exposed = { module = "org.jetbrains.exposed:exposed-core", version.ref = "exposed" }
|
||||
|
||||
@@ -1 +1 @@
|
||||
rootProject.name = "ktor-migration"
|
||||
rootProject.name = "migration-ktor"
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
package com.infendro.ktor.migration
|
||||
|
||||
import com.infendro.migration.Config
|
||||
import com.infendro.migration.migrate
|
||||
import io.ktor.server.application.*
|
||||
import org.jetbrains.exposed.sql.Transaction
|
||||
|
||||
@Suppress("UNUSED")
|
||||
val Migration = createApplicationPlugin(
|
||||
name = "Migration",
|
||||
createConfiguration = { MigrationConfig() },
|
||||
@@ -14,9 +12,8 @@ val Migration = createApplicationPlugin(
|
||||
}
|
||||
|
||||
class MigrationConfig {
|
||||
internal val config = Config()
|
||||
internal val config = com.infendro.migration.MigrationConfig()
|
||||
|
||||
@Suppress("UNUSED")
|
||||
fun migration(
|
||||
name: String,
|
||||
migrate: Transaction.() -> Unit,
|
||||
|
||||
Reference in New Issue
Block a user