-
Notifications
You must be signed in to change notification settings - Fork 2
/
mix.exs
64 lines (55 loc) · 1.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
defmodule ProtoResponse.Mixfile do
use Mix.Project
@version "0.4.1"
def project do
[
app: :proto_response,
deps: deps(System.get_env("PROTOBUF_PACKAGE")),
description: description(),
elixir: "~> 1.4",
elixirc_paths: elixirc_paths(Mix.env()),
package: package(),
version: @version
]
end
defp package do
[
name: :proto_response,
files: ~w(lib mix.exs README.md LICENSE),
maintainers: ["Tobiasz Małecki"],
licenses: ["Apache 2.0"],
links: %{"GitHub" => "https://github.com/appunite/proto_response"}
]
end
defp description do
"Provides helper function similar to Phoenix.ConnTest.json_response/2, but for protobuf"
end
def application do
[
extra_applications: [:logger]
]
end
defp elixirc_paths(:test), do: ["lib", "test/proto.ex"]
defp elixirc_paths(_), do: ["lib"]
# both libraries uses same module name :/
defp deps("exprotobuf") do
[
{:exprotobuf, "~> 1.0", optional: true},
{:phoenix, "~> 1.1"}
]
end
defp deps("protobuf") do
[
{:protobuf, "~> 0.3", optional: true},
{:phoenix, "~> 1.1"}
]
end
defp deps(_) do
[
{:exprotobuf, "~> 1.0", optional: true},
{:protobuf, "~> 0.3", optional: true},
{:phoenix, "~> 1.1"},
{:ex_doc, "~> 0.13", only: :dev}
]
end
end