diff options
author | Maksim <MoNTE48@mail.ua> | 2020-04-15 16:27:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-15 16:27:40 +0200 |
commit | 62ae7adab2bebde04864c12543caefbffab24963 (patch) | |
tree | 1cad2b08c94c2de26a39124f3b3dd0d513cbcc99 /build/android/native/build.gradle | |
parent | 8ae8c1600a66c724565ce7a70e0e5f542f12e38e (diff) | |
download | hax-minetest-server-62ae7adab2bebde04864c12543caefbffab24963.tar.gz hax-minetest-server-62ae7adab2bebde04864c12543caefbffab24963.zip |
Android: add Android Studio support, completely redone java part (#9066)
Diffstat (limited to 'build/android/native/build.gradle')
-rw-r--r-- | build/android/native/build.gradle | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/build/android/native/build.gradle b/build/android/native/build.gradle new file mode 100644 index 000000000..f06e4e3f0 --- /dev/null +++ b/build/android/native/build.gradle @@ -0,0 +1,59 @@ +apply plugin: 'com.android.library' +import org.ajoberstar.grgit.Grgit + +android { + compileSdkVersion 29 + buildToolsVersion '29.0.3' + ndkVersion '21.0.6113669' + 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 |