mix.exs (3896B)
1 defmodule Ecto.MixProject do 2 use Mix.Project 3 4 @source_url "https://github.com/elixir-ecto/ecto" 5 @version "3.9.1" 6 7 def project do 8 [ 9 app: :ecto, 10 version: @version, 11 elixir: "~> 1.10", 12 deps: deps(), 13 consolidate_protocols: Mix.env() != :test, 14 elixirc_paths: elixirc_paths(Mix.env()), 15 16 # Hex 17 description: "A toolkit for data mapping and language integrated query for Elixir", 18 package: package(), 19 20 # Docs 21 name: "Ecto", 22 docs: docs() 23 ] 24 end 25 26 def application do 27 [ 28 extra_applications: [:logger, :crypto, :eex], 29 mod: {Ecto.Application, []} 30 ] 31 end 32 33 defp deps do 34 [ 35 {:telemetry, "~> 0.4 or ~> 1.0"}, 36 {:decimal, "~> 1.6 or ~> 2.0"}, 37 {:jason, "~> 1.0", optional: true}, 38 {:ex_doc, "~> 0.20", only: :docs} 39 ] 40 end 41 42 defp package do 43 [ 44 maintainers: ["Eric Meadows-Jönsson", "José Valim", "James Fish", "Michał Muskała", "Felipe Stival"], 45 licenses: ["Apache-2.0"], 46 links: %{"GitHub" => @source_url}, 47 files: 48 ~w(.formatter.exs mix.exs README.md CHANGELOG.md lib) ++ 49 ~w(integration_test/cases integration_test/support) 50 ] 51 end 52 53 defp docs do 54 [ 55 main: "Ecto", 56 source_ref: "v#{@version}", 57 logo: "guides/images/e.png", 58 extra_section: "GUIDES", 59 source_url: @source_url, 60 skip_undefined_reference_warnings_on: ["CHANGELOG.md"], 61 extras: extras(), 62 groups_for_extras: groups_for_extras(), 63 groups_for_functions: [ 64 group_for_function("Query API"), 65 group_for_function("Schema API"), 66 group_for_function("Transaction API"), 67 group_for_function("Runtime API"), 68 group_for_function("User callbacks") 69 ], 70 groups_for_modules: [ 71 # Ecto, 72 # Ecto.Changeset, 73 # Ecto.Multi, 74 # Ecto.Query, 75 # Ecto.Repo, 76 # Ecto.Schema, 77 # Ecto.Schema.Metadata, 78 # Mix.Ecto, 79 80 "Types": [ 81 Ecto.Enum, 82 Ecto.ParameterizedType, 83 Ecto.Type, 84 Ecto.UUID 85 ], 86 "Query APIs": [ 87 Ecto.Query.API, 88 Ecto.Query.WindowAPI, 89 Ecto.Queryable, 90 Ecto.SubQuery 91 ], 92 "Adapter specification": [ 93 Ecto.Adapter, 94 Ecto.Adapter.Queryable, 95 Ecto.Adapter.Schema, 96 Ecto.Adapter.Storage, 97 Ecto.Adapter.Transaction 98 ], 99 "Relation structs": [ 100 Ecto.Association.BelongsTo, 101 Ecto.Association.Has, 102 Ecto.Association.HasThrough, 103 Ecto.Association.ManyToMany, 104 Ecto.Association.NotLoaded, 105 Ecto.Embedded 106 ] 107 ] 108 ] 109 end 110 111 def extras() do 112 [ 113 "guides/introduction/Getting Started.md", 114 "guides/introduction/Embedded Schemas.md", 115 "guides/introduction/Testing with Ecto.md", 116 "guides/howtos/Aggregates and subqueries.md", 117 "guides/howtos/Composable transactions with Multi.md", 118 "guides/howtos/Constraints and Upserts.md", 119 "guides/howtos/Data mapping and validation.md", 120 "guides/howtos/Dynamic queries.md", 121 "guides/howtos/Multi tenancy with query prefixes.md", 122 "guides/howtos/Multi tenancy with foreign keys.md", 123 "guides/howtos/Self-referencing many to many.md", 124 "guides/howtos/Polymorphic associations with many to many.md", 125 "guides/howtos/Replicas and dynamic repositories.md", 126 "guides/howtos/Schemaless queries.md", 127 "guides/howtos/Test factories.md", 128 "CHANGELOG.md" 129 ] 130 end 131 132 defp group_for_function(group), do: {String.to_atom(group), &(&1[:group] == group)} 133 134 defp groups_for_extras do 135 [ 136 "Introduction": ~r/guides\/introduction\/.?/, 137 "How-To's": ~r/guides\/howtos\/.?/ 138 ] 139 end 140 141 defp elixirc_paths(:test), do: ["lib", "test/support"] 142 defp elixirc_paths(_), do: ["lib"] 143 end