2015-01-07 01:44:59 +00:00
|
|
|
defmodule Thrift.Mixfile do
|
2017-02-07 20:11:03 +00:00
|
|
|
@moduledoc false
|
2015-01-07 01:44:59 +00:00
|
|
|
use Mix.Project
|
|
|
|
|
2016-12-31 00:09:25 +00:00
|
|
|
@description """
|
|
|
|
Elixir implementation of the Thrift service framework
|
|
|
|
|
|
|
|
This package includes support for parsing Thrift IDL files, working with the
|
|
|
|
Thrift binary protocol, and building high-performance clients and servers.
|
|
|
|
"""
|
|
|
|
|
|
|
|
@version "2.0.0-dev"
|
2016-01-19 02:20:00 +00:00
|
|
|
@project_url "https://github.com/pinterest/elixir-thrift"
|
|
|
|
|
2015-01-07 01:44:59 +00:00
|
|
|
def project do
|
|
|
|
[app: :thrift,
|
2016-01-19 02:20:00 +00:00
|
|
|
version: @version,
|
2017-01-02 22:32:46 +00:00
|
|
|
elixir: "~> 1.3",
|
2016-12-09 18:12:01 +00:00
|
|
|
deps: deps(),
|
2016-01-19 02:20:00 +00:00
|
|
|
|
|
|
|
# Build Environment
|
2016-11-30 19:31:59 +00:00
|
|
|
erlc_paths: erlc_paths(Mix.env),
|
|
|
|
elixirc_paths: elixirc_paths(Mix.env),
|
2016-06-09 16:17:38 +00:00
|
|
|
compilers: [:leex, :yecc, :erlang, :elixir, :app],
|
2016-01-19 02:20:00 +00:00
|
|
|
|
|
|
|
# Testing
|
2016-01-05 04:33:19 +00:00
|
|
|
test_coverage: [tool: ExCoveralls],
|
2016-12-23 21:52:46 +00:00
|
|
|
preferred_cli_env: [
|
2016-12-30 22:34:17 +00:00
|
|
|
"bench": :test,
|
2016-12-23 21:52:46 +00:00
|
|
|
"coveralls": :test,
|
|
|
|
"coveralls.detail": :test,
|
|
|
|
"coveralls.html": :test,
|
|
|
|
"coveralls.post": :test],
|
2016-01-19 02:20:00 +00:00
|
|
|
|
|
|
|
# URLs
|
|
|
|
source_url: @project_url,
|
|
|
|
homepage_url: @project_url,
|
|
|
|
|
|
|
|
# Hex
|
2016-12-31 00:09:25 +00:00
|
|
|
description: @description,
|
2016-12-09 18:12:01 +00:00
|
|
|
package: package(),
|
2016-02-02 18:34:09 +00:00
|
|
|
|
2016-12-30 21:12:41 +00:00
|
|
|
# Dialyzer
|
2017-02-16 16:51:29 +00:00
|
|
|
dialyzer: [
|
|
|
|
plt_add_deps: :transitive,
|
|
|
|
plt_add_apps: [:mix],
|
|
|
|
ignore_warnings: ".dialyzerignore"],
|
2016-12-30 21:12:41 +00:00
|
|
|
|
2016-02-02 18:34:09 +00:00
|
|
|
# Docs
|
|
|
|
name: "Thrift",
|
2016-12-09 19:12:04 +00:00
|
|
|
docs: [
|
2016-12-31 19:46:14 +00:00
|
|
|
main: "README",
|
2017-10-04 22:14:30 +00:00
|
|
|
extras: ["README.md": [title: "README"]],
|
2017-10-06 12:44:34 +00:00
|
|
|
source_url: @project_url
|
2017-10-03 21:36:31 +00:00
|
|
|
]]
|
2015-01-07 01:44:59 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def application do
|
2016-12-25 01:29:44 +00:00
|
|
|
[
|
2018-05-02 22:47:49 +00:00
|
|
|
applications: [:logger, :connection, :ranch, :ssl],
|
2016-12-25 01:29:44 +00:00
|
|
|
]
|
2016-01-05 04:33:19 +00:00
|
|
|
end
|
|
|
|
|
2016-12-31 17:02:51 +00:00
|
|
|
defp erlc_paths(:test), do: ["src", "test/support/src"]
|
|
|
|
defp erlc_paths(_), do: ["src"]
|
2016-11-30 19:31:59 +00:00
|
|
|
|
2016-12-30 22:34:17 +00:00
|
|
|
defp elixirc_paths(:test), do: ["lib", "test/support/lib"]
|
|
|
|
defp elixirc_paths(_), do: ["lib"]
|
2016-11-30 19:31:59 +00:00
|
|
|
|
2016-01-19 02:20:00 +00:00
|
|
|
defp deps do
|
2017-10-04 22:14:30 +00:00
|
|
|
[{:ex_doc, "~> 0.17", only: :dev},
|
2018-04-03 15:52:00 +00:00
|
|
|
{:excoveralls, "~> 0.8", only: [:dev, :test]},
|
|
|
|
{:credo, "~> 0.0", only: [:dev, :test]},
|
2017-03-06 17:07:40 +00:00
|
|
|
{:dialyxir, "~> 0.5", only: :dev, runtime: false},
|
2016-12-30 22:34:17 +00:00
|
|
|
{:benchfella, "~> 0.3", only: [:dev, :test]},
|
2016-12-25 01:29:44 +00:00
|
|
|
{:connection, "~> 1.0"},
|
2017-08-13 19:02:20 +00:00
|
|
|
{:ranch, "~> 1.4"},
|
2016-06-09 16:17:38 +00:00
|
|
|
]
|
2016-01-05 04:33:19 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
defp package do
|
2016-12-30 21:13:01 +00:00
|
|
|
[maintainers: ["Jon Parise", "Steve Cohen", "Preston Guillory"],
|
2016-01-05 04:33:19 +00:00
|
|
|
licenses: ["Apache 2.0"],
|
2016-01-19 02:20:00 +00:00
|
|
|
links: %{"GitHub" => @project_url},
|
2016-02-02 22:04:45 +00:00
|
|
|
files: ~w(README.md LICENSE mix.exs lib) ++
|
2016-06-09 16:17:38 +00:00
|
|
|
~w(src/thrift_lexer.xrl src/thrift_parser.yrl)
|
|
|
|
]
|
2015-01-07 01:44:59 +00:00
|
|
|
end
|
|
|
|
end
|