-
Notifications
You must be signed in to change notification settings - Fork 11
/
mix.exs
99 lines (89 loc) · 2.35 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
defmodule WechatPay.Mixfile do
use Mix.Project
@version "0.10.0"
@url "https://github.com/elixir-wechat/wechat_pay"
def project do
[
app: :wechat_pay,
name: "WechatPay",
version: @version,
elixir: "~> 1.10",
elixirc_paths: elixirc_paths(Mix.env()),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
deps: deps(),
docs: docs(),
package: package(),
preferred_cli_env: [
docs: :docs,
vcr: :test,
"vcr.delete": :test,
"vcr.check": :test,
"vcr.show": :test
],
dialyzer: [
plt_add_apps: [:mix, :plug, :xmerl, :poison]
]
]
end
def application do
[extra_applications: [:logger, :xmerl]]
end
defp deps do
[
{:httpoison, "~> 0.9 or ~> 1.0"},
# Optional
{:plug, "~> 1.2", optional: true},
# Dev
{:poison, "~> 5.0", only: [:dev, :test, :docs]},
{:jason, "~> 1.0", only: [:dev, :test, :docs]},
{:credo, "~> 1.0", only: [:dev, :test]},
{:dialyxir, "~> 1.2.0", only: [:dev], runtime: false},
{:exvcr, "~> 0.7", only: :test},
# Docs
{:inch_ex, "~> 2.0", only: :docs},
{:ex_doc, ">= 0.0.0", only: [:dev, :docs]}
]
end
defp package do
[
name: :wechat_pay,
description: "WechatPay API wrapper in Elixir",
files: ["lib", "mix.exs", "README*", "LICENSE.md", "CHANGELOG.md"],
maintainers: ["Jun Lin"],
licenses: ["MIT"],
links: %{
"Changelog" => "https://hexdocs.pm/wechat_pay/changelog.html",
"GitHub" => @url
}
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp docs do
[
extras: [
"CHANGELOG.md": [],
"LICENSE.md": [title: "License"],
"README.md": [title: "Overview"],
"guides/using_with_phoenix.md": []
],
main: "readme",
homepage_url: @url,
source_url: @url,
source_ref: "master",
formatters: ["html"],
groups_for_modules: [
"Payment methods": [
~r"WechatPay.App",
~r"WechatPay.JSAPI",
~r"WechatPay.Native"
],
Plug: [~r"WechatPay.Plug"],
Utils: ~r"WechatPay.Utils",
Others: [WechatPay.JSON]
]
]
end
end