1
0

76 lines
1.4 KiB
Groovy
Raw Normal View History

apply plugin: 'com.android.library'
2020-09-04 20:04:28 +02:00
apply plugin: 'de.undercouch.download'
android {
2022-08-06 23:03:24 +02:00
compileSdkVersion 33
2022-07-03 21:32:55 +03:00
buildToolsVersion '33.0.0'
ndkVersion '25.1.8937393'
defaultConfig {
minSdkVersion 21
2022-08-06 23:03:24 +02:00
targetSdkVersion 33
externalNativeBuild {
ndkBuild {
2020-09-04 20:04:28 +02:00
arguments '-j' + Runtime.getRuntime().availableProcessors(),
"--output-sync=none",
"versionMajor=${versionMajor}",
"versionMinor=${versionMinor}",
"versionPatch=${versionPatch}",
"versionExtra=${versionExtra}",
"developmentBuild=${developmentBuild}"
}
}
}
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'
}
}
}
}
}
2020-09-04 20:04:28 +02:00
// get precompiled deps
task downloadDeps(type: Download) {
src 'https://github.com/MultiCraft/deps/archive/master.zip'
dest new File(buildDir, 'deps.zip')
overwrite false
}
task getDeps(dependsOn: downloadDeps, type: Copy) {
def deps = file('deps')
def f = file("$buildDir/deps-master")
if (!f.exists()) {
from zipTree(downloadDeps.dest)
into buildDir
}
doLast {
file(f).renameTo(file(deps))
}
}
preBuild.dependsOn getDeps
2022-05-16 16:31:30 +03:00
android.defaultConfig.externalNativeBuild.ndkBuild {
arguments 'prebuilt=$(if $(strip $(wildcard $(prebuilt_path))),$(prebuilt_path),.)'
}