[package]
name    = "xtask"
version = "0.0.0"
edition = "2024"
publish = false

[dependencies]
anyhow       = "1.0.93"
basic-toml   = "0.1.9"
clap         = { version = "4.5.20", features = ["derive", "wrap_help"] }
console      = "0.15.10"
env_logger   = "0.11.5"
esp-metadata = { path = "../esp-metadata", features = ["clap"] }
jiff         = { version = "0.2.13" }
kuchikiki    = "0.8.2"
log          = "0.4.22"
minijinja    = "2.5.0"
opener       = { version = "0.7.2", optional = true }
rocket       = { version = "0.5.1", optional = true }
semver       = { version = "1.0.23", features = ["serde"] }
serde        = { version = "1.0.215", features = ["derive"] }
serde_json   = "1.0.70"
strum        = { version = "0.27.1", features = ["derive"] }
toml_edit    = "0.22.22"
walkdir      = "2.5.0"

# Only required when building documentation for deployment:
reqwest = { version = "0.12.12", features = [
    "blocking",
    "json",
    "native-tls-vendored",
], optional = true }

# This pulls a gazillion crates - don't include it by default
cargo-semver-checks = { version = "0.41.0", optional = true }

# THIS NEEDS TO MATCH THE rustfmt-json FORMAT - see https://github.com/rust-lang/rustdoc-types/blob/trunk/CHANGELOG.md
rustdoc-types = { version = "0.35.0", optional = true }

flate2 = { version = "1.1.1", optional = true }
temp-file = { version = "0.1.9", optional = true }
urlencoding = { version = "2.1.3", optional = true }

[dev-dependencies]
pretty_assertions = "1.2.0"

[features]
deploy-docs  = ["dep:reqwest"]
preview-docs = ["dep:opener", "dep:rocket"]
semver-checks = [ "dep:cargo-semver-checks", "dep:rustdoc-types", "dep:flate2", "dep:temp-file" ]
release = ["semver-checks", "dep:opener", "dep:urlencoding"]
