changes link file on Android to MainApplication.java for 0.29 update

Summary:
rnpm aka `react-native link` is broken with Android 0.29 - #8603

This gets it back to working again by checking for new MyApplication.java file, and curtailing the path when needed.
Closes https://github.com/facebook/react-native/pull/8612

Differential Revision: D3533960

fbshipit-source-id: 95d799eaebb26ba1d876c88107ccd2af72427f55
This commit is contained in:
Gant 2016-07-08 01:33:51 -07:00 committed by Facebook Github Bot 1
parent 46a685169e
commit c3f4d79475
1 changed files with 3 additions and 3 deletions

View File

@ -33,9 +33,9 @@ exports.projectConfig = function projectConfigAndroid(folder, userConfig) {
const packageFolder = userConfig.packageFolder ||
packageName.replace(/\./g, path.sep);
const mainActivityPath = path.join(
const mainFilePath = path.join(
sourceDir,
userConfig.mainActivityPath || `src/main/java/${packageFolder}/MainActivity.java`
userConfig.mainFilePath || `src/main/java/${packageFolder}/MainApplication.java`
);
const stringsPath = path.join(
@ -68,7 +68,7 @@ exports.projectConfig = function projectConfigAndroid(folder, userConfig) {
buildGradlePath,
settingsGradlePath,
assetsPath,
mainActivityPath,
mainFilePath,
};
};