Nagram/ssr-libev/build.gradle

56 lines
1.5 KiB
Groovy
Raw Normal View History

2020-06-25 04:14:31 +00:00
plugins {
id 'com.android.library'
}
2021-02-28 13:01:58 +00:00
def targetAbi = ""
if (!gradle.startParameter.taskNames.isEmpty()) {
if (gradle.startParameter.taskNames.size == 1) {
def targetTask = gradle.startParameter.taskNames[0].toLowerCase()
if (targetTask.contains("arm64")) {
targetAbi = "arm64"
} else if (targetTask.contains("arm")) {
targetAbi = "arm"
}
} else {
targetAbi = "~"
}
}
2020-06-25 04:14:31 +00:00
android {
2020-07-27 04:49:42 +00:00
compileSdkVersion 30
2021-02-17 06:28:33 +00:00
buildToolsVersion '30.0.3'
2021-02-18 02:32:07 +00:00
ndkVersion rootProject.ext.ndkVersion
2020-06-25 04:14:31 +00:00
defaultConfig {
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName "1.0"
externalNativeBuild {
ndkBuild {
2021-02-28 13:01:58 +00:00
if (!targetAbi.isBlank()) {
if (targetAbi == "arm64") {
abiFilters 'arm64-v8a'
} else if (targetAbi == "arm") {
abiFilters 'armeabi-v7a'
} else {
abiFilters 'armeabi-v7a', 'arm64-v8a'
}
} else {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
2020-06-25 04:14:31 +00:00
2021-03-16 13:10:33 +00:00
arguments "NDK_APPLICATION_MK:=src/main/jni/Application.mk", "APP_PLATFORM:=android-21", "--jobs=${Runtime.getRuntime().availableProcessors()}"
2020-06-25 04:14:31 +00:00
}
}
}
externalNativeBuild {
ndkBuild {
path 'src/main/jni/Android.mk'
}
}
}