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",
|
2016-12-09 19:12:04 +00:00
|
|
|
extras: ["README.md": [group: "Documents", title: "README"]],
|
2016-12-31 00:09:25 +00:00
|
|
|
source_ref: "thrift_tng",
|
2016-12-09 19:12:04 +00:00
|
|
|
source_url: @project_url]]
|
2015-01-07 01:44:59 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def application do
|
2016-12-25 01:29:44 +00:00
|
|
|
[
|
2017-01-02 22:06:55 +00:00
|
|
|
applications: [:logger, :connection, :ranch],
|
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
|
2016-12-09 19:12:04 +00:00
|
|
|
[{:ex_doc, "~> 0.14", only: :dev},
|
2017-01-08 18:00:27 +00:00
|
|
|
{:excoveralls, "~> 0.6", only: [:dev, :test]},
|
2017-01-26 16:43:47 +00:00
|
|
|
{:credo, "~> 0.6", only: [:dev, :test]},
|
2016-12-29 17:22:40 +00:00
|
|
|
{:dialyxir, "~> 0.4", 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-01-02 22:06:55 +00:00
|
|
|
{:ranch, "~> 1.2"},
|
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
|