1
0
mirror of https://github.com/dzeiocom/OpenHealth.git synced 2025-04-23 19:32:11 +00:00
OpenHealth/app/build.gradle

161 lines
4.6 KiB
Groovy

plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
// Safe Navigation
id 'androidx.navigation.safeargs'
}
android {
signingConfigs {
release {
def keystorePropertiesFile = rootProject.file("./keystore.properties")
def keystoreProperties = new Properties()
try {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
} catch (FileNotFoundException ignored) {
keystoreProperties = null
}
if (keystoreProperties != null) {
storePassword keystoreProperties["storePassword"]
keyPassword keystoreProperties["keyPassword"]
keyAlias keystoreProperties["keyAlias"]
storeFile file(keystoreProperties["storeFile"])
}
}
}
compileSdk 33
defaultConfig {
// App ID
applicationId "com.dzeio.openhealth"
// Android 5 Lollipop
minSdk 21
// Android 12
targetSdk 33
// Semantic Versioning
versionName "1.0.0"
versionCode 1
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// Languages
def locales = ["en", "fr"]
buildConfigField "String[]", "LOCALES", "new String[]{\""+locales.join("\",\"")+"\"}"
resConfigs locales
}
buildTypes {
release {
// Slimmer version
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
debug {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
applicationIdSuffix ".dev"
versionNameSuffix '-dev'
debuggable true
// make it debuggable
renderscriptDebuggable true
// Optimization Level
renderscriptOptimLevel 0
}
}
// Compile using JAVA 8
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
// Enable View Binding and Data Binding
buildFeatures {
viewBinding true
dataBinding true
}
}
dependencies {
// Core dependencies
implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'javax.inject:javax.inject:1'
implementation 'com.google.android.material:material:1.7.0-alpha03'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.0'
// Coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.3"
// Settings
implementation "androidx.preference:preference-ktx:1.2.0"
// DataStore
implementation "androidx.datastore:datastore:1.0.0"
// Navigation
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.0'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.0'
// Paging
implementation "androidx.paging:paging-runtime:3.1.1"
implementation "androidx.paging:paging-runtime-ktx:3.1.1"
// Services
implementation 'androidx.work:work-runtime-ktx:2.7.1'
// Tests
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
// Graph
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
// Hilt
implementation 'com.google.dagger:hilt-android:2.42'
kapt 'com.google.dagger:hilt-compiler:2.42'
// Google Fit
implementation "com.google.android.gms:play-services-fitness:21.1.0"
implementation "com.google.android.gms:play-services-auth:20.2.0"
// Samsung Health
implementation files('libs/samsung-health-data-1.5.0.aar')
implementation 'com.google.code.gson:gson:2.9.0'
// ROOM
implementation "androidx.room:room-runtime:2.4.2"
kapt "androidx.room:room-compiler:2.4.2"
implementation "androidx.room:room-ktx:2.4.2"
testImplementation "androidx.room:room-testing:2.4.2"
// Futures
implementation 'com.google.guava:guava:31.1-jre'
implementation "androidx.concurrent:concurrent-futures:1.1.0"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-guava:1.6.3'
}