Closed AntonPieper closed 1 year ago
Ok, it actually was really simple:
build.gradle.kts
(in :app)
plugins {
alias(libs.plugins.rust)
}
cargo {
module = "../rust" // Or whatever directory contains your Cargo.toml
libname = "rust" // Or whatever matches Cargo.toml's [package] name.
targets = listOf("arm", "x86") // See bellow for a longer list of options
}
libs.versions.toml
[versions]
rust = "0.9.3"
[plugins]
rust = { id = "org.mozilla.rust-android-gradle.rust-android", version.ref = "rust" }
Modern android applications use Kotlin DSL instead of groovy for the gradle scripts. Also they use
libs.versions.toml
. I tried to migrate to these, however it does not work. Could you ad instructions on how to add this plugin using Kotlin DSL andlibs.versions.toml
?