defmodule Forcola.MixProject do use Mix.Project @version "0.3.2" @source_url "https://github.com/joshrotenberg/forcola" def project do [ app: :forcola, version: @version, elixir: "~> 1.18", compilers: Mix.compilers() ++ [:forcola_shim], start_permanent: Mix.env() == :prod, description: "Leak-free external process execution: process-group kill on timeout or BEAM death via a precompiled Rust shim", source_url: @source_url, homepage_url: @source_url, package: package(), docs: docs(), deps: deps() ] end def application do [ # :inets, :ssl, :public_key, and :crypto back the compile-time # download-and-verify of the precompiled shim (Forcola.Precompiled). extra_applications: [:logger, :inets, :ssl, :public_key, :crypto] ] end defp deps do [ {:ex_doc, "~> 0.34", only: :dev, runtime: false}, {:credo, "~> 1.7", only: [:dev, :test], runtime: false}, {:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false} ] end defp package do [ licenses: ["MIT"], links: %{"GitHub" => @source_url}, # checksum-forcola_shim.exs is generated by `mix forcola.checksum` # right before publish (it is gitignored); it pins the SHA256 of # every precompiled shim tarball for this version. native/ ships # so FORCOLA_BUILD=1 can build from source on unsupported targets. files: ~w( lib guides native/forcola_shim/src native/forcola_shim/Cargo.toml native/forcola_shim/Cargo.lock .formatter.exs mix.exs README.md LICENSE checksum-forcola_shim.exs ) ] end defp docs do [ main: "Forcola", source_url: @source_url, source_ref: "v#{@version}", extras: [ "README.md", "guides/getting_started.md", "guides/process_groups.md", "guides/adopting_forcola.md", "guides/alternatives.md" ], groups_for_extras: [ Guides: [ "guides/getting_started.md", "guides/process_groups.md", "guides/adopting_forcola.md", "guides/alternatives.md" ] ], groups_for_modules: [ "Execution modes": [Forcola, Forcola.Stream, Forcola.Daemon, Forcola.Duplex], "Data structures": [Forcola.Result, Forcola.Stream.Error], Internals: [Forcola.Shim, Forcola.Precompiled] ] ] end end