Skip to content

Commit

Permalink
fix(android)(9_0_X): module build to download ndk with gradle tool 3.…
Browse files Browse the repository at this point in the history
…5.0+ (#11620)

- After updating Android gradle tool from 3.4.x to 3.6.0, module builds no longer auto-downloads NDK if missing.
- Issue on Google's end which default to an "unstable" NDK version and tool does not support downloading unstable versions.
- Downgraded default NDK version for modules from 21.0.6113669 to 20.1.5948944
  * Avoids harmless "bad file descriptor" errors that get logged by newest NDK.

Fixes TIMOB-27798
  • Loading branch information
jquick-axway committed Apr 30, 2020
1 parent cf4cc22 commit 7545627
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions android/templates/module/generated/build.gradle
Expand Up @@ -151,6 +151,15 @@ preBuild.doFirst {
}
}

// If Titanium failed to set Android NDK path in "local.properties", then assume NDK is not installed.
// Have gradle auto-download NDK by setting the version we want below. (Will fail if a different version is installed.)
// Must be set to a stable release version listed here: https://developer.android.com/ndk/downloads
def localProperties = new Properties()
localProperties.load(file("${rootDir}/local.properties").newDataInputStream())
if (localProperties.get('ndk.dir') == null) {
android.ndkVersion '20.1.5948944'
}

// Set up project to compile Java side before compiling the C/C++ side.
// We must do this because our "kroll-apt" Java annotation processor generates C++ source files.
project.afterEvaluate {
Expand Down

0 comments on commit 7545627

Please sign in to comment.