Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 95ede13

Browse files
committed
[[ API 26 ]] Add api version to prebuilt lib paths
1 parent c333fe5 commit 95ede13

File tree

5 files changed

+16
-9
lines changed

5 files changed

+16
-9
lines changed

config.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,16 +414,20 @@ def validate_android_tools(opts):
414414
if opts['ANDROID_NDK_VERSION'] is None:
415415
opts['ANDROID_NDK_VERSION'] = 'r15'
416416

417-
ndk_ver = opts['ANDROID_NDK_VERSION']
418-
if opts['ANDROID_PLATFORM'] is None:
419-
opts['ANDROID_PLATFORM'] = 'android-26'
417+
ndk_ver = opts['ANDROID_NDK_VERSION']
420418

421419
if opts['ANDROID_NDK'] is None:
422420
ndk = guess_android_tooldir('android-ndk')
423421
if ndk is None:
424422
error('Android NDK not found; set $ANDROID_NDK')
425423
opts['ANDROID_NDK'] = ndk
426424

425+
if opts['ANDROID_API_VERSION'] is None:
426+
opts['ANDROID_API_VERSION'] = '26'
427+
428+
if opts['ANDROID_PLATFORM'] is None:
429+
opts['ANDROID_PLATFORM'] = 'android-26'
430+
427431
if opts['ANDROID_SDK'] is None:
428432
sdk = guess_android_tooldir('android-sdk')
429433
if sdk is None:
@@ -532,6 +536,7 @@ def configure_android(opts):
532536

533537
export_opts(opts, ('ANDROID_BUILD_TOOLS', 'ANDROID_NDK',
534538
'ANDROID_PLATFORM', 'ANDROID_SDK',
539+
'ANDROID_API_VERSION',
535540
'JAVA_SDK', 'AR', 'CC', 'CXX', 'LINK', 'OBJCOPY',
536541
'OBJDUMP', 'STRIP'))
537542
args = core_gyp_args(opts) + ['-Dtarget_arch=' + opts['TARGET_ARCH'],

config/android.gypi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
'java_sdk_path%': '<!(echo ${JAVA_SDK})',
99
'android_sdk_path%': '<!(echo ${ANDROID_SDK})',
1010
'android_ndk_path%': '<!(echo ${ANDROID_NDK})',
11+
'android_api_version%': '<!(echo ${ANDROID_API_VERSION})',
1112
'android_platform%': '<!(echo ${ANDROID_PLATFORM})',
1213
'android_build_tools%': '<!(echo ${ANDROID_BUILD_TOOLS})',
1314
},

docs/development/build-android.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ TRIPLE=arm-linux-androideabi
6868
TOOLCHAIN=${HOME}/android/toolchain # Edit me!
6969

7070
# Java SDK
71-
JAVA_SDK=/usr/lib/jvm/java-7-openjdk-amd64/ # Edit me!
71+
JAVA_SDK=/usr/lib/jvm/java-8-openjdk-amd64/ # Edit me!
7272

7373
# Build tools
7474
BINDIR=$TOOLCHAIN/standalone/bin
@@ -81,16 +81,17 @@ AR="${BINDIR}/${TRIPLE}-ar"
8181

8282
# Android platform information
8383
ANDROID_NDK_VERSION=r15
84-
ANDROID_PLATFORM=android-26
85-
ANDROID_NDK=${TOOLCHAIN}/android-ndk-r15
84+
ANDROID_API_VERSION=26
85+
ANDROID_PLATFORM=android-${ANDROID_API_VERSION}
86+
ANDROID_NDK=${TOOLCHAIN}/android-ndk-${ANDROID_NDK_VERSION}
8687
ANDROID_SDK=${TOOLCHAIN}/android-sdk-linux
8788
ANDROID_BUILD_TOOLS=27.0.3
8889
ANDROID_LIB_PATH=${TOOLCHAIN}/standalone/${TRIPLE}/lib
8990

9091
export JAVA_SDK
9192
export CC CXX LINK AR
9293
export ANDROID_PLATFORM ANDROID_NDK ANDROID_SDK ANDROID_BUILD_TOOLS
93-
export ANDROID_LIB_PATH
94+
export ANDROID_LIB_PATH ANDROID_API_VERSION
9495
````
9596

9697
### Generating makefiles

prebuilt/libicu.gyp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
# Gyp doesn't seem to handle non-absolute paths here properly...
180180
'library_dirs':
181181
[
182-
'lib/android/<(target_arch)',
182+
'lib/android/<(target_arch)/api<(android_api_version)',
183183
],
184184

185185
'libraries':

prebuilt/libopenssl.gyp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
{
122122
'library_dirs':
123123
[
124-
'lib/android/<(target_arch)',
124+
'lib/android/<(target_arch)/api<(android_api_version)',
125125
],
126126

127127
'libraries':

0 commit comments

Comments
 (0)