Adding Erlang libraries to your Elixir project and having them included in your (Distillery based) release should work the same way as adding any Elixir library. But sometimes you stumble upon a library that does not implement the OTP application behaviour - thus it can not be added to the applications key - and is not automatically detected by Distillery as a runtime dependency.
Frankly I do not know the exact reason for that but digging through the source and documentation I found a way to solve this problem for my case. You need to specify your library with the
:load option in your release configuration (
release :myapp do set version: "0.1.0" set applications: [:app_a, :app_b, some_dep: :load] end>
some_dep as runtime dependency but not being started (OTP).
Hope this saves you some time. =)