Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android): module build to download ndk with gradle tool 3.5.0+ #11613

Merged
merged 3 commits into from
Apr 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions android/templates/module/generated/build.gradle
Original file line number Diff line number Diff line change
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