Packages

A drop-in :decimal module reproducing the legacy erlang_decimal API on top of the modern Elixir Decimal library, so legacy code and the Elixir decimal app can coexist in one BEAM node.

Current section

Files

Jump to
Raw

mix.exs

defmodule FakeDecimal.MixProject do
use Mix.Project
@version "0.1.2"
@source_url "https://github.com/bsanyi/fake_decimal"
def project do
[
app: :fake_decimal,
version: @version,
elixir: "~> 1.18",
start_permanent: Mix.env() == :prod,
erlc_paths: erlc_paths(Mix.env()),
description: description(),
package: package(),
docs: docs(),
name: "FakeDecimal",
source_url: @source_url,
deps: deps()
]
end
def application do
[
extra_applications: []
]
end
# The Erlang module exercising include/decimal.hrl is only needed by tests.
defp erlc_paths(:test), do: ["src", "test/erlang"]
defp erlc_paths(_env), do: ["src"]
defp deps do
[
{:decimal, ">= 0.0.0", optional: true},
{:stream_data, "~> 1.0", only: :test},
{:ex_doc, "~> 0.34", only: :dev, runtime: false}
]
end
defp description do
"A drop-in :decimal module reproducing the legacy erlang_decimal API on " <>
"top of the modern Elixir Decimal library, so legacy code and the Elixir " <>
"decimal app can coexist in one BEAM node."
end
defp package do
[
licenses: ["Apache-2.0"],
maintainers: ["Sandor Bedo"],
links: %{"GitHub" => @source_url},
files: ~w(lib include mix.exs README.md LICENSE .formatter.exs)
]
end
defp docs do
[
main: "readme",
source_url: @source_url,
source_ref: "v#{@version}",
extras: ["README.md"]
]
end
end