-
Notifications
You must be signed in to change notification settings - Fork 51
/
mix.exs
124 lines (111 loc) · 2.85 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
defmodule Desktop.MixProject do
use Mix.Project
@description """
Building native-like Elixir apps for Windows, MacOS, Linux, iOS and Android using Phoenix LiveView!
"""
@version "1.5.3"
@url "https://github.com/elixir-desktop/desktop"
def project do
[
app: :desktop,
name: "Desktop",
version: @version,
source_url: @url,
description: @description,
elixir: "~> 1.11",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: Mix.compilers(),
aliases: aliases(),
start_permanent: Mix.env() == :prod,
deps: deps(),
docs: docs(),
package: package(),
dialyzer: [
plt_add_apps: [:ex_unit, :mix],
plt_file: {:no_warn, "priv/plts/dialyzer.plt"}
]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Run "mix help compile.app" to learn about applications.
def application do
[
mod: {Desktop, []},
extra_applications: [
:crypto,
:eex,
:inets,
:logger,
:sasl,
:ssl,
:tools
| extra_applications(Mix.target())
]
]
end
def extra_applications(:host) do
[:wx]
end
def extra_applications(_mobile) do
[]
end
defp aliases() do
[
lint: [
"compile --warnings-as-errors",
"format --check-formatted",
"credo --ignore refactor",
"dialyzer"
]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps() do
desktop = [
{:ex_doc, "~> 0.25", only: :dev, runtime: false},
{:oncrash, "~> 0.1"},
{:debouncer, "~> 0.1"},
{:credo, "~> 1.5", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.0", only: [:dev], runtime: false},
# DBus SNI
{:ex_sni, "~> 0.2"},
# {:ex_sni, path: "../ex_sni"},
# Phoenix & Plug
{:phoenix, "> 1.0.0"},
{:phoenix_live_view, "> 0.15.0"},
{:plug, "> 1.0.0"},
{:gettext, "> 0.10.0"}
]
if Mix.target() in [:android, :ios] do
desktop ++ [{:wx, "~> 1.1", hex: :bridge, targets: [:android, :ios]}]
else
desktop
end
end
defp docs do
[
extra_section: "GUIDES",
extras: [
"LICENSE.md": [title: "License"],
"README.md": [title: "Overview"],
"CHANGELOG.md": [title: "Changelog"],
"guides/getting_started.md": [title: "Getting your Environment Ready"],
"guides/your_first_desktop_app.md": [title: "Your first Desktop App"]
],
main: "readme",
source_ref: "v#{@version}",
source_url: @url,
formatters: ["html"]
]
end
defp package do
[
maintainers: ["Dominic Letz"],
licenses: ["MIT"],
links: %{github: @url},
files: ~w(src lib LICENSE.md mix.exs README.md)
]
end
end