-
Notifications
You must be signed in to change notification settings - Fork 67
/
mix.exs
67 lines (60 loc) · 1.41 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
defmodule MyXQL.MixProject do
use Mix.Project
@version "0.7.1"
@source_url "https://github.com/elixir-ecto/myxql"
def project() do
[
app: :myxql,
version: @version,
elixir: "~> 1.7",
start_permanent: Mix.env() == :prod,
name: "MyXQL",
description: "MySQL 5.5+ driver for Elixir",
source_url: @source_url,
package: package(),
docs: docs(),
deps: deps()
]
end
def application() do
[
extra_applications: [:ssl, :public_key],
env: [
json_library: Jason
]
]
end
defp package() do
[
licenses: ["Apache-2.0"],
links: %{"GitHub" => @source_url}
]
end
defp docs() do
[
source_ref: "v#{@version}",
main: "readme",
extras: ["README.md"]
]
end
defp deps() do
[
{:db_connection, "~> 2.4.1 or ~> 2.5", db_connection_opts()},
{:decimal, "~> 1.6 or ~> 2.0"},
{:jason, "~> 1.0", optional: true},
{:geo, "~> 3.4 or ~> 4.0", optional: true},
{:table, "~> 0.1.0", optional: true},
{:binpp, ">= 0.0.0", only: [:dev, :test]},
{:dialyxir, "~> 1.0", only: :dev, runtime: false},
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
{:benchee, ">= 0.0.0", only: :dev, runtime: false}
]
end
defp db_connection_opts() do
if path = System.get_env("DB_CONNECTION_PATH") do
[path: path]
else
[]
end
end
end