81 lines
2.5 KiB
Groovy
81 lines
2.5 KiB
Groovy
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.android)
|
|
alias(libs.plugins.kotlin.compose)
|
|
}
|
|
|
|
ext {
|
|
preDexEnabled = System.getProperty("pre-dex", "true")
|
|
abiCodes = ['armeabi-v7a': 1, 'x86': 2, 'x86_64': 3, 'arm64-v8a': 4]
|
|
}
|
|
|
|
android {
|
|
namespace 'com.example.testapplication'
|
|
compileSdk 35
|
|
|
|
defaultConfig {
|
|
applicationId "com.example.testapplication"
|
|
minSdk 24
|
|
targetSdk 35
|
|
versionCode 11
|
|
versionName "0.0.11"
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
splits {
|
|
abi {
|
|
universalApk true
|
|
enable true
|
|
reset()
|
|
include project.ext.abiCodes.keySet() as String[]
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
targetCompatibility JavaVersion.VERSION_17
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = '17'
|
|
}
|
|
buildFeatures {
|
|
compose true
|
|
}
|
|
|
|
android.applicationVariants.configureEach { variant ->
|
|
variant.outputs.each { output ->
|
|
def baseAbiVersionCode = project.ext.abiCodes.get(output.getFilter(com.android.build.OutputFile.ABI))
|
|
if (baseAbiVersionCode != null) {
|
|
output.versionCodeOverride = (100 * project.android.defaultConfig.versionCode) + baseAbiVersionCode
|
|
} else {
|
|
//output.versionCodeOverride = (100 * project.android.defaultConfig.versionCode) + grgit.log(includes: ["HEAD"], excludes: [tags.last()]).size()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
|
|
implementation libs.androidx.core.ktx
|
|
implementation libs.androidx.lifecycle.runtime.ktx
|
|
implementation libs.androidx.activity.compose
|
|
implementation platform(libs.androidx.compose.bom)
|
|
implementation libs.androidx.ui
|
|
implementation libs.androidx.ui.graphics
|
|
implementation libs.androidx.ui.tooling.preview
|
|
implementation libs.androidx.material3
|
|
testImplementation libs.junit
|
|
androidTestImplementation libs.androidx.junit
|
|
androidTestImplementation libs.androidx.espresso.core
|
|
androidTestImplementation platform(libs.androidx.compose.bom)
|
|
androidTestImplementation libs.androidx.ui.test.junit4
|
|
debugImplementation libs.androidx.ui.tooling
|
|
debugImplementation libs.androidx.ui.test.manifest
|
|
}
|