/
build.gradle
204 lines (191 loc) · 8.82 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.mikepenz.aboutlibraries.plugin'
apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'com.google.firebase.crashlytics'
def secretsPropertiesFile = rootProject.file("secrets.properties")
def secretProperties = new Properties()
if (secretsPropertiesFile.exists())
secretProperties.load(new FileInputStream(secretsPropertiesFile))
else {
secretProperties.setProperty("google_project_id", "\"${System.getenv('google_project_id') ?: "null"}\"")
secretProperties.setProperty("signing_keystore_password", "${System.getenv('signing_keystore_password')}")
secretProperties.setProperty("signing_key_password", "${System.getenv('signing_key_password')}")
secretProperties.setProperty("signing_key_alias", "${System.getenv('signing_key_alias')}")
}
/*
* Gets the version name from the latest Git tag
*/
def gitCommitHash = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-parse', 'HEAD'
standardOutput = stdout
}
return stdout.toString().substring(0, 8).trim()
}
android {
buildFeatures.viewBinding = true
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.javinator9889.handwashingreminder"
minSdkVersion 17
targetSdkVersion 29
versionCode 131
versionName "1.2.0-${gitCommitHash}"
multiDexEnabled true
resConfigs "en", "es"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
release {
storeFile file("../android-signing-keystore.jks")
storePassword "${secretProperties['signing_keystore_password']}"
keyAlias "${secretProperties['signing_key_alias']}"
keyPassword "${secretProperties['signing_key_password']}"
}
}
buildTypes {
debug {
ext.enableCrashliytics = false
versionNameSuffix "-debug"
debuggable true
multiDexEnabled = true
}
beta {
initWith(debug)
versionNameSuffix "-beta"
minifyEnabled true
debuggable true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
multiDexEnabled = true
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
multiDexEnabled = true
signingConfig signingConfigs.release
versionNameSuffix "-stable"
debuggable false
jniDebuggable false
renderscriptDebuggable false
zipAlignEnabled true
}
}
dexOptions {
preDexLibraries true
javaMaxHeapSize "1G"
}
dynamicFeatures = [":appintro", ":ads", ":bundledemoji"]
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
dependencies {
def room_version = "2.2.5"
implementation fileTree(dir: 'libs', include: ['*.jar'])
api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
api 'androidx.appcompat:appcompat:1.1.0'
api 'androidx.core:core-ktx:1.3.0'
api 'androidx.legacy:legacy-support-v4:1.0.0'
api 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
// https://github.com/Javinator9889/LocaleManager
api 'com.github.javinator9889:localemanager:1.1X'
// https://material.io/develop/android/docs/getting-started/
api 'com.google.android.material:material:1.1.0'
// https://developers.google.com/android/guides/setup
implementation 'com.google.android.gms:play-services-location:17.0.0'
// https://developer.android.com/jetpack/androidx/releases/annotation
api 'androidx.annotation:annotation:1.1.0'
// https://developer.android.com/jetpack/androidx/releases/cardview
api 'androidx.cardview:cardview:1.0.0'
// https://developer.android.com/jetpack/androidx/releases/recyclerview
api 'androidx.recyclerview:recyclerview:1.1.0'
// https://developer.android.com/studio/build/multidex
api 'androidx.multidex:multidex:2.0.1'
// https://github.com/mikepenz/Android-Iconics
api 'com.mikepenz:iconics-core:5.0.3'
api 'com.mikepenz:iconics-views:5.0.3'
//noinspection GradleDependency
api 'com.mikepenz:google-material-typeface:3.0.1.4.original-kotlin@aar'
api 'com.mikepenz:ionicons-typeface:2.0.1.5-kotlin@aar'
// https://github.com/mikepenz/AboutLibraries
implementation "com.mikepenz:aboutlibraries-core:$latestAboutLibsRelease"
implementation "com.mikepenz:aboutlibraries:$latestAboutLibsRelease"
// https://developer.android.com/kotlin/ktx#play-core
api 'com.google.android.play:core:1.7.3'
api 'com.google.android.play:core-ktx:1.7.0'
// https://developer.android.com/kotlin/ktx#collection
implementation 'androidx.collection:collection-ktx:1.1.0'
// https://kotlinlang.org/docs/reference/reflection.html
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
// https://firebase.google.com/docs/android/setup#add-sdks
api 'com.google.firebase:firebase-common-ktx:19.3.0'
api 'com.google.firebase:firebase-analytics:17.4.3'
api 'com.google.firebase:firebase-crashlytics:17.1.0'
api 'com.google.firebase:firebase-perf:19.0.7'
implementation 'com.google.firebase:firebase-auth:19.3.1'
// http://airbnb.io/lottie/#/android?id=getting-started
api "com.airbnb.android:lottie:3.4.1"
// https://firebase.google.com/docs/remote-config/use-config-android
implementation 'com.google.firebase:firebase-config:19.1.4'
implementation 'com.google.firebase:firebase-config-ktx:19.1.4'
// https://mvnrepository.com/artifact/androidx.emoji/emoji/1.0.0
api 'androidx.emoji:emoji:1.0.0'
api 'androidx.emoji:emoji-appcompat:1.0.0'
// https://github.com/mikepenz/FastAdapter
api "com.mikepenz:fastadapter:$latestFastAdapterRelease"
implementation "com.mikepenz:fastadapter-extensions-scroll:$latestFastAdapterRelease"
implementation "com.mikepenz:fastadapter-extensions-ui:$latestFastAdapterRelease"
// https://developer.android.com/kotlin/ktx#lifecycle
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.2.0'
// https://developer.android.com/kotlin/ktx#viewmodel
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
// https://developer.android.com/kotlin/ktx#fragment
implementation 'androidx.fragment:fragment-ktx:1.2.5'
// https://developer.android.com/kotlin/ktx#livedata
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0'
// https://github.com/JakeWharton/timber
api 'com.jakewharton.timber:timber:4.7.1'
// https://developer.android.com/jetpack/androidx/releases/lifecycle#declaring_dependencies
implementation 'androidx.lifecycle:lifecycle-viewmodel-savedstate:2.2.0'
// https://developer.android.com/reference/kotlin/androidx/preference/package-summary
api 'androidx.preference:preference-ktx:1.1.1'
// https://github.com/bumptech/glide
api 'com.github.bumptech.glide:glide:4.11.0'
api 'com.github.bumptech.glide:okhttp3-integration:4.11.0'
kapt 'com.github.bumptech.glide:compiler:4.11.0'
// https://github.com/afollestad/material-dialogs/
implementation 'com.afollestad.material-dialogs:core:3.3.0'
// https://developer.android.com/google/play/billing/billing_library_overview
implementation 'com.android.billingclient:billing:3.0.0'
implementation 'com.android.billingclient:billing-ktx:3.0.0'
// https://github.com/cbeust/klaxon
implementation 'com.beust:klaxon:5.2'
// https://github.com/SufficientlySecure/html-textview
implementation 'org.sufficientlysecure:html-textview:3.9'
// https://github.com/square/okhttp/tree/okhttp_3.12.x
implementation 'com.squareup.okhttp3:okhttp:3.12.1'
// https://square.github.io/okio/#releases
implementation 'com.squareup.okio:okio:2.5.0'
// https://github.com/deano2390/MaterialShowcaseView
implementation 'com.github.deano2390:MaterialShowcaseView:1.3.4'
// https://github.com/PhilJay/MPAndroidChart
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
// https://developer.android.com/training/data-storage/room
implementation "androidx.room:room-ktx:$room_version"
kapt "androidx.room:room-compiler:$room_version"
}
apply plugin: 'com.google.gms.google-services'