mozilla / rust-android-gradle

Apache License 2.0
1.03k stars 67 forks source link

Fix cargoBuild being ran even for clean #33

Closed Mygod closed 4 years ago

Mygod commented 4 years ago

We probably should also register a cargoClean task like this:

tasks.register<Exec>("cargoClean") {
    executable("cargo")     // cargo.cargoCommand
    args("clean")
    workingDir("$projectDir/${cargo.module}")
}
tasks.clean.dependsOn("cargoClean")
thomcc commented 4 years ago

Thanks

Mygod commented 4 years ago

Do you think we should register this task (and also the cleaning task) within the plugin?

Mygod commented 4 years ago

Actually maybe it should be depended on by mergeDebugJniLibFolders and mergeReleaseJniLibFolders instead, but we should probably enable ExternalNativeBuild first.