diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3e1aeaf --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +# Utilise une image avec Java +FROM gradle:8.5.0-jdk17 AS builder + +# Copie le code dans le conteneur +COPY . /home/gradle/project +WORKDIR /home/gradle/project + +# Build le projet +RUN gradle build --no-daemon + +# Étape de production +FROM openjdk:17 + +# Copie le JAR compilé +COPY --from=builder /home/gradle/project/build/libs/*.jar app.jar + +# Lance l'app +CMD ["java", "-jar", "app.jar"] + +# Port exposé (ajuste si besoin) +EXPOSE 8080 diff --git a/build.gradle.kts b/build.gradle.kts index afe29b1..b13cb7c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,9 +5,9 @@ import java.util.* plugins { `maven-publish` signing - kotlin("multiplatform") - kotlin("plugin.serialization") - id("com.github.johnrengelman.shadow") + kotlin("multiplatform") version "1.9.24" + kotlin("plugin.serialization") version "1.9.24" + id("com.github.johnrengelman.shadow") version "8.1.1" } group = "io.github.misterassm" @@ -69,14 +69,12 @@ kotlin { else -> throw GradleException("Host OS is not supported in Kotlin/Native.") } - sourceSets { val commonMain by getting { dependencies { - implementation(KotlinX.serialization.json) - implementation(KotlinX.datetime) - - compileOnly(Ktor.client.core) + implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3") + implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.1") + implementation("io.ktor:ktor-client-core:2.3.9") } } val commonTest by getting { @@ -86,7 +84,7 @@ kotlin { } val jvmMain by getting { dependencies { - implementation(Ktor.client.okHttp) + implementation("io.ktor:ktor-client-okhttp:2.3.9") } } val jvmTest by getting @@ -188,11 +186,10 @@ publishing { scm { url.set("https://github.com/MisterAssm/pronote-api") } - } } } signing { sign(publishing.publications) -} +} \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..492070d --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,7 @@ +pluginManagement { + repositories { + gradlePluginPortal() + google() + mavenCentral() + } +}