use alef_core::config::ResolvedCrateConfig;
use alef_core::template_versions;
pub(super) fn emit_gradle_build(config: &ResolvedCrateConfig) -> String {
let crate_name = &config.name;
let kotlin_version = template_versions::maven::KOTLIN_JVM_PLUGIN;
format!(
r#"// Generated by alef. Do not edit by hand.
// To build for a different host triple, replace `linuxX64()` with
// `macosX64()` or `macosArm64()` and update the linkerOpts path accordingly.
plugins {{
kotlin("multiplatform") version "{kotlin_version}"
}}
kotlin {{
linuxX64 {{
compilations["main"].cinterops {{
val {crate_name} by creating {{
defFile = project.file("{crate_name}.def")
}}
}}
binaries {{
sharedLib()
}}
}}
}}
"#
)
}