-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ea97763
commit 272c993
Showing
8 changed files
with
3,040 additions
and
2,299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
FROM ghcr.io/graalvm/graalvm-ce:java11-21.3.0 as graalvm | ||
RUN gu install native-image | ||
FROM ghcr.io/graalvm/native-image:21 as graalvm | ||
|
||
COPY . /home/app/http4k-example | ||
WORKDIR /home/app/http4k-example | ||
|
||
RUN native-image --no-fallback --no-server -cp build/libs/Example-all.jar com.example.HelloWorldKt | ||
RUN native-image --no-fallback -cp build/libs/example.jar com.example.HelloWorldKt | ||
|
||
FROM frolvlad/alpine-glibc | ||
RUN apk update && apk add libstdc++ | ||
EXPOSE 8080 | ||
COPY --from=graalvm /home/app/http4k-example/com.example.helloworldkt /app/http4k-example | ||
RUN chmod 777 /app/http4k-example | ||
ENTRYPOINT ["/app/http4k-example"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar | ||
import org.gradle.api.JavaVersion.VERSION_11 | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
plugins { | ||
kotlin("jvm") version "1.9.21" | ||
id("com.github.johnrengelman.shadow") version "8.1.1" | ||
} | ||
|
||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
} | ||
} | ||
|
||
kotlin { | ||
jvmToolchain { | ||
languageVersion.set(JavaLanguageVersion.of(21)) | ||
} | ||
} | ||
|
||
apply(plugin = "java") | ||
apply(plugin = "kotlin") | ||
apply(plugin = "com.github.johnrengelman.shadow") | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
val http4kVersion = providers.gradleProperty("http4kVersion").orNull | ||
val kotlinVersion = providers.gradleProperty("kotlinVersion").orNull | ||
val junitVersion = providers.gradleProperty("junitVersion").orNull | ||
|
||
java { | ||
sourceCompatibility = VERSION_11 | ||
targetCompatibility = VERSION_11 | ||
} | ||
|
||
tasks { | ||
withType<KotlinCompile> { | ||
kotlinOptions { | ||
jvmTarget = "11" | ||
allWarningsAsErrors = true | ||
} | ||
} | ||
|
||
named<ShadowJar>("shadowJar") { | ||
archiveBaseName.set("example") | ||
archiveClassifier = "" | ||
mergeServiceFiles() | ||
manifest { | ||
attributes(mapOf("Main-Class" to "com.example.HelloWorldKt")) | ||
} | ||
} | ||
|
||
named<Test>("test").configure { | ||
useJUnitPlatform {} | ||
} | ||
|
||
} | ||
dependencies { | ||
implementation("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}") | ||
implementation(platform("org.http4k:http4k-bom:${http4kVersion}")) | ||
implementation("org.http4k:http4k-core") | ||
|
||
testImplementation(platform("org.junit:junit-bom:${junitVersion}")) | ||
testImplementation("org.http4k:http4k-testing-hamkrest") | ||
testImplementation("org.junit.jupiter:junit-jupiter-api") | ||
testImplementation("org.junit.jupiter:junit-jupiter-engine") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.