Check if Android Studio is installed

Summary:
Since Android Studio is technically not required, I made this check optional.
Though, these steps will gurantee that android env will work for an engineer who opened flipper for the first time

Reviewed By: lblasa

Differential Revision: D51267272

fbshipit-source-id: f30e58f322ea080b00a27ae86b871df2b39e1bb9
This commit is contained in:
Anton Kastritskiy
2023-11-14 04:29:59 -08:00
committed by Facebook GitHub Bot
parent d88cf41a24
commit f6445fea43
2 changed files with 30 additions and 1 deletions

View File

@@ -21,7 +21,8 @@ import {
getIdbInstallationInstructions,
installXcode,
installSDK,
} from './fb-stubs/ios';
installAndroidStudio,
} from './fb-stubs/messages';
import {validateSelectedXcodeVersion} from './fb-stubs/validateSelectedXcodeVersion';
export function getHealthchecks(): FlipperDoctor.Healthchecks {
@@ -66,6 +67,29 @@ export function getHealthchecks(): FlipperDoctor.Healthchecks {
isRequired: false,
isSkipped: false,
healthchecks: [
...(process.platform === 'darwin'
? [
{
key: 'android.android-studio',
label: 'Android Studio Installed',
isRequired: false,
run: async (_: FlipperDoctor.EnvironmentInfo) => {
const hasProblem = !fs.existsSync(
'/Applications/Android Studio.app',
);
const message = hasProblem
? installAndroidStudio
: `Android Studio is installed.`;
return {
hasProblem,
message,
};
},
},
]
: []),
{
key: 'android.sdk',
label: 'SDK Installed',