alef 0.20.7

Opinionated polyglot binding generator for Rust libraries
Documentation
//! `AndroidManifest.xml` emitter — minimal manifest, namespace-only.

use crate::core::config::ResolvedCrateConfig;

use crate::backends::kotlin_android::naming::namespace;

/// Emit `src/main/AndroidManifest.xml`. The Android library namespace
/// supersedes the legacy `package` attribute, but we still emit it as a
/// fallback for compatibility with older Android Gradle Plugin versions.
pub fn emit(config: &ResolvedCrateConfig) -> String {
    let ns = namespace(config);
    format!(
        r#"<?xml version="1.0" encoding="utf-8"?>
<!-- Generated by alef. Do not edit by hand. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="{ns}">
</manifest>
"#
    )
}