145 lines
5.2 KiB
Groovy
145 lines
5.2 KiB
Groovy
plugins {
|
|
id 'com.android.application'
|
|
id 'org.jetbrains.kotlin.android'
|
|
id 'dagger.hilt.android.plugin'
|
|
id 'com.google.devtools.ksp'
|
|
id "com.mikepenz.aboutlibraries.plugin" version "11.1.3"
|
|
}
|
|
|
|
apply plugin: 'com.mikepenz.aboutlibraries.plugin'
|
|
|
|
android {
|
|
namespace 'com.starry.greenstash'
|
|
compileSdk 34
|
|
|
|
defaultConfig {
|
|
applicationId "com.starry.greenstash"
|
|
minSdk 24
|
|
targetSdk 34
|
|
versionCode 360
|
|
versionName "3.6.0"
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
vectorDrawables {
|
|
useSupportLibrary true
|
|
}
|
|
|
|
ksp {
|
|
arg('room.schemaLocation', "$projectDir/schemas")
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled true
|
|
shrinkResources true
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
// Rename the output apk file automatically.
|
|
applicationVariants.all { variant ->
|
|
variant.outputs.each { output ->
|
|
def name = "GreenStash-v${variant.versionName}.apk"
|
|
output.outputFileName = name
|
|
}
|
|
}
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
targetCompatibility JavaVersion.VERSION_17
|
|
coreLibraryDesugaringEnabled true
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = '17'
|
|
freeCompilerArgs = []
|
|
}
|
|
buildFeatures {
|
|
compose true
|
|
buildConfig = true
|
|
|
|
}
|
|
composeOptions {
|
|
kotlinCompilerExtensionVersion '1.5.12'
|
|
}
|
|
packagingOptions {
|
|
resources {
|
|
excludes += '/META-INF/{AL2.0,LGPL2.1}'
|
|
}
|
|
}
|
|
androidResources {
|
|
generateLocaleConfig true
|
|
}
|
|
}
|
|
|
|
aboutLibraries {
|
|
// Remove the "generated" timestamp to allow for reproducible builds
|
|
excludeFields = ["generated"]
|
|
}
|
|
|
|
|
|
dependencies {
|
|
|
|
def composeBom = platform('androidx.compose:compose-bom:2024.05.00')
|
|
implementation composeBom
|
|
androidTestImplementation composeBom
|
|
|
|
// Android core components.
|
|
implementation 'androidx.core:core-ktx:1.13.1'
|
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
|
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.7.0'
|
|
implementation 'androidx.activity:activity-compose:1.9.0'
|
|
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.7.0"
|
|
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0"
|
|
implementation "androidx.navigation:navigation-compose:2.7.7"
|
|
// Jetpack compose.
|
|
implementation "androidx.compose.ui:ui"
|
|
implementation "androidx.compose.ui:ui-tooling-preview"
|
|
implementation "androidx.compose.material:material"
|
|
implementation "androidx.compose.animation:animation"
|
|
implementation "androidx.compose.runtime:runtime-livedata"
|
|
implementation "androidx.compose.material3:material3"
|
|
// Material theme for main activity.
|
|
implementation 'com.google.android.material:material:1.12.0'
|
|
// Android 12+ splash API.
|
|
implementation 'androidx.core:core-splashscreen:1.0.1'
|
|
// Material icons.
|
|
implementation 'androidx.compose.material:material-icons-extended:1.6.6'
|
|
// Room database
|
|
implementation "androidx.room:room-ktx:$room_version"
|
|
ksp "androidx.room:room-compiler:$room_version"
|
|
androidTestImplementation "androidx.room:room-testing:$room_version"
|
|
// Dagger - Hilt.
|
|
implementation "com.google.dagger:hilt-android:$hilt_version"
|
|
implementation "androidx.hilt:hilt-navigation-compose:1.2.0"
|
|
ksp "com.google.dagger:hilt-android-compiler:$hilt_version"
|
|
ksp "androidx.hilt:hilt-compiler:1.2.0"
|
|
// DataStore Preferences.
|
|
implementation("androidx.datastore:datastore-preferences:1.1.1")
|
|
// Gson JSON parser.
|
|
implementation 'com.google.code.gson:gson:2.10.1'
|
|
// Coil Image loading library.
|
|
implementation "io.coil-kt:coil-compose:2.4.0"
|
|
// Material 3 calender / Date picker.
|
|
implementation 'com.maxkeppeler.sheets-compose-dialogs:core:1.3.0'
|
|
implementation 'com.maxkeppeler.sheets-compose-dialogs:calendar:1.3.0'
|
|
implementation 'com.maxkeppeler.sheets-compose-dialogs:date-time:1.3.0'
|
|
// Tap-target compose.
|
|
implementation "com.pierfrancescosoffritti.taptargetcompose:core:1.1.1"
|
|
// Lottie animations.
|
|
implementation "com.airbnb.android:lottie-compose:6.4.0"
|
|
// Bio-metric authentication.
|
|
implementation "androidx.biometric:biometric:1.1.0"
|
|
// Open Source Libraries Screen.
|
|
implementation "com.mikepenz:aboutlibraries-core:11.1.3"
|
|
implementation "com.mikepenz:aboutlibraries-compose:11.1.3"
|
|
// Crash Handler.
|
|
implementation 'cat.ereza:customactivityoncrash:2.4.0'
|
|
// Oreo back-ports for API 24 (N)
|
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
|
|
// Testing components.
|
|
testImplementation 'junit:junit:4.13.2'
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
|
androidTestImplementation "androidx.compose.ui:ui-test-junit4"
|
|
debugImplementation "androidx.compose.ui:ui-tooling"
|
|
debugImplementation "androidx.compose.ui:ui-test-manifest"
|
|
} |