minetest/build/android/native/build.gradle
Maksim 373bad16c0
Android: some java-part improvements (#9760)
Replace Log to Toast.
Start Native only after successful unpacking.
Light refactoring in CopyZipTask.
Update NDK version.

Co-authored-by: ubulem <berkut87@gmail.com>
2020-05-04 08:47:00 +02:00

60 lines
1014 B
Groovy

apply plugin: 'com.android.library'
import org.ajoberstar.grgit.Grgit
android {
compileSdkVersion 29
buildToolsVersion '29.0.3'
ndkVersion '21.1.6352462'
defaultConfig {
minSdkVersion 16
targetSdkVersion 29
externalNativeBuild {
ndkBuild {
arguments '-j8',
"versionMajor=${versionMajor}",
"versionMinor=${versionMinor}",
"versionPatch=${versionPatch}",
"versionExtra=${versionExtra}"
}
}
}
externalNativeBuild {
ndkBuild {
path file('jni/Android.mk')
}
}
// supported architectures
splits {
abi {
enable true
reset()
include 'armeabi-v7a', 'arm64-v8a'//, 'x86'
}
}
buildTypes {
release {
externalNativeBuild {
ndkBuild {
arguments 'NDEBUG=1'
}
}
}
}
}
task cloneGitRepo() {
def destination = file('deps')
if(!destination.exists()) {
def grgit = Grgit.clone(
dir: destination,
uri: 'https://github.com/minetest/minetest_android_deps_binaries'
)
grgit.close()
}
}
preBuild.dependsOn cloneGitRepo