mozilla / rust-android-gradle

Apache License 2.0
1.03k stars 67 forks source link

build only for phone target #107

Closed lattice0 closed 2 years ago

lattice0 commented 2 years ago

Currently, when I do flutter run, it builds for both x86_64 and aarch64, even though the phone will only use the aarch64 .so lib. Of course for publishing the app this is desired but is it possible to make rust-android-gralde compile the target architecture?

This slows down testing a lot

ncalexan commented 2 years ago

Yes: there is a single cargoBuild job that depends on the architecture-specific cargoBuild{$ARCH} jobs; you have probably wired the cargoBuild job into your task graph. Set up your Gradle tasks to depend on the arch-specific jobs. (No idea how to achieve that with Flutter but it can't be that hard.)

Alternatively, use local.properties to restrict the built architectures during testing.