You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cargo supports letting you specify a single directory for use for all projects via the CARGO_TARGET_DIR environment variable.
See this reddit post for a reason someone might want to do this (I had 170GB in various target files across my machine), although I've heard it can to speed up build times too, since it improves dep cache hits.
val targetDirectory = targetDirectory ?:"${module!!}/target"
, but
I haven't tested this, and maybe it's a little more complex.
It's unclear to me what should happen if both targetDirectory and that variable is specified. I kind of think that the variable should take precedence, as it's what cargo will actually use. But, maybe there's a use case for targetDirectory that I'm missing.
The text was updated successfully, but these errors were encountered:
thomcc
changed the title
Support global cargo target directories
Support CARGO_TARGET_DIR environment variable
Jul 10, 2019
thomcc
pushed a commit
to thomcc/rust-android-gradle-1
that referenced
this issue
Aug 5, 2019
Cargo supports letting you specify a single directory for use for all projects via the CARGO_TARGET_DIR environment variable.
See this reddit post for a reason someone might want to do this (I had 170GB in various
target
files across my machine), although I've heard it can to speed up build times too, since it improves dep cache hits.I think we would just want to change
rust-android-gradle/plugin/src/main/kotlin/com/nishtahir/CargoBuildTask.kt
Line 31 in fcea238
targetDirectory
and that variable is specified. I kind of think that the variable should take precedence, as it's what cargo will actually use. But, maybe there's a use case fortargetDirectory
that I'm missing.The text was updated successfully, but these errors were encountered: