forked from keathley/twirp-elixir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
95 lines (82 loc) · 2.15 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
defmodule Twirp.MixProject do
use Mix.Project
@version "0.7.4"
@source_url "https://github.com/keathley/twirp-elixir"
def project do
[
app: :twirp,
version: @version,
elixir: "~> 1.8",
elixirc_paths: elixirc_paths(Mix.env()),
escript: escript(),
start_permanent: Mix.env() == :prod,
consolidate_protocols: Mix.env() != :test,
deps: deps(),
dialyzer: [
plt_add_deps: :apps_direct,
plt_add_apps: [:finch, :hackney],
],
xref: [
exclude: [
Finch,
:hackney,
:hackney_pool,
]
],
description: description(),
package: package(),
name: "Twirp",
source_url: "https://github.com/keathley/twirp",
docs: docs()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
def escript do
[main_module: Twirp.Protoc.CLI, name: "protoc-gen-twirp_elixir", app: nil]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:plug, "~> 1.8"},
{:norm, "~> 0.9"},
{:jason, "~> 1.1"},
{:protobuf, "~> 0.5"},
{:google_protos, "~>0.1"},
{:finch, "~> 0.6", optional: true},
{:hackney, "~> 1.17", optional: true},
{:telemetry, "~> 0.4 or ~> 1.0"},
{:bypass, "~> 2.1", only: [:dev, :test]},
{:credo, "~> 1.1", only: [:dev], runtime: false},
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.19", only: [:dev, :test], runtime: false},
{:plug_cowboy, "~> 2.0", only: [:dev, :test]},
{:mox, "~> 1.0", only: [:test]},
]
end
def description do
"""
Twirp provides an Elixir implementation of the Twirp RPC framework.
"""
end
def package do
[
licenses: ["Apache-2.0"],
links: %{"GitHub" => @source_url}
]
end
def docs do
[
source_ref: "v#{@version}",
source_url: @source_url,
main: "Twirp"
]
end
end