defmodule Sutra.MixProject do use Mix.Project def project do [ app: :sutra_cardano, version: "0.2.5", elixir: "~> 1.15", elixirc_paths: elixirc_paths(Mix.env()), start_permanent: Mix.env() == :prod, deps: deps(), consolidate_protocols: Mix.env() != :test, # Docs name: "sutra_cardano", source_url: "https://github.com/txbody-org/sutra-cardano", homepage_url: "https://github.com/txbody-org/sutra-cardano", docs: &docs/0, description: description(), package: package() ] end # Run "mix help compile.app" to learn about applications. def application do [ extra_applications: [:logger] ] end defp elixirc_paths(:test), do: ["lib", "test/support", "test/fixture"] defp elixirc_paths(_), do: ["lib"] # Run "mix help deps" to learn about dependencies. defp deps do [ # {:dep_from_hexpm, "~> 0.3.0"}, # {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"} {:cbor, "~> 1.0.1"}, {:blake2_elixir, "~> 0.9.0"}, {:typed_struct, "~> 0.3.0"}, {:rustler, "~> 0.36.2"}, {:bech32, "~> 1.0"}, {:req, "~> 0.5.7"}, {:mnemonic_tx, "~> 0.3.2"}, {:ex_sodium, "~> 0.1.2"}, {:credo, "~> 1.7", only: [:dev, :test], runtime: false}, {:ex_doc, ">= 0.0.0", only: :dev, runtime: false}, {:makeup_html, ">= 0.0.0", only: :dev, runtime: false} ] end defp description do "A User-Friendly Component-Based Cardano SDK for Elixir." end defp package do [ name: "sutra_cardano", licenses: ["MIT"], links: %{"GitHub" => "https://github.com/txbody-org/sutra-cardano"}, files: ~w(lib priv native .formatter.exs mix.exs README.md LICENSE) ] end defp docs do [ # The main page in the docs main: "overview", extras: extras(), groups_for_extras: groups_for_extras(), filter_modules: ~r/^(Elixir\.)?(Sutra|Sutra\.(Data(\.Plutus)?|Cardano\.(Address|Asset|Script(\.NativeScript)?|Transaction\.(Input|Output|OutputReference|Datum|TxBuilder)))|Mix\.Tasks\.Sutra\..*)$/ ] end defp extras do [ "guides/overview.md", # Provider Guides "guides/provider_integration/setup_provider.md", # Transaction Building "guides/transaction_building/simple_tx.md", "guides/transaction_building/mint_asset.md", "guides/transaction_building/deploy_script.md", "guides/transaction_building/reference_inputs.md", # Data Definition "guides/plutus_data/plutus_data.md", # Testing "guides/testing/privnet_testing.md" ] end defp groups_for_extras do [ Provider: ~r/guides\/provider_integration\/.?/, Transaction: ~r/guides\/transaction_building\/.?/, "Plutus Data": ~r/guides\/plutus_data\/.?/, Testing: ~r/guides\/testing\/.?/ ] end end