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

[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"]

[target.'cfg(target_os = "android")'.dependencies]
i-slint-renderer-skia = { workspace = true }
i-slint-core = { workspace = true, features = ["std"] }
raw-window-handle = { version = "0.5.2" }
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.21", features = ["invocation"] }

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

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