NumberHub/app/build.gradle
2022-05-03 18:52:39 +03:00

168 lines
5.8 KiB
Groovy

plugins {
// Basic stuff
id 'com.android.application'
id 'kotlin-android'
// Hilt
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
// Google Services
id 'com.google.gms.google-services'
// Firebase Crashlytics
id 'com.google.firebase.crashlytics'
}
kapt {
correctErrorTypes = true
useBuildCache = true
}
android {
compileSdkVersion 32
defaultConfig {
applicationId "com.sadellie.unitto"
minSdkVersion 21
targetSdkVersion 32
versionCode 5
versionName "Antique bronze"
}
buildTypes {
debug {
// We don't need analytics for debug builds
resValue("bool", "FIREBASE_ANALYTICS_DEACTIVATED", "true")
resValue("bool", "FIREBASE_CRASHLYTICS_ENABLED", "false")
buildConfigField ("String", "StoreLink", "\"http://play.google.com/store/apps/details?id=com.sadellie.unitto\"")
}
debugAppGallery {
// We don't need analytics for debug builds
resValue("bool", "FIREBASE_ANALYTICS_DEACTIVATED", "true")
resValue("bool", "FIREBASE_CRASHLYTICS_ENABLED", "false")
buildConfigField ("String", "StoreLink", "\"https://appgallery.huawei.com/app/C105740875\"")
debuggable true
signingConfig signingConfigs.debug
}
debugRuPlayMarket {
// We don't need analytics for debug builds
resValue("bool", "FIREBASE_ANALYTICS_DEACTIVATED", "true")
resValue("bool", "FIREBASE_CRASHLYTICS_ENABLED", "false")
buildConfigField ("String", "StoreLink", "null")
debuggable true
signingConfig signingConfigs.debug
}
releaseNoAnal {
// Same as release
// Used for on device testing. Same performance, but no analytics
resValue("bool", "FIREBASE_ANALYTICS_DEACTIVATED", "true")
resValue("bool", "FIREBASE_CRASHLYTICS_ENABLED", "false")
buildConfigField ("String", "StoreLink", "\"http://play.google.com/store/apps/details?id=com.sadellie.unitto\"")
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
releasePlayStore {
resValue("bool", "FIREBASE_ANALYTICS_DEACTIVATED", "false")
resValue("bool", "FIREBASE_CRASHLYTICS_ENABLED", "true")
buildConfigField ("String", "StoreLink", "\"http://play.google.com/store/apps/details?id=com.sadellie.unitto\"")
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
releaseAppGallery {
resValue("bool", "FIREBASE_ANALYTICS_DEACTIVATED", "false")
resValue("bool", "FIREBASE_CRASHLYTICS_ENABLED", "true")
buildConfigField ("String", "StoreLink", "\"https://appgallery.huawei.com/app/C105740875\"")
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
releaseRuPlayMarket {
resValue("bool", "FIREBASE_ANALYTICS_DEACTIVATED", "false")
resValue("bool", "FIREBASE_CRASHLYTICS_ENABLED", "true")
buildConfigField ("String", "StoreLink", "null")
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
compose true
// These are unused features
aidl false
renderScript false
shaders false
}
composeOptions {
kotlinCompilerExtensionVersion compose_version
}
packagingOptions {
jniLibs {
excludes += ['META-INF/licenses/**']
}
resources {
excludes += ['META-INF/licenses/**', 'META-INF/AL2.0', 'META-INF/LGPL2.1']
}
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.7.0'
// Compose and navigation
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
implementation 'androidx.navigation:navigation-compose:2.5.0-beta01'
// Material Design 3
implementation "androidx.compose.material3:material3:1.0.0-alpha10"
// Hilt and navigation
implementation 'androidx.hilt:hilt-navigation-compose:1.0.0'
kapt 'com.google.dagger:dagger-android-processor:2.41'
implementation 'com.google.dagger:hilt-android:2.41'
kapt 'com.google.dagger:hilt-compiler:2.41'
// There are a lot of icons
implementation "androidx.compose.material:material-icons-extended:$compose_version"
// DataStore
implementation "androidx.datastore:datastore-preferences:1.0.0"
// This is for system status bar color
implementation "com.google.accompanist:accompanist-systemuicontroller:0.17.0"
// Firebase
implementation platform('com.google.firebase:firebase-bom:29.0.4')
implementation 'com.google.firebase:firebase-analytics-ktx'
// Crashlytics and Analytics
implementation 'com.google.firebase:firebase-crashlytics-ktx'
implementation 'com.google.firebase:firebase-analytics-ktx'
// Room
implementation "androidx.room:room-runtime:2.4.2"
implementation "androidx.room:room-ktx:2.4.2"
kapt "androidx.room:room-compiler:2.4.2"
// Moshi
implementation 'com.squareup.moshi:moshi-kotlin:1.13.0'
// Retrofit with Moshi Converter
implementation 'com.squareup.retrofit2:converter-moshi:2.9.0'
}