-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
125 lines (102 loc) · 4.4 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
import org.apache.tools.ant.filters.ReplaceTokens
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
ext {
RELEASE_STORE_FILE = project.properties['RELEASE_STORE_FILE'] ?: "."
RELEASE_STORE_PASSWORD = project.properties['RELEASE_STORE_PASSWORD'] ?: ""
RELEASE_KEY_ALIAS = project.properties['RELEASE_KEY_ALIAS'] ?: ""
RELEASE_KEY_PASSWORD = project.properties['RELEASE_KEY_PASSWORD'] ?: ""
GOOGLE_SERVICES_API_KEY = project.properties['GOOGLE_SERVICES_API_KEY'] ?: ""
}
android {
compileSdkVersion 34
defaultConfig {
applicationId "org.commcare.dalvik.reminders"
minSdkVersion 21
targetSdkVersion 34
versionCode 2
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
signingConfigs {
release {
storeFile file(project.ext.RELEASE_STORE_FILE)
storePassword project.ext.RELEASE_STORE_PASSWORD
keyAlias project.ext.RELEASE_KEY_ALIAS
keyPassword project.ext.RELEASE_KEY_PASSWORD
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
resources {
excludes += ['META-INF/atomicfu.kotlin_module']
}
}
lint {
abortOnError false
}
namespace 'org.commcare.dalvik.reminders'
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'androidx.preference:preference:1.1.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'org.commcarehq.commcare:support-library:12.4'
implementation 'com.google.android.material:material:1.6.0'
// Room components
implementation "androidx.room:room-runtime:$rootProject.roomVersion"
kapt "androidx.room:room-compiler:$rootProject.roomVersion"
implementation "androidx.room:room-ktx:$rootProject.roomVersion"
androidTestImplementation "androidx.room:room-testing:$rootProject.roomVersion"
// Lifecycle components
// implementation "androidx.lifecycle:lifecycle-extensions:$rootProject.archLifecycleVersion"
kapt "androidx.lifecycle:lifecycle-compiler:$rootProject.archLifecycleVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$rootProject.archLifecycleVersion"
// Kotlin components
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$rootProject.coroutines"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$rootProject.coroutines"
// Material design
implementation "com.google.android.material:material:$rootProject.materialVersion"
// work manager
implementation "androidx.work:work-runtime:$rootProject.workManagerVersion"
implementation "androidx.work:work-runtime-ktx:$rootProject.workManagerVersion"
//firebase
implementation platform('com.google.firebase:firebase-bom:25.12.0')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-crashlytics'
// Testing
testImplementation 'junit:junit:4.13'
androidTestImplementation "androidx.arch.core:core-testing:$rootProject.coreTestingVersion"
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
afterEvaluate {
processDebugGoogleServices.dependsOn injectGoogleServicesAPIKey
processReleaseGoogleServices.dependsOn injectGoogleServicesAPIKey
}
task injectGoogleServicesAPIKey(type: Copy) {
description = 'Injects the Google Services API key into the google-services.json file at runtime'
from file("templates/google-services.json")
filter(ReplaceTokens, tokens: [apiKey: project.ext.GOOGLE_SERVICES_API_KEY])
into projectDir
}