//! `AndroidManifest.xml` emitter — minimal manifest, namespace-only.

use alef_core::config::ResolvedCrateConfig;

use crate::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>
"#
    )
}
