58 lines
2.0 KiB
Groovy
58 lines
2.0 KiB
Groovy
apply plugin: 'com.android.application'
|
||
apply plugin: 'kotlin-android'
|
||
|
||
android {
|
||
namespace "com.echo.app"
|
||
compileSdkVersion rootProject.ext.compileSdkVersion
|
||
defaultConfig {
|
||
applicationId "com.echo.app"
|
||
minSdkVersion rootProject.ext.minSdkVersion
|
||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||
versionCode 202
|
||
versionName "0.2.2"
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||
aaptOptions {
|
||
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
||
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
|
||
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
|
||
}
|
||
}
|
||
|
||
// 显式统一 Java / Kotlin 的编译目标版本,保持与 Capacitor 生成配置一致(Java 21)
|
||
compileOptions {
|
||
sourceCompatibility JavaVersion.VERSION_21
|
||
targetCompatibility JavaVersion.VERSION_21
|
||
}
|
||
|
||
kotlinOptions {
|
||
jvmTarget = '21'
|
||
}
|
||
|
||
buildTypes {
|
||
release {
|
||
minifyEnabled false
|
||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||
}
|
||
}
|
||
}
|
||
|
||
repositories {
|
||
flatDir{
|
||
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
|
||
}
|
||
}
|
||
|
||
dependencies {
|
||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
||
implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
|
||
implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
|
||
implementation "androidx.activity:activity-ktx:$androidxActivityVersion"
|
||
implementation project(':capacitor-android')
|
||
implementation project(':capacitor-cordova-android-plugins')
|
||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||
}
|
||
|
||
apply from: 'capacitor.build.gradle'
|
||
|