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

Fix jsc-android not found if building from source #24547

Closed
wants to merge 2 commits into from

Conversation

Kudo
Copy link
Contributor

@Kudo Kudo commented Apr 21, 2019

Summary

If an app builds from RN source, there was an error for jsc-android not found.
It is a side effect of my previous JSC as node dependency change
For building from RN source case, the jsc-android is located at /path/to/app/node_modules/jsc-android.
Original gradle task will try to find it at /path/to/app/node_modules/react-native/ReactAndroid/../node_modules/jsc-android, as ReactAndroid project path was being override inside node_modules.
The change fixes the building from source case.

Changelog

N/A
This change does not need to publish into changelog, as it is a master branch building fix.

Test Plan

  1. Test building RN AAR: ./gradlew :ReactAndroid:installArchives
  2. Test an app to build from source as described at https://facebook.github.io/react-native/docs/building-from-source

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. Partner labels Apr 21, 2019
@react-native-bot react-native-bot added the Platform: Android Android applications. label Apr 21, 2019
@pull-bot
Copy link

pull-bot commented Apr 21, 2019

Messages
📖

📋 Changelog Format - Did you include a Changelog? A changelog entry has the following format: [CATEGORY] [TYPE] - Message.

CATEGORY may be:
  • General
  • iOS
  • Android

TYPE may be:

  • Added, for new features.
  • Changed, for changes in existing functionality.
  • Deprecated, for soon-to-be removed features.
  • Removed, for now removed features.
  • Fixed, for any bug fixes.
  • Security, in case of vulnerabilities.

MESSAGE may answer "what and why" on a feature level. Use this to briefly tell React Native users about notable changes.

Generated by 🚫 dangerJS against 960ad9f

@janicduplessis
Copy link
Contributor

@Kudo Would it be possible to make the path configurable? I'm using yarn workspaces and RN is not installed in /path/to/app/node_modules.

@janicduplessis
Copy link
Contributor

Maybe a better alternative would be to use $projectDir/../../jsc-android/dist instead. That way it should work with most monorepo configs, since it will look in the same directory where RN is installed.

@Kudo
Copy link
Contributor Author

Kudo commented Apr 23, 2019

@janicduplessis Good idea, please let me update accordingly.

Copy link
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

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

Thanks for this fix!

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @Kudo in 040502b.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Apr 23, 2019
@facebook-github-bot
Copy link
Contributor

@cpojer merged this pull request in 040502b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. Merged This PR has been merged. Platform: Android Android applications.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants