defmodule Wechat.MixProject do use Mix.Project def project do [ app: :wechat, version: "0.4.0-rc.0", elixir: "~> 1.7", elixirc_paths: elixirc_paths(Mix.env), start_permanent: Mix.env() == :prod, deps: deps(), # Hex description: "Wechat API wrapper for Elixir.", package: package(), source_url: "https://github.com/goofansu/wechat-elixir", homepage_url: "https://github.com/goofansu/wechat-elixir", # Docs name: "Wechat", docs: docs() ] end # Run "mix help compile.app" to learn about applications. def application do [ extra_applications: [:logger], mod: {Wechat.Application, []} ] end # Run "mix help deps" to learn about dependencies. defp deps do [ {:httpoison, "~> 1.0"}, {:jason, "~> 1.0"}, {:plug, "~> 1.0", optional: true}, {:redix, ">= 0.0.0", optional: true}, {:credo, "~> 0.9.1", only: :dev, runtime: false}, {:bypass, "~> 0.8", only: :test, runtime: false}, {:junit_formatter, "~> 2.2", only: :test, runtime: false}, {:ex_doc, "~> 0.19-rc", only: :dev, runtime: false} ] end defp elixirc_paths(:test), do: ["lib", "test/support"] defp elixirc_paths(_), do: ["lib"] defp package do [ licenses: ["MIT"], links: %{"GitHub" => "https://github.com/goofansu/wechat-elixir"}, files: ~w(.formatter.exs mix.exs README.md lib) ] end defp docs do [ main: "getting-started", extras: [ "guides/Getting Started.md" ], groups_for_modules: [ # Wechat # Wechat.API, # Wechat.Client # Wechat.HTTP "API": [ Wechat.API.Base, Wechat.API.Media, Wechat.API.Menu, Wechat.API.QRCode, Wechat.API.User ], "Message API": [ Wechat.API.CustomMessage, Wechat.API.TemplateMessage ], "Streaming": [ Wechat.API.Streaming, ], "Adapters": [ Wechat.Adapter.Agent, Wechat.Adapter.Redis ], "Adapter specification": [ Wechat.Adapter ], "Plugs": [ Wechat.Plug.MessageParser, Wechat.Plug.RequestValidator ] ] ] end end