1
0
mirror of https://github.com/NekoX-Dev/NekoX.git synced 2024-12-13 15:59:34 +01:00
NekoX/ssr-libev/build.gradle

56 lines
1.5 KiB
Groovy
Raw Normal View History

2020-06-25 06:14:31 +02:00
plugins {
id 'com.android.library'
}
2021-02-28 14:01:58 +01: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 06:14:31 +02:00
android {
2020-07-27 06:49:42 +02:00
compileSdkVersion 30
2021-02-17 07:28:33 +01:00
buildToolsVersion '30.0.3'
2021-02-18 03:32:07 +01:00
ndkVersion rootProject.ext.ndkVersion
2020-06-25 06:14:31 +02:00
defaultConfig {
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName "1.0"
externalNativeBuild {
ndkBuild {
2021-02-28 14:01:58 +01: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 06:14:31 +02:00
2021-03-16 14:10:33 +01:00
arguments "NDK_APPLICATION_MK:=src/main/jni/Application.mk", "APP_PLATFORM:=android-21", "--jobs=${Runtime.getRuntime().availableProcessors()}"
2020-06-25 06:14:31 +02:00
}
}
}
externalNativeBuild {
ndkBuild {
path 'src/main/jni/Android.mk'
}
}
}