Upgrade versions, etc
This commit is contained in:
parent
761382da23
commit
f255064533
@ -8,12 +8,11 @@ kotlinDslPluginOptions {
|
||||
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
maven { setUrl("https://kotlin.bintray.com/kotlinx") }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.30")
|
||||
implementation("org.jetbrains.kotlin:kotlin-serialization:1.4.30")
|
||||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.31")
|
||||
implementation("org.jetbrains.kotlin:kotlin-serialization:1.4.31")
|
||||
implementation("com.github.jengelman.gradle.plugins:shadow:6.1.0")
|
||||
implementation("org.jlleitschuh.gradle:ktlint-gradle:9.4.1")
|
||||
implementation("com.github.ben-manes:gradle-versions-plugin:0.28.0")
|
||||
|
||||
@ -11,8 +11,8 @@ object Libs {
|
||||
}
|
||||
|
||||
object Database {
|
||||
const val flyway = "org.flywaydb:flyway-core:7.5.2"
|
||||
const val hikariCP = "com.zaxxer:HikariCP:4.0.1"
|
||||
const val flyway = "org.flywaydb:flyway-core:7.5.4"
|
||||
const val hikariCP = "com.zaxxer:HikariCP:4.0.2"
|
||||
|
||||
object Drivers {
|
||||
const val h2 = "com.h2database:h2:1.4.200"
|
||||
@ -27,20 +27,20 @@ object Libs {
|
||||
}
|
||||
|
||||
object Lucene {
|
||||
private const val version = "8.8.0"
|
||||
private const val version = "8.8.1"
|
||||
const val core = "org.apache.lucene:lucene-core:$version"
|
||||
const val analyzersCommon = "org.apache.lucene:lucene-analyzers-common:$version"
|
||||
const val queryParser = "org.apache.lucene:lucene-queryparser:$version"
|
||||
}
|
||||
|
||||
object Http4k {
|
||||
private const val version = "4.2.0.0"
|
||||
private const val version = "4.3.5.4"
|
||||
const val core = "org.http4k:http4k-core:$version"
|
||||
const val testingHamkrest = "org.http4k:http4k-testing-hamkrest:$version"
|
||||
}
|
||||
|
||||
object Jetty {
|
||||
private const val version = "10.0.0"
|
||||
private const val version = "10.0.1"
|
||||
const val server = "org.eclipse.jetty:jetty-server:$version"
|
||||
const val servlet = "org.eclipse.jetty:jetty-servlet:$version"
|
||||
}
|
||||
@ -49,7 +49,7 @@ object Libs {
|
||||
const val html = "org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.2"
|
||||
|
||||
object Serialization {
|
||||
const val json = "org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.0.1"
|
||||
const val json = "org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.1.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -65,28 +65,28 @@ object Libs {
|
||||
}
|
||||
|
||||
object Micronaut {
|
||||
private const val version = "2.3.1"
|
||||
private const val version = "2.3.3"
|
||||
const val inject = "io.micronaut:micronaut-inject:$version"
|
||||
const val processor = "io.micronaut:micronaut-inject-java:$version"
|
||||
}
|
||||
|
||||
const val arrowCoreData = "io.arrow-kt:arrow-core-data:0.11.0"
|
||||
const val commonsCompress = "org.apache.commons:commons-compress:1.20"
|
||||
const val javaJwt = "com.auth0:java-jwt:3.12.1"
|
||||
const val javaJwt = "com.auth0:java-jwt:3.13.0"
|
||||
const val javaxServlet = "javax.servlet:javax.servlet-api:4.0.1"
|
||||
const val jbcrypt = "org.mindrot:jbcrypt:0.4"
|
||||
const val konform = "io.konform:konform-jvm:0.2.0"
|
||||
const val owaspHtmlSanitizer = "com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:20200713.1"
|
||||
const val prettytime = "org.ocpsoft.prettytime:prettytime:5.0.0.Final"
|
||||
const val snakeyaml = "org.yaml:snakeyaml:1.27"
|
||||
const val snakeyaml = "org.yaml:snakeyaml:1.28"
|
||||
|
||||
object Test {
|
||||
const val assertJ = "org.assertj:assertj-core:3.19.0"
|
||||
const val hamkrest = "com.natpryce:hamkrest:1.8.0.1"
|
||||
const val junit = "org.junit.jupiter:junit-jupiter:5.7.1"
|
||||
const val mockk = "io.mockk:mockk:1.10.5"
|
||||
const val mockk = "io.mockk:mockk:1.10.6"
|
||||
const val faker = "com.github.javafaker:javafaker:1.0.2"
|
||||
const val mariaTestContainer = "org.testcontainers:mariadb:1.15.1"
|
||||
const val mariaTestContainer = "org.testcontainers:mariadb:1.15.2"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -3,10 +3,16 @@ package be.simplenotes
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.artifacts.dsl.DependencyHandler
|
||||
import org.jetbrains.kotlin.gradle.plugin.KaptExtension
|
||||
|
||||
class MicronautPlugin : Plugin<Project> {
|
||||
override fun apply(target: Project) {
|
||||
target.plugins.apply("org.jetbrains.kotlin.kapt")
|
||||
target.extensions.configure<KaptExtension>("kapt") {
|
||||
arguments {
|
||||
arg("micronaut.processing.incremental", true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -6,8 +6,11 @@ plugins {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url = uri("https://dl.bintray.com/arrow-kt/arrow-kt/") }
|
||||
maven { url = uri("https://kotlin.bintray.com/kotlinx") }
|
||||
maven {
|
||||
url = uri("https://kotlin.bintray.com/kotlinx")
|
||||
// https://github.com/Kotlin/kotlinx.html/issues/173
|
||||
content { includeModule("org.jetbrains.kotlinx", "kotlinx-html-jvm") }
|
||||
}
|
||||
}
|
||||
|
||||
group = "be.simplenotes"
|
||||
|
||||
@ -8,7 +8,8 @@ plugins {
|
||||
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib-jdk8"))
|
||||
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.4.30"))
|
||||
implementation(platform(kotlin("bom")))
|
||||
testImplementation(platform(kotlin("bom")))
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile> {
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import be.simplenotes.Libs
|
||||
import be.simplenotes.micronaut
|
||||
import be.simplenotes.micronautFixtures
|
||||
|
||||
plugins {
|
||||
id("be.simplenotes.base")
|
||||
@ -48,7 +47,8 @@ dependencies {
|
||||
testFixturesImplementation(Libs.Database.hikariCP)
|
||||
|
||||
micronaut()
|
||||
micronautFixtures()
|
||||
|
||||
testFixturesImplementation(kotlin("bom"))
|
||||
}
|
||||
|
||||
kotlin.sourceSets["testFixtures"].kotlin.srcDirs("testfixtures")
|
||||
|
||||
@ -1,35 +0,0 @@
|
||||
package be.simplenotes.persistence
|
||||
|
||||
import be.simplenotes.config.DataSourceConfig
|
||||
import io.micronaut.context.BeanContext
|
||||
import org.flywaydb.core.Flyway
|
||||
import org.junit.jupiter.api.BeforeAll
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
import javax.sql.DataSource
|
||||
|
||||
abstract class DbTest {
|
||||
|
||||
abstract fun dataSourceConfig(): DataSourceConfig
|
||||
|
||||
val beanContext = BeanContext.build()
|
||||
|
||||
inline fun <reified T> BeanContext.getBean(): T = getBean(T::class.java)
|
||||
|
||||
@BeforeAll
|
||||
fun setComponent() {
|
||||
beanContext.registerSingleton(dataSourceConfig())
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
fun beforeEach() {
|
||||
val migration = beanContext.getBean<DbMigrations>()
|
||||
val dataSource = beanContext.getBean<DataSource>()
|
||||
|
||||
Flyway.configure()
|
||||
.dataSource(dataSource)
|
||||
.load()
|
||||
.clean()
|
||||
|
||||
migration.migrate()
|
||||
}
|
||||
}
|
||||
1
persistence/testfixtures/Empty.kt
Normal file
1
persistence/testfixtures/Empty.kt
Normal file
@ -0,0 +1 @@
|
||||
package be.simplenotes.persistence
|
||||
Loading…
x
Reference in New Issue
Block a user