fs_mgr: Separate the required modules of core and recovery variants

Bug: 191369319
Test: Presubmit
Test: Verify libfs_mgr.recovery no longer depends on core variation
  modules in the ninja graph.
Change-Id: I3c8b1f3d00ff9a67f4d9ea552052e308e550c403
diff --git a/fs_mgr/Android.bp b/fs_mgr/Android.bp
index abd2483..5896c4a 100644
--- a/fs_mgr/Android.bp
+++ b/fs_mgr/Android.bp
@@ -126,10 +126,19 @@
     export_header_lib_headers: [
         "libfiemap_headers",
     ],
-    required: [
-        "e2freefrag",
-        "e2fsdroid",
-    ],
+    target: {
+        platform: {
+            required: [
+                "e2freefrag",
+                "e2fsdroid",
+            ],
+        },
+        recovery: {
+            required: [
+                "e2fsdroid.recovery",
+            ],
+        },
+    },
 }
 
 // Two variants of libfs_mgr are provided: libfs_mgr and libfs_mgr_binder.