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 {
|
2022-08-17 09:09:53 +00:00
|
|
|
minSdkVersion 19
|
|
|
|
targetSdkVersion 30
|
2020-06-25 04:14:31 +00:00
|
|
|
|
|
|
|
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'
|
|
|
|
}
|
|
|
|
}
|
2022-11-01 09:51:10 +00:00
|
|
|
namespace 'io.nekohasekai.ssr_libev'
|
2020-06-25 04:14:31 +00:00
|
|
|
|
|
|
|
}
|