mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Android: add Android Studio support, completely redone java part (#9066)
This commit is contained in:
parent
8ae8c1600a
commit
62ae7adab2
50 changed files with 1129 additions and 2520 deletions
59
build/android/native/build.gradle
Normal file
59
build/android/native/build.gradle
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue