2 Commits
1.0.0 ... 1.0.2

Author SHA1 Message Date
Fabrice Lecomte
07678afbe7 set JVM to 11 2020-03-25 16:18:17 +01:00
Fabrice Lecomte
d3bcfdd627 config package 2020-03-25 15:26:19 +01:00
7 changed files with 42 additions and 18 deletions

1
.idea/.name generated
View File

@@ -1 +0,0 @@
postgresjson

5
.idea/misc.xml generated
View File

@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<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" />
</component>
<component name="TaskProjectConfiguration">

View File

@@ -1,5 +1,4 @@
group = "fr.postgresjson"
version = "0.1"
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
jacoco
@@ -9,13 +8,23 @@ plugins {
id("org.jlleitschuh.gradle.ktlint") version "8.2.0"
id("org.owasp.dependencycheck") version "5.1.0"
id("fr.coppernic.versioning") version "3.1.2"
}
group = "flecomte"
version = versioning.info.tag
repositories {
mavenCentral()
jcenter()
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "11"
}
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlin:kotlin-reflect:1.3.31")
@@ -31,14 +40,27 @@ dependencies {
testImplementation("org.amshove.kluent:kluent:1.47")
}
publishing {
publications {
create<MavenPublication>("maven") {
groupId = "fr.postgresjson"
artifactId = "postgresjson"
version = "0.1"
val sourcesJar by tasks.creating(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets.getByName("main").allSource)
}
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)
}
}
}

View File

@@ -1,5 +1,5 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

View File

@@ -1 +1 @@
rootProject.name = 'postgresjson'
rootProject.name = 'postgres-json'

View File

@@ -5,7 +5,7 @@ import fr.postgresjson.connexion.Connection
import fr.postgresjson.migration.Migration.Action
import fr.postgresjson.migration.Migration.Status
import java.util.*
import java.util.concurrent.CompletionException
import java.util.concurrent.*
import fr.postgresjson.definition.Function as DefinitionFunction
data class Function(
@@ -75,7 +75,7 @@ data class Function(
}
override fun status(): Status {
val result = connection.inTransaction {
connection.inTransaction {
up()
down()
it.sendQuery("ROLLBACK")

View File

@@ -48,7 +48,7 @@ data class Query(
}
override fun status(): Migration.Status {
val result = connection.inTransaction {
connection.inTransaction {
up()
down()
it.sendQuery("ROLLBACK")