Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug - Support MainApplication.kt #7846

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion autolink/postlink/path.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ var ignoreFolders = {
exports.mainActivityJava = glob.sync('**/MainActivity.java', ignoreFolders)[0];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably want to handle MainActivity.{java,kt} the same as we treat AppDelegate.{m,mm}

exports.mainActivityKotlin = glob.sync('**/MainActivity.kt', ignoreFolders)[0];
var mainApplicationJava = glob.sync('**/MainApplication.java', ignoreFolders)[0];
var mainApplicationKotlin = glob.sync('**/MainApplication.kt', ignoreFolders)[0];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably want to handle MainApplication.{java,kt} the same as we treat AppDelegate.{m,mm}

var mainApplication = mainApplicationJava || mainApplicationKotlin
exports.mainApplicationJava = mainApplicationJava;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left mainApplicationJava, as i'm not sure if we do want to change this variable. please change it as well if it's needed

exports.rootGradle = mainApplicationJava.replace(/android\/app\/.*\.java/, 'android/build.gradle');
exports.rootGradle = mainApplication.replace(/android\/app\/.*\.java/, 'android/build.gradle'); exports.mainApplicationJava = mainApplicationJava;

var reactNativeVersion = require('../../../react-native/package.json').version;
exports.appDelegate = glob.sync(
Expand Down