Skip to content

Commit 0c0c667

Browse files
committed
Legger til flyway postgresql moduk.
Byy feiler fordi graphql client generator ikke støtter Spring Boot 3.3.x enda. ExpediaGroup/graphql-kotlin#1975
1 parent e0f6e98 commit 0c0c667

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

build.gradle.kts

+10-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ plugins {
1414

1515
group = "no.nav"
1616
version = "0.0.1-SNAPSHOT"
17-
java.sourceCompatibility = JavaVersion.VERSION_21
17+
18+
java {
19+
sourceCompatibility = JavaVersion.VERSION_21
20+
targetCompatibility = JavaVersion.VERSION_21
21+
}
1822

1923
configurations {
2024
compileOnly {
@@ -107,6 +111,7 @@ dependencies {
107111
// Database
108112
runtimeOnly("org.postgresql:postgresql:$postgresqlVersion")
109113
implementation("org.flywaydb:flyway-core")
114+
implementation("org.flywaydb:flyway-database-postgresql")
110115
testImplementation("org.testcontainers:junit-jupiter:$testContainersVersion")
111116
testImplementation("org.testcontainers:postgresql:$testContainersVersion")
112117

@@ -159,9 +164,8 @@ tasks.withType<Test> {
159164
}
160165

161166
tasks.withType<KotlinCompile> {
162-
kotlinOptions {
163-
freeCompilerArgs = listOf("-Xjsr305=strict")
164-
jvmTarget = "21"
167+
compilerOptions {
168+
freeCompilerArgs.add("-Xjsr305=strict")
165169
}
166170
}
167171

@@ -196,13 +200,13 @@ sonarqube {
196200
* For mer info, se lenke under
197201
* https://opensource.expediagroup.com/graphql-kotlin/docs/plugins/gradle-plugin-usage#generating-multiple-clients
198202
*/
199-
val graphqlGenerateClient by tasks.getting(GraphQLGenerateClientTask::class) {
203+
val generateSafGraphqlClient by tasks.getting(GraphQLGenerateClientTask::class) {
200204
queryFileDirectory.set(file("${project.projectDir}/src/main/resources/saf"))
201205
schemaFile.set(file("${project.projectDir}/src/main/resources/saf/saf-api-sdl.graphqls"))
202206
packageName.set("no.nav.sifinnsynapi.saf.generated")
203207
}
204208

205-
val graphqlGenerateOtherClient by tasks.creating(GraphQLGenerateClientTask::class) {
209+
val generateSafSelvbetjeningGraphqlClient by tasks.creating(GraphQLGenerateClientTask::class) {
206210
queryFileDirectory.set(file("${project.projectDir}/src/main/resources/safselvbetjening"))
207211
schemaFile.set(file("${project.projectDir}/src/main/resources/safselvbetjening/saf-selvbetjening-sdl.graphqls"))
208212
packageName.set("no.nav.sifinnsynapi.safselvbetjening.generated")

src/test/resources/application-test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ application-ingress: http://localhost:9999
6161

6262
spring:
6363
datasource:
64-
url: jdbc:tc:postgresql:12:///
64+
url: jdbc:tc:postgresql:14:///
6565
driver-class-name: org.testcontainers.jdbc.ContainerDatabaseDriver
6666
flyway:
6767
enabled: true
6868
jpa:
6969
show-sql: true
70-
database-platform: org.hibernate.dialect.PostgreSQL12Dialect
70+
database-platform: org.hibernate.dialect.PostgreSQL14Dialect
7171

7272
logging:
7373
level:

0 commit comments

Comments
 (0)