diff --git a/README.md b/README.md index 844bf4d..07f7f6c 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,10 @@ Windows android support work in progress | Feature | Android | iOS | |------------------------------------| :---: | :---: | -| Run on emulator | 🚧 | ✅ | +| Run on emulator | ✅ | ✅ | | Run on device | 🚧| 🚧 | | Debug build | 🚧 | 🚧 | -| Build flavor/variants | 🚧 | 🚧 | +| Build flavor/schema | ✅ | ✅ | | Release build | 🚧 | 🚧 | | Sign application | 🚧 | 🚧 | | Incremental build | 🚧| 🚧 | diff --git a/src/application/androidUtils.ts b/src/application/androidUtils.ts index b2dd702..f74cce5 100644 --- a/src/application/androidUtils.ts +++ b/src/application/androidUtils.ts @@ -1,7 +1,6 @@ import {getAppName, getRootDestinationFolder} from './utils' export function getAppBuildFolder(buildType?: string) { - console.log('getAppBuildFolder', buildType); // todo add debug const appPath = `${getRootDestinationFolder()}/android/${buildType ? `${buildType}/` : ''}debug` return appPath diff --git a/src/application/runAndroid.ts b/src/application/runAndroid.ts index 325d7e0..df01a81 100644 --- a/src/application/runAndroid.ts +++ b/src/application/runAndroid.ts @@ -10,6 +10,7 @@ import tryLaunchEmulator from '@react-native-community/cli-platform-android/buil import {buildAndroid} from './buildAndroid' import {getAppBuildFolder} from './androidUtils' import path from 'path' +import logger from './logger' function getAdbPath() { const androidHome = process.env.ANDROID_HOME @@ -105,9 +106,13 @@ function getBundleIdentifier(appBuildFolder: string): string { export async function runApp(buildType?: string, port = '8081') { if (!checkBuildPresent(buildType)) { - buildAndroid(buildType) + logger.info('Build not present, starting build'); + await buildAndroid(buildType) + }else { + logger.info('Build already present, skipping build'); } + // todo improvement: if there is only one device, use it directly const device = await listAndroidDevices() const appIdentifier = getBundleIdentifier(getAppBuildFolder(buildType)) @@ -124,10 +129,8 @@ export async function runApp(buildType?: string, port = '8081') { } else { const newEmulatorPort = await getAvailableDevicePort() const emulator = `emulator-${newEmulatorPort}` - console.info('Launching emulator...') const result = await tryLaunchEmulator(getAdbPath(), device.readableName, newEmulatorPort) if (result.success) { - console.info('Successfully launched emulator.') tryRunAdbReverse(port, emulator) installApp(emulator, getProjectRootDir(), buildType)