@react-native-community/cli-platform-android
Advanced tools
Comparing version 12.0.0-alpha.10 to 12.0.0-alpha.11
@@ -118,3 +118,6 @@ "use strict"; | ||
} | ||
const androidProject = (0, _getAndroidProject.getAndroidProject)(config); | ||
let androidProject = (0, _getAndroidProject.getAndroidProject)(config); | ||
if (args.mainActivity) { | ||
androidProject.mainActivity = args.mainActivity; | ||
} | ||
return buildAndRun(args, androidProject); | ||
@@ -238,3 +241,3 @@ } | ||
(0, _tryInstallAppOnDevice.default)(args, adbPath, selectedDevice, androidProject, selectedTask); | ||
(0, _tryLaunchAppOnDevice.default)(selectedDevice, androidProject.packageName, adbPath, args); | ||
(0, _tryLaunchAppOnDevice.default)(selectedDevice, androidProject, adbPath, args); | ||
} | ||
@@ -266,4 +269,3 @@ var _default = { | ||
name: '--main-activity <string>', | ||
description: 'Name of the activity to start', | ||
default: 'MainActivity' | ||
description: 'Name of the activity to start' | ||
}, { | ||
@@ -270,0 +272,0 @@ name: '--deviceId <string>', |
@@ -93,3 +93,3 @@ "use strict"; | ||
} | ||
(0, _tryLaunchAppOnDevice.default)(device, androidProject.packageName, adbPath, args); | ||
(0, _tryLaunchAppOnDevice.default)(device, androidProject, adbPath, args); | ||
}); | ||
@@ -96,0 +96,0 @@ } |
@@ -8,5 +8,5 @@ /** | ||
*/ | ||
import { Flags } from '.'; | ||
declare function tryLaunchAppOnDevice(device: string | void, packageName: string, adbPath: string, args: Flags): void; | ||
import { AndroidProject, Flags } from '.'; | ||
declare function tryLaunchAppOnDevice(device: string | void, androidProject: AndroidProject, adbPath: string, args: Flags): void; | ||
export default tryLaunchAppOnDevice; | ||
//# sourceMappingURL=tryLaunchAppOnDevice.d.ts.map |
@@ -30,3 +30,3 @@ "use strict"; | ||
function tryLaunchAppOnDevice(device, packageName, adbPath, args) { | ||
function tryLaunchAppOnDevice(device, androidProject, adbPath, args) { | ||
const { | ||
@@ -36,4 +36,8 @@ appId, | ||
} = args; | ||
const { | ||
packageName, | ||
mainActivity | ||
} = androidProject; | ||
const packageNameWithSuffix = [appId || packageName, appIdSuffix].filter(Boolean).join('.'); | ||
const activityToLaunch = args.mainActivity.includes('.') ? args.mainActivity : [packageName, args.mainActivity].filter(Boolean).join('.'); | ||
const activityToLaunch = mainActivity.includes('.') ? mainActivity : [packageName, mainActivity].filter(Boolean).join('.'); | ||
try { | ||
@@ -40,0 +44,0 @@ // Here we're using the same flags as Android Studio to launch the app |
@@ -97,2 +97,12 @@ /** | ||
export declare const findPackagesClassNameJavaNotValid: string[]; | ||
export declare const fewActivities: { | ||
src: { | ||
'AndroidManifest.xml': any; | ||
}; | ||
}; | ||
export declare const className: { | ||
src: { | ||
'AndroidManifest.xml': any; | ||
}; | ||
}; | ||
//# sourceMappingURL=android.d.ts.map |
@@ -36,2 +36,3 @@ "use strict"; | ||
} | ||
var _getMainActivity = _interopRequireDefault(require("./getMainActivity")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -66,2 +67,6 @@ /** | ||
} | ||
const mainActivity = (0, _getMainActivity.default)(manifestPath || ''); | ||
if (!mainActivity) { | ||
throw new (_cliTools().CLIError)(`Main activity not found in ${manifestPath}`); | ||
} | ||
return { | ||
@@ -71,2 +76,3 @@ sourceDir, | ||
packageName, | ||
mainActivity, | ||
dependencyConfiguration: userConfig.dependencyConfiguration, | ||
@@ -73,0 +79,0 @@ watchModeCommandParams: userConfig.watchModeCommandParams, |
{ | ||
"name": "@react-native-community/cli-platform-android", | ||
"version": "12.0.0-alpha.10", | ||
"version": "12.0.0-alpha.11", | ||
"license": "MIT", | ||
@@ -10,5 +10,6 @@ "main": "build/index.js", | ||
"dependencies": { | ||
"@react-native-community/cli-tools": "12.0.0-alpha.10", | ||
"@react-native-community/cli-tools": "12.0.0-alpha.11", | ||
"chalk": "^4.1.2", | ||
"execa": "^5.0.0", | ||
"fast-xml-parser": "^4.2.4", | ||
"glob": "^7.1.3", | ||
@@ -24,3 +25,3 @@ "logkitty": "^0.7.1" | ||
"devDependencies": { | ||
"@react-native-community/cli-types": "12.0.0-alpha.10", | ||
"@react-native-community/cli-types": "12.0.0-alpha.11", | ||
"@types/fs-extra": "^8.1.0", | ||
@@ -35,3 +36,3 @@ "@types/glob": "^7.1.1" | ||
}, | ||
"gitHead": "bd496c42d7a5c2c993504a32bed8e266a135ff44" | ||
"gitHead": "079150994170816bb332293d3dd118e997651541" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
229738
118
2400
6
15
+ Addedfast-xml-parser@^4.2.4
+ Added@react-native-community/cli-tools@12.0.0-alpha.11(transitive)
+ Addedfast-xml-parser@4.5.0(transitive)
+ Addedstrnum@1.0.5(transitive)
- Removed@react-native-community/cli-tools@12.0.0-alpha.10(transitive)