Running 5.6.2 via Editor Command Line leaves out VR SDK's

We’re currently using 5.6.2 with Jenkins to build our apps. The command line arguments we provide for the editor are:

logFile /dev/stdout -batchmode -nographics -executeMethod BuildAppClass.PerformAndroidBuild -quit

The result is an app building on all platforms without the gvr sdk.

adb debug output of app:

    VRSettings.LoadDeviceByName("Cardboard");
    Debug.Log("VR DEVICE LOADED: " + VRSettings.loadedDeviceName);

Unable to find gvr

VR DEVICE LOADED:

The VR flags we have for the BuildAppClass.PerformAndroidBuild are:

    PlayerSettings.virtualRealitySupported = true;
    //VR ANDROID
    UnityEditorInternal.VR.VREditor.SetVREnabledOnTargetGroup(BuildTargetGroup.Android, true);
    UnityEditorInternal.VR.VREditor.SetVREnabledDevicesOnTargetGroup(BuildTargetGroup.Android, new string[] { "Cardboard" });

The app builds fine through the usual process of loading up the Editor. Our previous GVR projects (external sdk rather than native integration in 5.6) have built fine.

Our assumption currently is that the command line execution for 5.6.2 isn’t attaching the GVR sdk to the project.

https://forum.unity3d.com/threads/5-6-2-native-gvr-build-wont-work-when-built-through-command-line.484274/

The issue is due to the Library folder being created only by command line. The editor needs to be opened once in order to link the frameworks/libs.