Compare commits
4 Commits
e9ba266d53
...
dd5a3d70c3
| Author | SHA1 | Date | |
|---|---|---|---|
|
dd5a3d70c3
|
|||
|
d5f6c2dac8
|
|||
|
be32a97347
|
|||
|
1811c98073
|
@@ -4,7 +4,7 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GIT__TOKEN: ${{ secrets.TOKEN }}
|
INFENDRO__TOKEN: ${{ secrets.TOKEN }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
|
|||||||
12
README.md
12
README.md
@@ -1,12 +1,6 @@
|
|||||||
# Kotlin Database Migration
|
# migration-kt
|
||||||
|
|
||||||
This library enables code-based database migrations in Kotlin.
|
`migration-kt` is a Kotlin library that enables code-based migrations.
|
||||||
|
|
||||||
## Features
|
|
||||||
|
|
||||||
* Declare database migrations (identified by a unique name).
|
|
||||||
* Migrations are executed in the order they are declared in.
|
|
||||||
* Executed migrations are tracked in a database table and skipped on subsequent runs.
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@@ -18,7 +12,7 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("com.infendro:migration:1.1.0")
|
implementation("com.infendro:migration:1.1.1")
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,19 @@
|
|||||||
|
import com.infendro.plugin.infendro
|
||||||
|
import com.infendro.plugin.token
|
||||||
|
|
||||||
group = "com.infendro"
|
group = "com.infendro"
|
||||||
version = "1.1.1"
|
version = "1.1.1"
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
|
alias(libs.plugins.infendro)
|
||||||
alias(libs.plugins.kotlin)
|
alias(libs.plugins.kotlin)
|
||||||
id("maven-publish")
|
id("maven-publish")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(libs.exposed)
|
implementation(libs.exposed)
|
||||||
implementation(libs.exposed.dao)
|
implementation(libs.exposed.dao)
|
||||||
@@ -19,35 +23,12 @@ publishing {
|
|||||||
publications {
|
publications {
|
||||||
create<MavenPublication>("JVM") {
|
create<MavenPublication>("JVM") {
|
||||||
from(components["java"])
|
from(components["java"])
|
||||||
groupId = group as String
|
groupId = project.group as String
|
||||||
artifactId = project.name
|
artifactId = project.name
|
||||||
version = version
|
version = project.version as String
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
infendro(token)
|
||||||
url = uri("https://git.infendro.com/api/packages/Infendro/maven")
|
|
||||||
authentication.create("header", HttpHeaderAuthentication::class)
|
|
||||||
credentials(HttpHeaderCredentials::class) {
|
|
||||||
val token = secret("git.token") ?: throw GradleException()
|
|
||||||
|
|
||||||
name = "Authorization"
|
|
||||||
value = "token $token"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun secret(
|
|
||||||
key: String,
|
|
||||||
): String? {
|
|
||||||
val property = key
|
|
||||||
val environment = key
|
|
||||||
.uppercase()
|
|
||||||
.replace(".", "__")
|
|
||||||
|
|
||||||
val prop = properties[property] as String?
|
|
||||||
val env = System.getenv(environment)
|
|
||||||
|
|
||||||
return prop ?: env
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
[versions]
|
[versions]
|
||||||
|
infendro = "1.0.0"
|
||||||
kotlin = "2.2.10"
|
kotlin = "2.2.10"
|
||||||
exposed = "0.61.0"
|
exposed = "0.61.0"
|
||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
|
infendro = { id = "com.infendro.plugin", version.ref = "infendro" }
|
||||||
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
|
|||||||
@@ -1 +1,6 @@
|
|||||||
rootProject.name = "migration"
|
rootProject.name = "migration"
|
||||||
|
|
||||||
|
pluginManagement.repositories {
|
||||||
|
maven("https://git.infendro.com/api/packages/Infendro/maven")
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user