Skip to content

Instantly share code, notes, and snippets.

@uOOOO
Created November 11, 2019 12:56
Show Gist options
  • Select an option

  • Save uOOOO/706df72337c523ee3d5ba8682538b46a to your computer and use it in GitHub Desktop.

Select an option

Save uOOOO/706df72337c523ee3d5ba8682538b46a to your computer and use it in GitHub Desktop.
Create mips64el-linux-android directory to avoid NDK build issue on old AGP
// This script is for avoiding NDK build issue on old AGP.
gradle.beforeProject {
Properties properties = new Properties()
properties.load(rootProject.file("local.properties").newDataInputStream())
def ndkPath = properties.getProperty("ndk.dir", null)
if (ndkPath == null) {
println("ndk.dir should be set in local.properties.")
return
}
def arm64Path = ndkPath + File.separator + 'toolchains' + File.separator + 'aarch64-linux-android-4.9'
def mips64Path = ndkPath + File.separator + 'toolchains' + File.separator + 'mips64el-linux-android'
println ("Create ${mips64Path} from ${arm64Path}\n")
copy {
from arm64Path
into mips64Path
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment