-
Notifications
You must be signed in to change notification settings - Fork 81
Open
Description
Needed to do some digging around to how to set up a build.gradle.kts with a lot of trial and error, I think I've got it mostly.
to apply the plugin in a module's build.gradle.kts:
plugins {
// ...
id("org.mozilla.rust-android-gradle.rust-android") version "0.9.3"
}
to configure the plugin in a module's build.gradle.kts
extensions.configure(CargoExtension::class) {
module = "[module name]"
libname = "[libname]"
// ...
}
to set a build dependency (This seems to work for me but not sure if it's the best method):
tasks.preBuild.configure {
dependsOn.add(tasks.withType(CargoBuildTask::class.java))
}
Additionally, it seems that the most recent template for adding plugins in an Android build.gradle.kts setup puts the plugin (without applying) in the project level build.gradle.kts like so:
plugins {
// ...
id("org.mozilla.rust-android-gradle.rust-android") version "0.9.3" apply false
}
Could probably do a PR myself but not sure where exactly these instructions would best fit
bancek, MarijnS95, murki, Voronar, mthli and 7 more
Metadata
Metadata
Assignees
Labels
No labels