Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gå over til TOML-basert for å styre versjonar av avhengnadar for backend-applikasjonane våre #144

Merged
merged 7 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/app-etterlatte-proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ on:
- main
paths:
- apps/etterlatte-proxy/**
- gradle/libs.versions.toml
pull_request:
branches:
- main
paths:
- apps/etterlatte-proxy/**
- gradle/libs.versions.toml

jobs:
test:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/etterlatte-notifikasjoner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ on:
- main
paths:
- apps/etterlatte-notifikasjoner/**
- gradle/libs.versions.toml
pull_request:
branches:
- main
paths:
- apps/etterlatte-notifikasjoner/**
- gradle/libs.versions.toml

jobs:
test:
Expand Down
24 changes: 10 additions & 14 deletions apps/etterlatte-notifikasjoner/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,20 @@ plugins {
id("etterlatte.common")
}

repositories {
maven("https://jitpack.io")
}

dependencies {
implementation(Ktor.Jackson)
implementation(NavFelles.RapidAndRivers)
implementation(libs.ktor.jackson)
implementation(libs.rapidAndRivers)

implementation(Etterlatte.Common)
implementation(Etterlatte.KtorClientAuth)
implementation(libs.etterlatte.common)
implementation(libs.etterlatte.ktorClientAuth)

implementation(NavFelles.BrukernotifikasjonSchemas)
implementation(Kafka.AvroSerializer) {
implementation(libs.brukernotifikasjonSchemas)
implementation(libs.kafka.avro.serializer) {
exclude(group = "org.slf4j", module = "slf4j-log4j12")
}
implementation(Kafka.Clients)
implementation(libs.kafka.clients)

testImplementation(Kafka.TestContainer)
testImplementation(MockK.MockK)
testImplementation(Etterlatte.CommonTest)
testImplementation(libs.kafka.testcontainer)
testImplementation(libs.mockk)
testImplementation(libs.etterlatte.commonTest)
}
48 changes: 23 additions & 25 deletions apps/etterlatte-proxy/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,34 @@ plugins {
}

repositories {
maven("https://jitpack.io")

// org.apache.cxf:cxf-rt-ws-security:4.0.2 er avhengig av opensaml-xacml-saml-impl:4.2.0
// som i skrivende stund ikke er tilgjengelig på maven central, men i shibboleth
maven("https://build.shibboleth.net/maven/releases/")
}

dependencies {
implementation(Ktor.ServerAuth)
implementation(Ktor.ClientCore)
implementation(Ktor.CallLogging)
implementation(Ktor.ClientApache)
implementation(Ktor.ClientAuth)
implementation(Ktor.ClientLogging)
implementation(Ktor.Jackson)
implementation(Ktor.ServerContentNegotiation)
implementation(Ktor.ClientContentNegotiation)
implementation(Ktor.ServerCore)
implementation(Ktor.ServerNetty)
implementation(Ktor.ServerAuthJwt)
implementation(Ktor.OkHttp)
implementation(NavFelles.NavFellesTokenClientCore)
implementation(NavFelles.TjenestespesifikasjonerTilbakekreving)
implementation(Cxf.CxfLogging)
implementation(Cxf.CxfJaxWs)
implementation(Cxf.CxfTransportsHttp)
implementation(Cxf.CxfWsSecurity)
implementation(Micrometer.Prometheus)
implementation(Jackson.jacksonDatatypejsr310)
implementation(libs.ktor.serverAuth)
implementation(libs.ktor.clientCore)
implementation(libs.ktor.callLogging)
implementation(libs.ktor.clientApache)
implementation(libs.ktor.clientAuth)
implementation(libs.ktor.clientLogging)
implementation(libs.ktor.jackson)
implementation(libs.ktor.serverContentNegotiation)
implementation(libs.ktor.clientContentNegotiation)
implementation(libs.ktor.serverCore)
implementation(libs.ktor.serverNetty)
implementation(libs.ktor.serverAuthJwt)
implementation(libs.ktor.okHttp)
implementation(libs.navFellesTokenClientCore)
implementation(libs.tjenestespesifikasjonerTilbakekreving)
implementation(libs.cxf.logging)
implementation(libs.cxf.jax.ws)
implementation(libs.cxf.transports.http)
implementation(libs.cxf.ws.security)
implementation(libs.micrometer.prometheus)
implementation(libs.jacksonDatatypejsr310)

testImplementation(NavFelles.MockOauth2Server)
testImplementation(Ktor.ServerTests)
testImplementation(libs.mockOauth2Server)
testImplementation(libs.ktor.serverTests)
}
4 changes: 3 additions & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
`kotlin-dsl`
id("ca.cutterslade.analyze") version "1.9.0" apply true
alias(libs.plugins.cutterslade.analyze) apply true
}

group = "no.nav.etterlatte"
Expand All @@ -19,6 +19,8 @@ repositories {

dependencies {
implementation(kotlin("gradle-plugin"))

implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
}

tasks {
Expand Down
7 changes: 7 additions & 0 deletions buildSrc/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dependencyResolutionManagement {
versionCatalogs {
create("libs") {
from(files("../gradle/libs.versions.toml"))
}
}
}
74 changes: 0 additions & 74 deletions buildSrc/src/main/kotlin/Constants.kt

This file was deleted.

16 changes: 10 additions & 6 deletions buildSrc/src/main/kotlin/etterlatte.common.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.gradle.accessors.dm.LibrariesForLibs

val libs = the<LibrariesForLibs>()

plugins {
kotlin("jvm")
Expand All @@ -8,6 +11,7 @@ plugins {
repositories {
mavenCentral()
maven("https://packages.confluent.io/maven/")
maven("https://jitpack.io")
maven {
url = uri("https://maven.pkg.github.com/navikt/pensjon-etterlatte-libs")
credentials {
Expand All @@ -21,14 +25,14 @@ dependencies {
implementation(kotlin("stdlib"))

// Logging
implementation(Logging.Slf4jApi)
implementation(Logging.LogbackClassic)
implementation(Logging.LogstashLogbackEncoder)
implementation(libs.logging.slf4jApi)
implementation(libs.logging.logbackClassic)
implementation(libs.logging.logstashLogbackEncoder)

// JUnit Testing
testImplementation(Jupiter.Api)
testImplementation(Jupiter.Params)
testRuntimeOnly(Jupiter.Engine)
testImplementation(libs.jupiter.api)
testImplementation(libs.jupiter.params)
testRuntimeOnly(libs.jupiter.engine)
}

tasks {
Expand Down
69 changes: 69 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
[plugins]
cutterslade-analyze = { id = "ca.cutterslade.analyze", version = "1.9.0" }


[versions]
navfelles-token-version = "3.0.11"
ktor-version = "2.1.1"
jupiter-version = "5.9.1"
cxf-version = "4.0.2"

[libraries]

#NavFelles
rapidAndRivers = { module = "com.github.navikt:rapids-and-rivers", version = "2022100711511665136276.49acbaae4ed4" }
brukernotifikasjonSchemas = { module = "com.github.navikt:brukernotifikasjon-schemas", version = "2.5.2"}
mockOauth2Server = { module = "no.nav.security:mock-oauth2-server", version = "0.5.4"}
navFellesTokenClientCore = { module = "no.nav.security:token-client-core", version.ref = "navfelles-token-version"}
tjenestespesifikasjonerTilbakekreving = { module = "com.github.navikt.pensjon-etterlatte-tjenestespesifikasjoner:tilbakekreving-v1-tjenestespesifikasjon", version = "1.78ffd1e"}

#Etterlatte
etterlatte-common = { module = "no.nav.etterlatte:common", version = "2023.12.01-19.28.04ed855ae6eb"}
etterlatte-commonTest = { module = "no.nav.etterlatte:common-test", version = "2023.12.01-19.28.04ed855ae6eb"}
etterlatte-ktorClientAuth = { module = "no.nav.etterlatte:ktor-client-auth", version = "2022.09.28-10.09.cce630926582"}

#Ktor
ktor-callLogging = { module = "io.ktor:ktor-server-call-logging", version.ref = "ktor-version"}
ktor-clientCore = { module = "io.ktor:ktor-client-core", version.ref = "ktor-version"}
ktor-clientApache = { module = "io.ktor:ktor-client-apache", version.ref = "ktor-version"}
ktor-clientAuth = { module = "io.ktor:ktor-client-auth", version.ref = "ktor-version"}
ktor-clientContentNegotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor-version"}
ktor-clientLogging = { module = "io.ktor:ktor-client-logging", version.ref = "ktor-version" }
ktor-jackson = { module = "io.ktor:ktor-serialization-jackson", version.ref = "ktor-version" }
ktor-serverAuth = { module = "io.ktor:ktor-server-auth", version.ref = "ktor-version" }
ktor-serverAuthJwt = { module = "io.ktor:ktor-server-auth-jwt", version.ref = "ktor-version" }
ktor-serverCore = { module = "io.ktor:ktor-server-core", version.ref = "ktor-version" }
ktor-serverContentNegotiation = { module = "io.ktor:ktor-server-content-negotiation", version.ref = "ktor-version" }
ktor-serverNetty = { module = "io.ktor:ktor-server-netty", version.ref = "ktor-version" }
ktor-okHttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor-version" }
ktor-serverTests = { module = "io.ktor:ktor-server-tests", version.ref = "ktor-version" }

#Jackson
jacksonDatatypejsr310 = { module = "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", version = "2.15.0" }

#Kafka
kafka-clients = { module = "org.apache.kafka:kafka-clients", version = "3.2.3"}
kafka-avro-serializer = { module = "io.confluent:kafka-avro-serializer", version = "6.2.2"}
kafka-testcontainer = { module = "org.testcontainers:kafka", version = "1.17.3" }

#Jupiter
jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "jupiter-version" }
jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "jupiter-version" }
jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "jupiter-version" }

#Logging
logging-slf4jApi = { module = "org.slf4j:slf4j-api", version = "2.0.2" }
logging-logbackClassic = { module = "ch.qos.logback:logback-classic", version = "1.4.1" }
logging-logstashLogbackEncoder = { module = "net.logstash.logback:logstash-logback-encoder", version = "7.2"}

#Micrometer
micrometer-prometheus = { module = "io.micrometer:micrometer-registry-prometheus", version = "1.9.4"}

#MockK
mockk = { module = "io.mockk:mockk", version = "1.13.1" }

#Cxf
cxf-logging = { module = "org.apache.cxf:cxf-rt-features-logging", version.ref = "cxf-version" }
cxf-jax-ws = { module = "org.apache.cxf:cxf-rt-frontend-jaxws", version.ref = "cxf-version" }
cxf-transports-http = { module = "org.apache.cxf:cxf-rt-transports-http", version.ref = "cxf-version" }
cxf-ws-security = { module = "org.apache.cxf:cxf-rt-ws-security", version.ref = "cxf-version" }