-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathmix.exs
71 lines (65 loc) · 1.71 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
defmodule UeberauthCAS.Mixfile do
use Mix.Project
@source_url "https://github.com/marceldegraaf/ueberauth_cas"
@version "2.4.0"
def project do
[
app: :ueberauth_cas,
version: @version,
elixir: "~> 1.9",
name: "Ueberauth CAS",
package: package(),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
deps: deps(),
docs: docs(),
test_coverage: [tool: ExCoveralls]
]
end
defp deps do
# Needed for compatibility with old elixir versions :|
mime_dependency =
if Mix.env() == :test || Mix.env() == :test_no_nif do
case Version.compare(System.version(), "1.10.0") do
:lt -> [{:mime, "~> 1.0"}]
_ -> []
end
else
[]
end
[
{:ueberauth, "~> 0.6"},
{:httpoison, "~> 2.1"},
{:sweet_xml, "~> 0.7"},
{:excoveralls, "~> 0.14", only: :test},
{:inch_ex, "~> 2.0", only: :docs},
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
{:mock, "~> 0.3", only: :test}
] ++ mime_dependency
end
defp docs do
[
extras: [
"CHANGELOG.md": [],
"README.md": [title: "Overview"],
"LICENSE.md": []
],
main: "readme",
source_url: @source_url,
homepage_url: @source_url,
formatters: ["html"]
]
end
defp package do
[
description: "An Ueberauth strategy for CAS authentication.",
files: ["lib", "mix.exs", "README.md", "LICENSE.md", "CHANGELOG.md"],
maintainers: ["Marcel de Graaf", "Niko Strijbol"],
licenses: ["MIT"],
links: %{
"Changelog" => "https://hexdocs.pm/ueberauth_cas/changelog.html",
GitHub: @source_url
}
]
end
end