diff --git a/build.gradle.kts b/build.gradle.kts index 2f29872..06634c7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,22 +4,20 @@ import com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransf group = "no.nav.syfo" version = "1.0-SNAPSHOT" -object Versions { - const val coroutinesVersion = "1.7.3" - const val kotlinSerializationVersion = "0.20.0" - const val ktorVersion = "2.3.2" - const val logbackVersion = "1.2.3" - const val logstashEncoderVersion = "5.1" - const val prometheusVersion = "0.8.1" - const val jacksonVersion = "2.15.2" - const val mockkVersion = "1.13.5" - const val kotestVersion = "5.6.2" - const val kotestExtensionsVersion = "2.0.0" - const val kotlinVersion = "1.9.0" - const val javaJwtVersion = "4.4.0" - const val nimbusVersion = "9.31" - const val detektVersion = "1.23.1" -} +val coroutinesVersion = "1.7.3" +val kotlinSerializationVersion = "0.20.0" +val ktorVersion = "2.3.2" +val logbackVersion = "1.2.3" +val logstashEncoderVersion = "5.1" +val prometheusVersion = "0.8.1" +val jacksonVersion = "2.15.2" +val mockkVersion = "1.13.5" +val kotestVersion = "5.6.2" +val kotestExtensionsVersion = "2.0.0" +val kotlinVersion = "1.9.0" +val javaJwtVersion = "4.4.0" +val nimbusVersion = "9.31" +val detektVersion = "1.23.1" tasks.withType { manifest.attributes["Main-Class"] = "no.nav.syfo.MainApplicationKt" @@ -46,51 +44,51 @@ repositories { dependencies { implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-slf4j:${Versions.coroutinesVersion}") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.coroutinesVersion}") - implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:${Versions.kotlinSerializationVersion}") - implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:${Versions.kotlinSerializationVersion}") - - implementation("io.prometheus:simpleclient_hotspot:${Versions.prometheusVersion}") - implementation("io.prometheus:simpleclient_common:${Versions.prometheusVersion}") - - implementation("io.ktor:ktor-server-netty:${Versions.ktorVersion}") - implementation("io.ktor:ktor-server-content-negotiation:${Versions.ktorVersion}") - implementation("io.ktor:ktor-server-status-pages:${Versions.ktorVersion}") - implementation("io.ktor:ktor-server-call-id:${Versions.ktorVersion}") - implementation("io.ktor:ktor-serialization-jackson:${Versions.ktorVersion}") - implementation("io.ktor:ktor-client-cio:${Versions.ktorVersion}") - implementation("io.ktor:ktor-client-apache:${Versions.ktorVersion}") - implementation("io.ktor:ktor-client-logging:${Versions.ktorVersion}") - implementation("io.ktor:ktor-client-logging-jvm:${Versions.ktorVersion}") - implementation("io.ktor:ktor-client-jackson:${Versions.ktorVersion}") - implementation("io.ktor:ktor-client-core:${Versions.ktorVersion}") - implementation("io.ktor:ktor-client-content-negotiation:${Versions.ktorVersion}") - - implementation("ch.qos.logback:logback-classic:${Versions.logbackVersion}") - implementation("net.logstash.logback:logstash-logback-encoder:${Versions.logstashEncoderVersion}") - implementation("com.fasterxml.jackson.core:jackson-databind:${Versions.jacksonVersion}") - implementation("com.fasterxml.jackson.module:jackson-module-kotlin:${Versions.jacksonVersion}") - implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${Versions.jacksonVersion}") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-slf4j:$coroutinesVersion") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion") + implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:$kotlinSerializationVersion") + implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:$kotlinSerializationVersion") + + implementation("io.prometheus:simpleclient_hotspot:$prometheusVersion") + implementation("io.prometheus:simpleclient_common:$prometheusVersion") + + implementation("io.ktor:ktor-server-netty:$ktorVersion") + implementation("io.ktor:ktor-server-content-negotiation:$ktorVersion") + implementation("io.ktor:ktor-server-status-pages:$ktorVersion") + implementation("io.ktor:ktor-server-call-id:$ktorVersion") + implementation("io.ktor:ktor-serialization-jackson:$ktorVersion") + implementation("io.ktor:ktor-client-cio:$ktorVersion") + implementation("io.ktor:ktor-client-apache:$ktorVersion") + implementation("io.ktor:ktor-client-logging:$ktorVersion") + implementation("io.ktor:ktor-client-logging-jvm:$ktorVersion") + implementation("io.ktor:ktor-client-jackson:$ktorVersion") + implementation("io.ktor:ktor-client-core:$ktorVersion") + implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion") + + implementation("ch.qos.logback:logback-classic:$logbackVersion") + implementation("net.logstash.logback:logstash-logback-encoder:$logstashEncoderVersion") + implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion") + implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion") + implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion") // Auth - implementation("io.ktor:ktor-server-auth:${Versions.ktorVersion}") - implementation("io.ktor:ktor-server-auth-jwt:${Versions.ktorVersion}") - implementation("com.auth0:java-jwt:${Versions.javaJwtVersion}") - implementation("com.nimbusds:nimbus-jose-jwt:${Versions.nimbusVersion}") + implementation("io.ktor:ktor-server-auth:$ktorVersion") + implementation("io.ktor:ktor-server-auth-jwt:$ktorVersion") + implementation("com.auth0:java-jwt:$javaJwtVersion") + implementation("com.nimbusds:nimbus-jose-jwt:$nimbusVersion") // Testing testImplementation(kotlin("test")) - testImplementation("org.jetbrains.kotlin:kotlin-test:${Versions.kotlinVersion}") - testImplementation("io.kotest:kotest-runner-junit5-jvm:${Versions.kotestVersion}") - testImplementation("io.kotest:kotest-assertions-core:${Versions.kotestVersion}") - testImplementation("io.kotest:kotest-property:${Versions.kotestVersion}") - testImplementation("io.kotest.extensions:kotest-assertions-ktor:${Versions.kotestExtensionsVersion}") - testImplementation("io.mockk:mockk:${Versions.mockkVersion}") - testImplementation("io.ktor:ktor-server-test-host:${Versions.ktorVersion}") + testImplementation("org.jetbrains.kotlin:kotlin-test:$kotlinVersion") + testImplementation("io.kotest:kotest-runner-junit5-jvm:$kotestVersion") + testImplementation("io.kotest:kotest-assertions-core:$kotestVersion") + testImplementation("io.kotest:kotest-property:$kotestVersion") + testImplementation("io.kotest.extensions:kotest-assertions-ktor:$kotestExtensionsVersion") + testImplementation("io.mockk:mockk:$mockkVersion") + testImplementation("io.ktor:ktor-server-test-host:$ktorVersion") - api("io.ktor:ktor-client-mock:${Versions.ktorVersion}") - api("io.ktor:ktor-client-mock-jvm:${Versions.ktorVersion}") + api("io.ktor:ktor-client-mock:$ktorVersion") + api("io.ktor:ktor-client-mock-jvm:$ktorVersion") constraints { implementation("org.eclipse.jetty:jetty-io:11.0.2") @@ -100,12 +98,11 @@ dependencies { } detekt { - toolVersion = Versions.detektVersion + toolVersion = detektVersion config.setFrom(file("config/detekt/detekt.yml")) buildUponDefaultConfig = true } - java.toolchain { languageVersion.set(JavaLanguageVersion.of(19)) vendor.set(JvmVendorSpec.ADOPTIUM)