Compare commits
4 Commits
e9ba266d53
...
dd5a3d70c3
| Author | SHA1 | Date | |
|---|---|---|---|
|
dd5a3d70c3
|
|||
|
d5f6c2dac8
|
|||
|
be32a97347
|
|||
|
1811c98073
|
@@ -4,7 +4,7 @@ on:
|
||||
- main
|
||||
|
||||
env:
|
||||
GIT__TOKEN: ${{ secrets.TOKEN }}
|
||||
INFENDRO__TOKEN: ${{ secrets.TOKEN }}
|
||||
|
||||
jobs:
|
||||
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.
|
||||
|
||||
## 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.
|
||||
`migration-kt` is a Kotlin library that enables code-based migrations.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -18,7 +12,7 @@ repositories {
|
||||
}
|
||||
|
||||
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"
|
||||
version = "1.1.1"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.infendro)
|
||||
alias(libs.plugins.kotlin)
|
||||
id("maven-publish")
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(libs.exposed)
|
||||
implementation(libs.exposed.dao)
|
||||
@@ -19,35 +23,12 @@ publishing {
|
||||
publications {
|
||||
create<MavenPublication>("JVM") {
|
||||
from(components["java"])
|
||||
groupId = group as String
|
||||
groupId = project.group as String
|
||||
artifactId = project.name
|
||||
version = version
|
||||
version = project.version as String
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
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"
|
||||
infendro(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]
|
||||
infendro = "1.0.0"
|
||||
kotlin = "2.2.10"
|
||||
exposed = "0.61.0"
|
||||
|
||||
[plugins]
|
||||
infendro = { id = "com.infendro.plugin", version.ref = "infendro" }
|
||||
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
||||
|
||||
[libraries]
|
||||
|
||||
@@ -1 +1,6 @@
|
||||
rootProject.name = "migration"
|
||||
|
||||
pluginManagement.repositories {
|
||||
maven("https://git.infendro.com/api/packages/Infendro/maven")
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user