You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b7a3016
Browse filesBrowse the repository at this point in the historyBrowse files
Clarify Fenix building instructions (mozilla#7290)
* Clarify JAVA_HOME setup in Fenix building instructions
Updated instructions for setting JAVA_HOME with a specific command.
* Fix NDK instructions
* Mention mozilla-central instead of mozilla-mobile/firefox-android
* Updating building instructions based on pairing sessions over the last few days with android team
* Simplifying instructions
* Fixing casing and adding mac example
Co-authored-by: Mathieu Leplatre <mathieu@mozilla.com>
* Fixing casing
Co-authored-by: Mathieu Leplatre <mathieu@mozilla.com>
* Fixing casing
Co-authored-by: Mathieu Leplatre <mathieu@mozilla.com>
* Fixing casing
Co-authored-by: Mathieu Leplatre <mathieu@mozilla.com>
* Fixing casing
Co-authored-by: Mathieu Leplatre <mathieu@mozilla.com>
* Fixing casing and adding gradle example
Co-authored-by: Mathieu Leplatre <mathieu@mozilla.com>
---------
Co-authored-by: Alex Cottner <acottner@mozilla.com>
Co-authored-by: Alex Cottner <148472676+alexcottner@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/building.md
+12-7Lines changed: 12 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,20 +100,25 @@ The following instructions assume that you are building `application-services` f
100
100
[Fenix Auto-publication workflow for android-components and application-services](howtos/locally-published-components-in-fenix.md).
101
101
102
102
1. Install Android SDK, JAVA, NDK and set required env vars
103
-
1. Clone the [firefox-android](https://github.com/mozilla-mobile/firefox-android) repository (**not** inside the Application Service repository).
104
-
1. Install [Java **17**](https://www.oracle.com/java/technologies/downloads/#java17) for your system
105
-
1. Set `JAVA_HOME` to point to the JDK 17 installation directory.
103
+
1. [Bootstrap a Firefox for Android environment](https://firefox-source-docs.mozilla.org/mobile/android/index.html) (**not** inside the Application Service repository).
106
104
1. Download and install [Android Studio](https://developer.android.com/studio/#downloads).
107
-
1. Set `ANDROID_SDK_ROOT` and `ANDROID_HOME` to the Android Studio sdk location and add it to your rc file (either `.zshrc` or `.bashrc` depending on the shell you use for your terminal).
108
-
1. Configure the required versions of NDK
109
-
`Configure menu > System Settings > Android SDK > SDK Tools > NDK > Show Package Details > NDK (Side by side)`
110
-
- 29.0.14206865 (required by Application Services, [as configured](https://github.com/mozilla/application-services/blob/main/build.gradle#L33))
105
+
1. Configure Android Studio to use the bootstrapped SDK under `Settings > Languages & Frameworks > Android SDK`, set it to the SDK from mozbuild. Ex: `~/.mozbuild/android-sdk-linux` or `~/.mozbuild/android-sdk-macos`
106
+
1. Download the required NDK and command-line tools under `Settings > Languages & Frameworks > Android SDK > SDK Tools`. Pick:
107
+
1. NDK (Side by side) version 29.0.14206865 [as configured](https://github.com/mozilla/application-services/blob/bb8cde8a5/taskcluster/docker/linux/Dockerfile#L25)
108
+
1. Android SDK Command-line Tools (latest)
109
+
1. Set environment variables based on the boostrapped code and the downloaded NDK. Add it to your rc file (either `.zshrc` or `.bashrc` depending on your shell) to make it permanent
110
+
1. Set `JAVA_HOME` to point to the bootstraped JDK 17 installation directory. Ex: `export JAVA_HOME=~/.mozbuild/jdk/jdk-17.0.18+8/`
111
+
1. Set `ANDROID_HOME` to the bootstraped Android SDK. Ex: `export ANDROID_HOME=~/.mozbuild/android-sdk-linux`
112
+
1. Set `NSS_STATIC` to 1. Ex: `export NSS_STATIC=1`
113
+
1. Set `NSS_DIR` to your local NSS folder. Ex: `export NSS_DIR=~/Mozilla/application-services/libs/desktop/linux-x86-64/nss`
114
+
1. Set `ANDROID_NDK_ROOT` to the NDK you downloaded via Android Studio, Ex: `export ANDROID_NDK_ROOT=~/.mozbuild/android-sdk-linux/ndk/29.0.14206865`
111
115
1. If you are on Windows using WSL - drop to the section below, [Windows setup
112
116
for Android (WSL)](building.md#windows-setup-for-android-via-wsl) before proceeding.
113
117
1. Check dependencies, environment variables
114
118
1. Run `./libs/verify-android-environment.sh`
115
119
2. Follow instructions and rerun until it is successful.
116
120
121
+
**Note:** If you opened the application-services or Firefox repos in Android Studio, it likely added a `local.properties` or `gradle-daemon-jvm.properties` file that could override some of the environment variables above. If you experience build errors, correct or delete these values in the `local.properties` files.
0 commit comments