# Copyright © SixtyFPS GmbH <info@slint.dev>
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0

[package]
name = "i-slint-backend-android-activity"
description = "OpenGL rendering backend for Slint"
authors.workspace = true
edition.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lib]
path = "lib.rs"

[features]
game-activity = ["android-activity-06?/game-activity", "android-activity-05?/game-activity"]
native-activity = ["android-activity-06?/native-activity", "android-activity-05?/native-activity"]
aa-06 = ["android-activity-06", "ndk-09"]
aa-05 = ["android-activity-05", "ndk-08"]
unstable-wgpu-27 = ["i-slint-renderer-skia/unstable-wgpu-27"]
unstable-wgpu-28 = ["i-slint-renderer-skia/unstable-wgpu-28"]

[target.'cfg(target_os = "android")'.dependencies]
i-slint-renderer-skia = { workspace = true }
i-slint-core = { workspace = true, features = ["std"] }
raw-window-handle = { version = "0.6" }
android-activity-05 = { package = "android-activity", version = "0.5", optional = true }
android-activity-06 = { package = "android-activity", version = "0.6", optional = true }
jni = { version = "0.22" }

# We only depends on the NDK directly to enable raw-window-handle 0.6 which we need for the skia renderer
ndk-08 = { package = "ndk", version = "0.8.0", optional = true, features = ["rwh_06"] }
ndk-09 = { package = "ndk", version = "0.9.0", optional = true, features = ["rwh_06"], default-features = false }

[build-dependencies]
android-build = "0.1.2"

[package.metadata.docs.rs]
targets = ["aarch64-linux-android", "armv7-linux-androideabi", "i686-linux-android", "x86_64-linux-android"]
features = ["native-activity", "aa-06"]
rustdoc-args = ["--generate-link-to-definition"]
