Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c73ef1e0f | ||
|
|
4c03eb7c87 | ||
|
|
07678afbe7 | ||
|
|
d3bcfdd627 |
1
.idea/.name
generated
1
.idea/.name
generated
@@ -1 +0,0 @@
|
|||||||
postgresjson
|
|
||||||
5
.idea/misc.xml
generated
5
.idea/misc.xml
generated
@@ -1,6 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="false" project-jdk-name="adopt-openjdk-11" project-jdk-type="JavaSDK">
|
<component name="FrameworkDetectionExcludesConfiguration">
|
||||||
|
<file type="web" url="file://$PROJECT_DIR$" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="adopt-openjdk-11" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/out" />
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
</component>
|
</component>
|
||||||
<component name="TaskProjectConfiguration">
|
<component name="TaskProjectConfiguration">
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
group = "fr.postgresjson"
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
version = "0.1"
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
jacoco
|
jacoco
|
||||||
@@ -9,13 +8,25 @@ plugins {
|
|||||||
|
|
||||||
id("org.jlleitschuh.gradle.ktlint") version "8.2.0"
|
id("org.jlleitschuh.gradle.ktlint") version "8.2.0"
|
||||||
id("org.owasp.dependencycheck") version "5.1.0"
|
id("org.owasp.dependencycheck") version "5.1.0"
|
||||||
|
id("fr.coppernic.versioning") version "3.1.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
group = "flecomte"
|
||||||
|
version = versioning.info.tag
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.withType<KotlinCompile> {
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = "11"
|
||||||
|
sourceCompatibility = "11"
|
||||||
|
targetCompatibility = "11"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
|
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
|
||||||
implementation("org.jetbrains.kotlin:kotlin-reflect:1.3.31")
|
implementation("org.jetbrains.kotlin:kotlin-reflect:1.3.31")
|
||||||
@@ -31,14 +42,27 @@ dependencies {
|
|||||||
testImplementation("org.amshove.kluent:kluent:1.47")
|
testImplementation("org.amshove.kluent:kluent:1.47")
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
val sourcesJar by tasks.creating(Jar::class) {
|
||||||
publications {
|
archiveClassifier.set("sources")
|
||||||
create<MavenPublication>("maven") {
|
from(sourceSets.getByName("main").allSource)
|
||||||
groupId = "fr.postgresjson"
|
}
|
||||||
artifactId = "postgresjson"
|
|
||||||
version = "0.1"
|
|
||||||
|
|
||||||
from(components["java"])
|
publishing {
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
name = "postgres-json"
|
||||||
|
url = uri("https://maven.pkg.github.com/flecomte/postgres-json")
|
||||||
|
credentials {
|
||||||
|
username = System.getenv("GITHUB_USERNAME")
|
||||||
|
password = System.getenv("GITHUB_TOKEN")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
publications {
|
||||||
|
create<MavenPublication>("postgres-json") {
|
||||||
|
from(components["java"])
|
||||||
|
artifact(sourcesJar)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
|||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-bin.zip
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
2
jitpack.yml
Normal file
2
jitpack.yml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
jdk:
|
||||||
|
- openjdk11
|
||||||
@@ -1 +1 @@
|
|||||||
rootProject.name = 'postgresjson'
|
rootProject.name = 'postgres-json'
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import fr.postgresjson.connexion.Connection
|
|||||||
import fr.postgresjson.migration.Migration.Action
|
import fr.postgresjson.migration.Migration.Action
|
||||||
import fr.postgresjson.migration.Migration.Status
|
import fr.postgresjson.migration.Migration.Status
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import java.util.concurrent.CompletionException
|
import java.util.concurrent.*
|
||||||
import fr.postgresjson.definition.Function as DefinitionFunction
|
import fr.postgresjson.definition.Function as DefinitionFunction
|
||||||
|
|
||||||
data class Function(
|
data class Function(
|
||||||
@@ -75,7 +75,7 @@ data class Function(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun status(): Status {
|
override fun status(): Status {
|
||||||
val result = connection.inTransaction {
|
connection.inTransaction {
|
||||||
up()
|
up()
|
||||||
down()
|
down()
|
||||||
it.sendQuery("ROLLBACK")
|
it.sendQuery("ROLLBACK")
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ data class Query(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun status(): Migration.Status {
|
override fun status(): Migration.Status {
|
||||||
val result = connection.inTransaction {
|
connection.inTransaction {
|
||||||
up()
|
up()
|
||||||
down()
|
down()
|
||||||
it.sendQuery("ROLLBACK")
|
it.sendQuery("ROLLBACK")
|
||||||
|
|||||||
Reference in New Issue
Block a user