Skip to content

Commit

Permalink
Move migrations to make the application graalvm-compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
jirkavrba committed Oct 5, 2024
1 parent 9f5a62b commit 75febb3
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 8 deletions.
13 changes: 7 additions & 6 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import io.micronaut.gradle.docker.NativeImageDockerfile

plugins {
id("com.github.johnrengelman.shadow") version "8.1.1"
id("io.micronaut.application") version "4.4.2"
Expand Down Expand Up @@ -39,17 +41,18 @@ dependencies {
testImplementation("org.testcontainers:testcontainers")
}


application {
mainClass = "dev.vrba.dubs.Application"
}

java {
sourceCompatibility = JavaVersion.toVersion("21")
targetCompatibility = JavaVersion.toVersion("21")
}


graalvmNative.toolchainDetection = false
graalvmNative {
toolchainDetection = false
}

micronaut {
runtime("netty")
Expand All @@ -72,9 +75,7 @@ micronaut {
}
}


tasks.named<io.micronaut.gradle.docker.NativeImageDockerfile>("dockerfileNative") {
tasks.named<NativeImageDockerfile>("dockerfileNative") {
jdkVersion = "21"
}


5 changes: 3 additions & 2 deletions api/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ micronaut:
application:
name: dubs-bot-api

server:
port: ${PORT:8080}

serde:
serialization:
inclusion: always
Expand Down Expand Up @@ -59,8 +62,6 @@ flyway:
datasources:
default:
enabled: true
locations:
- classpath:migrations

jpa:
default:
Expand Down

0 comments on commit 75febb3

Please sign in to comment.