Current section

Files

Jump to
Raw

mix.exs

defmodule GraphqlQuery.MixProject do
use Mix.Project
@version File.read!("VERSION") |> String.trim()
@source_url "https://github.com/rockneurotiko/graphql_query"
@dev? String.ends_with?(@version, "-dev")
@force_build? System.get_env("FORCE_BUILD") in ["1", "true"]
def project do
[
aliases: aliases(),
app: :graphql_query,
version: @version,
description:
"GraphQL Query provides compile-time and runtime safety for your GraphQL queries and schemas in Elixir.",
elixir: "~> 1.14",
start_permanent: Mix.env() == :prod,
deps: deps(),
docs: docs(),
package: package(),
compilers: Mix.compilers()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:rustler_precompiled, "~> 0.8"},
{:rustler, "~> 0.36.0", optional: not (@dev? or @force_build?)},
{:nimble_options, "~> 1.1"},
# Release deps
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false}
]
end
defp docs do
[
main: "GraphqlQuery",
logo: "graphql_query_exdoc.png",
source_ref: "v#{@version}",
source_url: @source_url,
groups_for_modules: [
GraphqlQuery: [
GraphqlQuery,
GraphqlQuery.Schema,
GraphqlQuery.MacroOptions,
GraphqlQuery.ValidationError,
GraphqlQuery.Location,
GraphqlQuery.Parser
],
Format: [
GraphqlQuery.Formatter,
GraphqlQuery.Format
],
"Manual Validation": [
GraphqlQuery.Validator
],
Native: [
GraphqlQuery.Native
]
]
]
end
defp package do
[
files: [
"lib/**/*.ex",
"native/graphql_query_native/.cargo/config.toml",
"native/graphql_query_native/*.lock",
"native/graphql_query_native/*.toml",
"native/graphql_query_native/src/**/*.rs",
"checksum-*.exs",
".formatter.exs",
"mix.exs",
"README.md",
"VERSION",
"LICENSE"
],
licenses: ["Beerware"],
links: %{"GitHub" => @source_url},
maintainers: ["Rock Neurotiko"]
]
end
defp aliases do
[
"rust.lint": [
"cmd cargo clippy --manifest-path=native/graphql_query_native/Cargo.toml -- -Dwarnings"
],
"rust.fmt": ["cmd cargo fmt --manifest-path=native/graphql_query_native/Cargo.toml --all"]
]
end
end