Skip to content

Commit

Permalink
Update the wiki bazel instructions to add some tips around python and…
Browse files Browse the repository at this point in the history
… jdk8 (#5159)

<!-- READ ME FIRST: Please fill in the explanation section below and
check off every point from the Essential Checklist! -->
## Explanation
Update the bazel setup instructions wiki to add some tips/workarounds
from my recent experience. Also, I added the instructions for Linux and
Mac to the side panel, since Windows was already there.

## Essential Checklist
<!-- Please tick the relevant boxes by putting an "x" in them. -->
- [ ] The PR title and explanation each start with "Fix #bugnum: " (If
this PR fixes part of an issue, prefix the title with "Fix part of
#bugnum: ...".)
- [ ] Any changes to
[scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets)
files have their rationale included in the PR explanation.
- [x] The PR follows the [style
guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide).
- [x] The PR does not contain any unnecessary code changes from Android
Studio
([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)).
- [x] The PR is made from a branch that's **not** called "develop" and
is up-to-date with "develop".
- [x] The PR is **assigned** to the appropriate reviewers
([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)).

## For UI-specific PRs only
<!-- Delete these section if this PR does not include UI-related
changes. -->
If your PR includes UI-related changes, then:
- Add screenshots for portrait/landscape for both a tablet & phone of
the before & after UI changes
- For the screenshots above, include both English and pseudo-localized
(RTL) screenshots (see [RTL
guide](https://github.com/oppia/oppia-android/wiki/RTL-Guidelines))
- Add a video showing the full UX flow with a screen reader enabled (see
[accessibility
guide](https://github.com/oppia/oppia-android/wiki/Accessibility-A11y-Guide))
- Add a screenshot demonstrating that you ran affected Espresso tests
locally & that they're passing

---------

Co-authored-by: Adhiambo Peres <[email protected]>
  • Loading branch information
masclot and adhiamboperes authored Oct 6, 2023
1 parent 1902946 commit 4680a5d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions wiki/Bazel-Setup-Instructions-for-Linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@ Oppia Android also requires OpenJDK 8. The Bazel installation instructions above

You can confirm that this is set up using the command `java -version`, which should result in three lines being printed out with the first one showing "openjdk version "1.8.0_292".
> **Tip:** Newer linux distributions may not have openjdk-8 anymore. This has been reported for Debian and Ubuntu. If this is your case, **openjdk-11** has been tested as a viable alternative.
### 3. Install Python 2
Ensure that you have Python 2 installed and make sure that it is currently active on your environment. You can do this by using the ``python --version`` command which should show Python 2.X.X. If it doesn’t, click [here](https://linuxconfig.org/install-python-2-on-ubuntu-20-04-focal-fossa-linux) for a resource on how to install and update Linux to use Python 2.
> **Tip:** Newer linux distributions may not have the python command and instead use python2 and python3. Bazel <5 requires `python` and that [cannot be configured](https://stackoverflow.com/questions/62802126/how-to-stop-bazel-from-relying-on-python2). Creating an alias won't solve the problem, you'll need a symlink. To create one, you can run the following:
>
> `sudo apt install python-is-python2`
### 4. Set up the ANDROID_HOME environment variable
Ensure that your `ANDROID_HOME` environment variable is set to the location of your Android SDK. To do this, find the path to the installed SDK using Android Studio’s SDK Manager (install SDK 28). Assuming the SDK is installed to default locations, you can use the following commands to set the `ANDROID_HOME` variable:<br>
Expand Down
2 changes: 2 additions & 0 deletions wiki/_Sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* [Overview of the Oppia Android codebase and architecture](https://github.com/oppia/oppia-android/wiki/Overview-of-the-Oppia-Android-codebase-and-architecture)
* Bazel
* [Bazel setup instructions](https://github.com/oppia/oppia-android/wiki/Oppia-Bazel-Setup-Instructions)
* [Bazel Setup Instructions for Linux](https://github.com/oppia/oppia-android/wiki/Bazel-Setup-Instructions-for-Linux)
* [Bazel Setup Instructions for Mac](https://github.com/oppia/oppia-android/wiki/Bazel-Setup-Instructions-for-Mac)
* [Bazel Setup Instructions for Windows](https://github.com/oppia/oppia-android/wiki/Bazel-Setup-Instructions-for-Windows)
* Key Workflows
* [Guidance on submitting a PR](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR)
Expand Down

0 comments on commit 4680a5d

Please sign in to comment.