|
12 | 12 | // See the License for the specific language governing permissions and
|
13 | 13 | // limitations under the License.
|
14 | 14 |
|
15 |
| -// Set the list of Android ABIs depending on whether we the NDK_ROOT environment |
16 |
| -// variable contains the text 'r16b' in it. This will generally only occur |
17 |
| -// during C++ packaging, which uses /tmp/android-ndk-r16b as the NDK directory. |
18 |
| -// When using this NDK version, add a few additional ABIs that are only |
19 |
| -// supported in r16b and earlier. |
| 15 | +// Set the list of Android ABIs depending on whether we the ANDROID_NDK_HOME |
| 16 | +// environment variable contains the text 'r16b' in it. This will generally only |
| 17 | +// occur during C++ packaging, which uses /tmp/android-ndk-r16b as the NDK |
| 18 | +// directory. When using this NDK version, add a few additional ABIs that are |
| 19 | +// only supported in r16b and earlier. |
20 | 20 |
|
21 | 21 | android {
|
22 | 22 | defaultConfig {
|
23 | 23 | ndk {
|
24 | 24 | // Default list of ABIs available in up-to-date NDK.
|
25 | 25 | abiFilters "x86", "armeabi-v7a", "arm64-v8a", "x86_64"
|
26 | 26 |
|
27 |
| - if (System.getenv('NDK_ROOT').contains('r16b') || |
28 |
| - System.getenv('NDK_ROOT').contains('r11c')) { |
| 27 | + if (System.getenv("ANDROID_NDK_HOME").contains("r16b") || |
| 28 | + System.getenv("ANDROID_NDK_HOME").contains("r11c")) { |
29 | 29 | // Deprecated ABIs are added to the list when building using older NDKs only.
|
30 | 30 | // Rather than an exhaustive list, we only support r11c and r16b.
|
31 | 31 | abiFilters.add("armeabi")
|
32 | 32 | abiFilters.add("mips")
|
33 | 33 | abiFilters.add("mips64")
|
34 |
| - if (System.getenv('NDK_ROOT').contains('r11c')) { |
| 34 | + if (System.getenv("ANDROID_NDK_HOME").contains("r11c")) { |
35 | 35 | abiFilters.add("armeabi-v7a-hard") // Removed after r11c.
|
36 | 36 | }
|
37 | 37 | }
|
|
0 commit comments