Been wondering recently, does anyone have an examp...
# kotlin-toolchain
i
Been wondering recently, does anyone have an examples yet of using Amper with Heroku buildpacks?
a
hi there, thanks for asking no, no examples with buildpacks, there is no native support (at least for now) if you feel brave enough, you can give extensibility preview a try
could you please if it's possible also explain where do you need buildpacks? do you use it literally because of heroku? or somewhere else?
i
Sure. When deploying to Heroku (or Dokku or similar), by default applications are automatically built using relevant "buildpacks." Previously I was using the Gradle-interop just to add Amper and the
application
plugins, and to add a task named
:stage
that would call
:installDist
. When deploying the builder would pick the heroku-buildpack-gradle buildpack, call
:stage
during the build step to create a jar, save that into the slug/image, and then the run step would run that jar. But without Gradle, there's no buildpack I've seen that knows how to run Amper directly. I realize this may sound too vendor specific at first, but lately Heroku has been working on Cloud Native Buildpacks (see pack CLI, GitLab Auto DevOps, etc.) with the Cloud Native Computing Foundation. Unfortunately like their original buildpacks, only Maven and Gradle are officially supported right now. The Maven and Gradle buildpacks are built off of common Java/JVM buildpacks, so I figure there's probably a way to make one for a different build tool like Amper, and so I was wondering if anyone has tried yet. (One of the nice features of the buildpacks is that they can maintain a cache that can be used for future builds.)
🙏 2
The steps I mentioning in the first paragraph: https://ktor.io/docs/heroku.html
👍 1