-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
197 lines (165 loc) · 6.62 KB
/
build.gradle.kts
File metadata and controls
197 lines (165 loc) · 6.62 KB
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
plugins {
com.android.application
kotlin("plugin.serialization")
alias(libs.plugins.firebase.crashlytics)
alias(libs.plugins.firebase.perf)
alias(libs.plugins.googleServices)
id("com.mikepenz.aboutlibraries.plugin.android")
com.google.devtools.ksp
com.google.dagger.hilt.android
com.edricchan.studybuddy.library.common
com.edricchan.studybuddy.common.`android-compose`
com.edricchan.studybuddy.application
}
kotlin {
jvmToolchain(17)
}
android {
namespace = "com.edricchan.studybuddy"
defaultConfig {
applicationId = "com.edricchan.studybuddy"
targetSdk = 34
versionCode = 10
versionName = "1.1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
androidResources.localeFilters += "en" // TODO: Don't restrict to just en
vectorDrawables.useSupportLibrary = true
}
buildTypes {
val debug by existing {
isDebuggable = true // Allow app to be debuggable
applicationIdSuffix = ".debug"
// Reduce amount of time needed to compile app in debug mode
// Can be accessed with BuildConfig.BUILD_TIME
buildConfigField("Long", "BUILD_TIME", "0L")
}
val release by existing {
isMinifyEnabled = true // Enable minification
isShrinkResources = true // Shrink resources to reduce APK size
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
// Can be accessed with BuildConfig.BUILD_TIME
buildConfigField("long", "BUILD_TIME", "${System.currentTimeMillis()}L")
}
val nightly by registering {
// Nightly releases
initWith(release.get())
applicationIdSuffix = ".nightly"
versionNameSuffix = studybuddyApp.metadata.buildInstant.map { "-NIGHTLY-$it" }.get()
matchingFallbacks += listOf(release.name, debug.name)
}
val benchmark by registering {
initWith(release.get())
applicationIdSuffix = ".benchmark"
matchingFallbacks += release.name
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-benchmark-rules.pro"
)
isDebuggable = false
}
}
buildFeatures {
viewBinding = true
buildConfig = true
}
compileOptions.isCoreLibraryDesugaringEnabled = true
testOptions {
unitTests.isIncludeAndroidResources = true
}
}
dependencies {
// Project dependencies
implementation(projects.ui.common)
implementation(projects.ui.insets)
implementation(projects.ui.theming.compose)
implementation(projects.ui.theming.views)
implementation(projects.ui.preference.compose)
implementation(projects.ui.widgets.compose)
implementation(projects.ui.widgets.views)
implementation(projects.ui.widgets.modalBottomSheet)
implementation(projects.core.auth.gms)
implementation(projects.core.compat.navigation)
implementation(projects.core.deeplink)
implementation(projects.core.resources)
implementation(projects.core.resources.icons)
implementation(projects.core.settings.tasks.model)
implementation(projects.core.settings.tasks.resources)
implementation(projects.core.settings.tracking)
implementation(projects.core.settings.updates.datastore)
implementation(projects.core.settings.updates.model)
implementation(projects.core.settings.updates.resources)
implementation(projects.data.common)
implementation(projects.data.serialization.android)
implementation(projects.utils.android)
implementation(projects.utils.androidx.compose)
implementation(projects.utils.androidx.core)
implementation(projects.utils.devMode)
implementation(projects.utils.network)
implementation(projects.utils.recyclerview)
implementation(projects.utils.web)
implementation(projects.exts.android)
implementation(projects.exts.androidx.fragment)
implementation(projects.exts.androidx.preference)
implementation(projects.exts.androidx.preferenceFiles)
implementation(projects.exts.androidx.viewBinding)
implementation(projects.exts.common)
implementation(projects.exts.datetime)
implementation(projects.exts.firebase.core)
implementation(projects.exts.firebase.temporal)
implementation(projects.exts.material)
implementation(projects.features.auth)
implementation(projects.features.help)
implementation(projects.features.settings)
implementation(projects.features.tasks)
// Test dependencies
androidTestImplementation(libs.bundles.androidx.test)
testImplementation(libs.junit)
coreLibraryDesugaring(libs.android.desugar.nio)
// AndroidX dependencies
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.browser)
implementation(libs.androidx.constraintlayout)
implementation(libs.materialComponents)
implementation(libs.androidx.navigation.fragment.ktx)
implementation(libs.androidx.navigation.ui.ktx)
implementation(libs.androidx.preference.ktx)
implementation(libs.androidx.recyclerview.core)
implementation(libs.androidx.recyclerview.selection)
implementation(libs.androidx.swiperefreshlayout)
implementation(libs.androidx.work.runtime.ktx)
// Compose dependencies
implementation(libs.androidx.lifecycle.viewmodel.compose)
// Firebase dependencies
implementation(platform(libs.firebase.bom))
implementation(libs.bundles.firebase)
// IO/Network dependencies
implementation(libs.coil)
implementation(libs.coil.network.ktor3)
implementation(libs.bundles.ktor)
implementation(libs.kotlinx.serialization.json)
// Other dependencies
implementation(libs.materialAbout)
implementation(libs.appUpdater)
implementation(libs.flowPreferences)
implementation(libs.migration)
// Dagger dependencies
implementation(libs.dagger.hilt.android)
ksp(libs.dagger.hilt.compiler)
// DeepLinkDispatch dependencies
implementation(libs.deepLinkDispatch.core)
ksp(libs.deepLinkDispatch.processor)
// Kotlin dependencies
implementation(libs.kotlinx.coroutines.android)
}
ksp {
// See https://github.com/airbnb/DeepLinkDispatch#incremental-annotation-processing for
// more info
// Add support for documenting deep links
// See https://github.com/airbnb/DeepLinkDispatch#generated-deep-links-documentation for
// more info
arg("deepLinkDoc.output", deps.build.deepLink.getDocOutput(rootDir))
}