mirror of
https://github.com/minetest/minetest.git
synced 2024-12-25 15:42:24 +01:00
373bad16c0
Replace Log to Toast. Start Native only after successful unpacking. Light refactoring in CopyZipTask. Update NDK version. Co-authored-by: ubulem <berkut87@gmail.com>
60 lines
1014 B
Groovy
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
|