112 lines
3.7 KiB
Groovy
112 lines
3.7 KiB
Groovy
plugins {
|
|
id 'com.android.application' version '9.2.1'
|
|
id 'org.jetbrains.kotlin.plugin.serialization' version '2.3.21'
|
|
id 'org.jetbrains.kotlin.plugin.compose' version '2.3.21'
|
|
}
|
|
|
|
android {
|
|
namespace = 'net.helcel.cowspent'
|
|
compileSdk = 37
|
|
|
|
defaultConfig {
|
|
buildConfigField("String", "APP_NAME", "\"Cowspent\"")
|
|
manifestPlaceholders["APP_NAME"] = "Cowspent"
|
|
applicationId "net.helcel.cowspent"
|
|
minSdk = 26
|
|
targetSdk = 37
|
|
versionName "1.0"
|
|
versionCode project.hasProperty('VERSION_CODE') ? project.property('VERSION_CODE').toInteger() : 1
|
|
}
|
|
|
|
signingConfigs {
|
|
register("release") {
|
|
try {
|
|
def keystorePropertiesFile = rootProject.file("app/keystore.properties")
|
|
def keystoreProperties = new Properties()
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
|
|
|
keyAlias keystoreProperties['keyAlias']
|
|
keyPassword keystoreProperties['keyPassword']
|
|
storeFile file(keystoreProperties['storeFile'])
|
|
storePassword keystoreProperties['storePassword']
|
|
} catch (FileNotFoundException e) {
|
|
println("File not found: ${e.message}")
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
debuggable true
|
|
initWith(buildTypes.release)
|
|
signingConfig = signingConfigs.debug
|
|
}
|
|
release {
|
|
minifyEnabled true
|
|
shrinkResources = true
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
signedRelease {
|
|
minifyEnabled true
|
|
shrinkResources = true
|
|
initWith(buildTypes.release)
|
|
matchingFallbacks = ['release']
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
signingConfig = signingConfigs.getByName("release")
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
coreLibraryDesugaringEnabled = true
|
|
sourceCompatibility JavaVersion.VERSION_21
|
|
targetCompatibility JavaVersion.VERSION_21
|
|
encoding = 'utf-8'
|
|
}
|
|
|
|
buildFeatures {
|
|
viewBinding = true
|
|
buildConfig = true
|
|
compose = true
|
|
}
|
|
|
|
kotlin {
|
|
jvmToolchain(21)
|
|
}
|
|
|
|
lint {
|
|
abortOnError = false
|
|
disable 'MissingTranslation'
|
|
disable 'UsingMaterialAndMaterial3Libraries'
|
|
}
|
|
|
|
androidResources {
|
|
generateLocaleConfig = true
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'androidx.compose.foundation:foundation:1.11.2'
|
|
implementation 'androidx.compose.runtime:runtime:1.11.2'
|
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
|
|
|
|
implementation 'androidx.preference:preference-ktx:1.2.1'
|
|
implementation 'androidx.work:work-runtime-ktx:2.11.2'
|
|
|
|
implementation 'com.google.zxing:core:3.5.4'
|
|
implementation 'androidx.camera:camera-camera2:1.6.1'
|
|
implementation 'androidx.camera:camera-lifecycle:1.6.1'
|
|
implementation 'androidx.camera:camera-view:1.6.1'
|
|
implementation 'com.github.nextcloud:Android-SingleSignOn:1.1.0'
|
|
implementation 'com.opencsv:opencsv:5.12.0'
|
|
|
|
implementation platform('androidx.compose:compose-bom:2026.05.01')
|
|
implementation 'androidx.compose.ui:ui'
|
|
implementation 'androidx.compose.material:material'
|
|
implementation 'androidx.compose.material:material-icons-extended'
|
|
implementation 'androidx.compose.ui:ui-tooling-preview'
|
|
debugImplementation 'androidx.compose.ui:ui-tooling'
|
|
implementation 'androidx.activity:activity-compose:1.13.0'
|
|
implementation 'androidx.activity:activity-ktx:1.13.0'
|
|
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.10.0'
|
|
}
|