Skip to content

Commit 839cc4e

Browse files
author
=
committed
feat: new dependencies added
1 parent 9f8d30b commit 839cc4e

File tree

5 files changed

+45
-2
lines changed

5 files changed

+45
-2
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@ out/
3333
/.nb-gradle/
3434

3535
### VS Code ###
36-
.vscode/
36+
.vscode/
37+
38+
src/main/resources/application.conf

Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Use a base image with the desired JDK version
2+
FROM adoptopenjdk:11-jdk-hotspot
3+
4+
# Set the working directory inside the container
5+
WORKDIR /app
6+
7+
# Copy the gradlew file and the gradle directory to the container
8+
COPY gradlew .
9+
COPY gradle ./gradle
10+
11+
# Give execute permission to gradlew
12+
RUN chmod +x ./gradlew
13+
14+
# Copy the build.gradle.kts and settings.gradle.kts files to the container
15+
COPY build.gradle.kts settings.gradle.kts ./
16+
17+
# Copy the source code to the container
18+
COPY src ./src
19+
20+
RUN ./gradlew build
21+
22+
EXPOSE 8080
23+
24+
# Start the application when the container starts
25+
CMD ["java", "-jar", "build/libs/food-api-all.jar"]

build.gradle.kts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
val ktor_version: String by project
22
val kotlin_version: String by project
33
val logback_version: String by project
4+
val exposed_version: String by project
5+
val postgresql_version: String by project
6+
val kotlinx_datetime_version: String by project
47

58
plugins {
69
kotlin("jvm") version "1.9.23"
@@ -22,6 +25,10 @@ repositories {
2225
mavenCentral()
2326
}
2427

28+
tasks.shadowJar {
29+
mergeServiceFiles()
30+
}
31+
2532
dependencies {
2633
implementation("io.ktor:ktor-server-core-jvm")
2734
implementation("io.ktor:ktor-server-content-negotiation-jvm")
@@ -30,4 +37,10 @@ dependencies {
3037
implementation("ch.qos.logback:logback-classic:$logback_version")
3138
testImplementation("io.ktor:ktor-server-tests-jvm")
3239
testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version")
40+
implementation("org.jetbrains.exposed:exposed-core:$exposed_version")
41+
implementation("org.jetbrains.exposed:exposed-dao:$exposed_version")
42+
implementation("org.jetbrains.exposed:exposed-jdbc:$exposed_version")
43+
implementation("org.postgresql:postgresql:$postgresql_version")
44+
implementation("org.jetbrains.kotlinx:kotlinx-datetime:$kotlinx_datetime_version")
45+
implementation("org.jetbrains.exposed:exposed-java-time:$exposed_version")
3346
}

gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
ktor_version=2.3.9
22
kotlin_version=1.9.23
33
logback_version=1.4.14
4+
exposed_version = 0.41.1
5+
postgresql_version = 42.5.1
6+
kotlinx_datetime_version = 0.5.0
47
kotlin.code.style=official

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
rootProject.name = "food-api"
1+
rootProject.name = "food-api"

0 commit comments

Comments
 (0)