Heroku officially supports buildpacks for Ruby, Node.js, Clojure, Python, Java, Gradle, Grails, Scala, Play, PHP and Go.
Buildpacks are automatically detected by Heroku in the above order, however, it can also be set manually through CLI using:
At the time of app creation
heroku create <app_name> --buildpack <buildpack_name>
Manually,
heroku buildpacks:set <buildpack_name>
Buildpack name can be specified either using shorthand or URL. Like for PHP buildpack,
heroku buildpacks:set heroku/php
or
heroku buildpacks:set https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-php