BuildPacks
Buildpack API version
<Main.kt>
api = “0.2”
package org.kotlinlang.play
Buildpack ID and metadata [buildpack]
fun main() {
id = “samples/kotlin-gradle”
println(“Hello, World!”)
version = “0.0.1” name = “Sample Kotlin Gradle Buildpack” homepage = “https://github.com/buildpacks/samp les/tree/main/buildpacks/kotlin-gra dle”
<Stack Dockerfile>
Stacks that the buildpack will work with
ENV CNB_GROUP_ID=1000
[[stacks]]
pack build kotlin-sample \ —builder cnbs/builder:bionic
id = “io.buildpacks.samples.stacks.bioni c” [[stacks]]
—buildpack samples/kotlin \ —path samples/apps/kotlin/
}
id = “io.buildpacks.samples.stacks.alpin e”
FROM ubuntu: bionic as base ENV CNB_USER_ID=1000
ENV CNB_STACK_ID=”io.buildpacks.samples.sta cks.bionic” LABEL io.buildpacks.stack.id=”io.buildpacks.s amples.stacks.bionic” RUN groupadd cnb —gid ${CNB_GROUP_ID} && \ useradd —uid ${CNB_USER_ID} —gid ${CNB_GROUP_ID} -m -s /bin/bash cnb