2015-01-07 01:44:59 +00:00
|
|
|
defmodule Thrift.Mixfile do
|
|
|
|
use Mix.Project
|
|
|
|
|
2016-11-15 23:56:12 +00:00
|
|
|
@version "1.3.1"
|
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,
|
2016-06-21 15:56:00 +00:00
|
|
|
elixir: "~> 1.2",
|
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),
|
2015-01-07 01:44:59 +00:00
|
|
|
erlc_include_path: "ext/thrift/lib/erl/include",
|
2016-11-30 19:31:59 +00:00
|
|
|
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],
|
|
|
|
preferred_cli_env: ["coveralls": :test, "coveralls.detail": :test, "coveralls.post": :test],
|
2016-01-19 02:20:00 +00:00
|
|
|
|
|
|
|
# URLs
|
|
|
|
source_url: @project_url,
|
|
|
|
homepage_url: @project_url,
|
|
|
|
|
|
|
|
# Hex
|
2016-12-09 18:12:01 +00:00
|
|
|
description: description(),
|
|
|
|
package: package(),
|
2016-02-02 18:34:09 +00:00
|
|
|
|
|
|
|
# Docs
|
|
|
|
name: "Thrift",
|
|
|
|
docs: [source_ref: "v#{@version}", main: "Thrift", source_url: @project_url]]
|
2015-01-07 01:44:59 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def application do
|
2016-01-05 04:33:19 +00:00
|
|
|
[]
|
|
|
|
end
|
|
|
|
|
2016-11-30 19:31:59 +00:00
|
|
|
defp erlc_paths(:prod) do
|
|
|
|
["src", "ext/thrift/lib/erl/src"]
|
|
|
|
end
|
|
|
|
|
|
|
|
defp erlc_paths(_) do
|
|
|
|
erlc_paths(:prod) ++ ["test/support/src"]
|
|
|
|
end
|
|
|
|
|
|
|
|
defp elixirc_paths(:prod) do
|
|
|
|
["lib"]
|
|
|
|
end
|
|
|
|
|
|
|
|
defp elixirc_paths(_) do
|
|
|
|
elixirc_paths(:prod) ++ ["test/support/lib"]
|
|
|
|
end
|
|
|
|
|
2016-01-19 02:20:00 +00:00
|
|
|
defp deps do
|
2016-10-18 19:30:37 +00:00
|
|
|
[{:ex_doc, "~> 0.14.3", only: :dev},
|
|
|
|
{:earmark, "~> 1.0.2", only: :dev},
|
2016-10-18 20:14:35 +00:00
|
|
|
{:excoveralls, "~> 0.5.7", only: :test},
|
2016-11-11 00:32:00 +00:00
|
|
|
{:credo, "~> 0.5.2", only: [:dev, :test]},
|
2016-11-30 19:31:59 +00:00
|
|
|
{:dialyxir, "~> 0.4.0", only: [:dev, :test]},
|
|
|
|
{:benchfella, "~> 0.3.0", only: [:dev, :test]}
|
2016-06-09 16:17:38 +00:00
|
|
|
]
|
2016-01-05 04:33:19 +00:00
|
|
|
end
|
|
|
|
|
2016-01-19 02:20:00 +00:00
|
|
|
defp description do
|
2016-01-05 04:33:19 +00:00
|
|
|
"""
|
2016-01-19 02:20:00 +00:00
|
|
|
A collection of utilities for working with Thrift in Elixir.
|
2016-01-05 04:33:19 +00:00
|
|
|
|
2016-05-30 00:44:05 +00:00
|
|
|
Provides a copy of the Apache Thrift Erlang runtime.
|
2016-01-19 02:20:00 +00:00
|
|
|
"""
|
2016-01-05 04:33:19 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
defp package do
|
2016-01-19 02:20:00 +00:00
|
|
|
[maintainers: ["Jon Parise", "Steve Cohen"],
|
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) ++
|
|
|
|
~w(ext/thrift/CHANGES ext/thrift/LICENSE ext/thrift/NOTICE) ++
|
|
|
|
~w(ext/thrift/README.md ext/thrift/doc ext/thrift/lib/erl) ++
|
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
|