77 lines
1.9 KiB
Groovy
77 lines
1.9 KiB
Groovy
plugins {
|
||
id 'com.android.application'
|
||
id 'org.jetbrains.kotlin.android'
|
||
}
|
||
|
||
// 模拟器调试时传 -PincludeEmulatorAbis=true;build_apk.sh 发布时强制传 false
|
||
def INCLUDE_EMULATOR_ABIS = project.findProperty('includeEmulatorAbis')?.toBoolean() ?: false
|
||
|
||
android {
|
||
namespace 'com.yama.client'
|
||
compileSdk 35
|
||
ndkVersion "30.0.14904198"
|
||
|
||
defaultConfig {
|
||
applicationId "com.yama.client"
|
||
minSdk 21
|
||
targetSdk 35
|
||
versionCode 1
|
||
versionName "1.0"
|
||
|
||
ndk {
|
||
if (INCLUDE_EMULATOR_ABIS) {
|
||
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86', 'x86_64'
|
||
} else {
|
||
abiFilters 'arm64-v8a', 'armeabi-v7a'
|
||
}
|
||
}
|
||
|
||
externalNativeBuild {
|
||
cmake {
|
||
cppFlags '-std=c++17'
|
||
arguments '-DANDROID_STL=c++_static'
|
||
}
|
||
}
|
||
}
|
||
|
||
externalNativeBuild {
|
||
cmake {
|
||
path "src/main/cpp/CMakeLists.txt"
|
||
version "3.22.1"
|
||
}
|
||
}
|
||
|
||
signingConfigs {
|
||
release {
|
||
storeFile file("../yama-release.jks")
|
||
storePassword System.getenv("YAMA_PWD") ?: ""
|
||
keyAlias 'yama'
|
||
keyPassword System.getenv("YAMA_PWD") ?: ""
|
||
}
|
||
}
|
||
|
||
buildTypes {
|
||
release {
|
||
minifyEnabled true
|
||
shrinkResources true
|
||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
|
||
'proguard-rules.pro'
|
||
signingConfig signingConfigs.release
|
||
}
|
||
}
|
||
|
||
compileOptions {
|
||
sourceCompatibility JavaVersion.VERSION_17
|
||
targetCompatibility JavaVersion.VERSION_17
|
||
}
|
||
|
||
kotlinOptions {
|
||
jvmTarget = '17'
|
||
}
|
||
}
|
||
|
||
dependencies {
|
||
implementation 'androidx.core:core-ktx:1.13.1'
|
||
implementation 'androidx.appcompat:appcompat:1.7.0'
|
||
}
|