[package]
name = "agdk-egui"
version = "0.1.0"
edition = "2021"
resolver = "2"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
log = "0.4"
winit = { version = "0.27", features = [ "android-game-activity" ] }
wgpu = "0.13.0"
pollster = "0.2"
egui = "0.19"
egui-wgpu = { version = "0.19", features = [ "winit" ] }
egui-winit = { version = "0.19", default-features = false }
egui_demo_lib = "0.19"

[target.'cfg(not(target_os = "android"))'.dependencies]
env_logger = "0.9"

[target.'cfg(target_os = "android")'.dependencies]
android_logger = "0.11.0"

[patch.crates-io]

# Since Egui currently depends on Winit 0.27 we can't update the examples to use
# Winit master just yet, and use this branch of Winit with an updated backend
# based on android-activity
winit = { git = "https://github.com/rib/winit", branch = "android-activity" }
#winit = { path = "../../../winit" }

# Note:
# Since android-activity is responsible for invoking the `android_main`
# entrypoint for a native Rust application there can only be a single
# implementation of the crate linked with the application.
#
# To avoid conflicts it's generally recommend to rely on Winit to pull
# in a compatible version of android-activity but if you'd like to build
# this example against the local checkout of android-activity you should
# specify a patch here to make sure you also affect the version that Winit
# uses.
#
# Note: also check that the local android-activity/Cargo.toml version matches
# the version of android-activity that Winit depends on (in case you need to check
# out a release branch locally to be compatible)
#android-activity = { path = "../../android-activity" }

[features]
default = []
desktop = []

[lib]
name="main"
crate_type=["cdylib"]

[[bin]]
path="src/lib.rs"
name="egui-test"
required-features = [ "desktop" ]