forked from elixir-gettext/gettext
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
82 lines (71 loc) · 2.23 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
defmodule Gettext.Mixfile do
use Mix.Project
@version "0.26.1"
@description "Internationalization and localization through gettext"
@repo_url "https://github.com/elixir-gettext/gettext"
def project do
[
app: :gettext,
version: @version,
elixir: "~> 1.12",
elixirc_paths: elixirc_paths(Mix.env()),
build_embedded: Mix.env() == :prod,
deps: deps(),
preferred_cli_env: [coveralls: :test, "coveralls.html": :test, "coveralls.github": :test],
test_coverage: [tool: ExCoveralls],
# Hex
package: hex_package(),
description: @description,
# Docs
name: "gettext",
docs: [
source_ref: "v#{@version}",
main: "Gettext",
source_url: @repo_url,
extras: ["CHANGELOG.md"],
groups_for_docs: [
# Gettext
"Translation Functions": &(&1[:section] == :translation),
"Locale Functions": &(&1[:section] == :locale),
# Gettext.Macros
"Macros with Backend":
&(&1[:module] == Gettext.Macros and to_string(&1[:name]) =~ ~r/_with_backend$/),
"Comment Macros": &(&1[:module] == Gettext.Macros and &1[:name] == :gettext_comment),
"Extraction Macros":
&(&1[:module] == Gettext.Macros and to_string(&1[:name]) =~ ~r/_noop$/),
"Translation Macros": &(&1[:module] == Gettext.Macros)
]
]
]
end
def application do
[
extra_applications: [:logger],
env: [default_locale: "en", plural_forms: Gettext.Plural],
mod: {Gettext.Application, []}
]
end
def hex_package do
[
maintainers: ["Andrea Leopardi", "Jonatan Männchen", "José Valim"],
licenses: ["Apache-2.0"],
links: %{
"GitHub" => @repo_url,
"Changelog" => @repo_url <> "/blob/main/CHANGELOG.md"
},
files: ~w(lib mix.exs *.md)
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_other), do: ["lib"]
defp deps do
[
{:expo, "~> 0.5.1 or ~> 1.0"},
# Dev and test dependencies
{:castore, "~> 1.0", only: :test},
{:jason, "~> 1.0", only: :test},
{:ex_doc, "~> 0.19", only: :dev},
{:excoveralls, "~> 0.18.0", only: :test}
]
end
end