Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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"?>
|
||||
<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">
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
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
|
||||
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
|
||||
|
||||
@@ -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.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")
|
||||
|
||||
@@ -48,7 +48,7 @@ data class Query(
|
||||
}
|
||||
|
||||
override fun status(): Migration.Status {
|
||||
val result = connection.inTransaction {
|
||||
connection.inTransaction {
|
||||
up()
|
||||
down()
|
||||
it.sendQuery("ROLLBACK")
|
||||
|
||||
Reference in New Issue
Block a user