Skip to content

Commit

Permalink
Simplify conditioning of dependency import
Browse files Browse the repository at this point in the history
  • Loading branch information
g-andrade committed Oct 14, 2023
1 parent 1f94960 commit 70eb53e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,19 @@ defmodule Sqids.MixProject do

# Run "mix help deps" to learn about dependencies.
defp deps do
elixir_version = String.split(System.version(), ".")

List.flatten([
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.30", only: :dev, runtime: false},
{:recon, "~> 2.5", only: [:dev, :test], runtime: false},
{:sqids_blocklist,
github: "sqids/sqids-blocklist", branch: "main", only: :dev, runtime: false, app: false, compile: false},
maybe_styler_dep(elixir_version)
maybe_styler_dep()
])
end

defp maybe_styler_dep(elixir_version) do
if elixir_version >= [1, 14] do
defp maybe_styler_dep do
if Version.match?(System.version(), "~> 1.14") do
{:styler, "~> 0.8", only: [:dev, :test], runtime: false}
else
[]
Expand Down

0 comments on commit 70eb53e

Please sign in to comment.