-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
195 lines (166 loc) · 6.38 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
plugins {
alias(libs.plugins.convention.application)
alias(libs.plugins.convention.application.buildtype)
alias(libs.plugins.convention.application.compose)
alias(libs.plugins.convention.application.jacoco)
alias(libs.plugins.convention.application.lint)
alias(libs.plugins.convention.application.test)
alias(libs.plugins.convention.hilt)
alias(libs.plugins.ksp)
}
// TODO Move to build-logic
def isGoogleServicesExists = isGoogleServicesExists()
def isGoogleServicesExists() {
return file("google-services.json").exists() ||
file("src/dev/google-services.json").exists()
}
if (isGoogleServicesExists) {
plugins.apply(libs.plugins.gms.get().pluginId)
plugins.apply(libs.plugins.firebase.appdistribution.get().pluginId)
plugins.apply(libs.plugins.firebase.crashlytics.get().pluginId)
}
def getProperties(String properties) {
def keystorePropertiesFile = rootProject.file(properties)
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
return keystoreProperties
}
def isReleaseKeystoreExists = rootProject.file("upload.jks").exists()
android {
defaultConfig {
applicationId "com.yugyd.quiz"
versionCode 45
versionName "1.1.0"
// Replace with your resource
buildConfigField 'String', 'DEV_ID', '\"6210589965533125989\"'
buildConfigField 'String', 'STORE_PACKAGE', "\"com.android.vending\""
buildConfigField 'String', 'AD_PROVIDER', "\"yandex\""
}
signingConfigs {
debug {
def properties = getProperties("debug.properties")
keyAlias properties['keyAlias']
keyPassword properties['keyPassword']
storeFile file(properties['storeFile'])
storePassword properties['storePassword']
}
release {
if (isReleaseKeystoreExists) {
def properties = getProperties("upload.properties")
keyAlias properties['keyAlias']
keyPassword properties['keyPassword']
storeFile file(properties['storeFile'])
storePassword properties['storePassword']
}
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
applicationIdSuffix ".debug"
}
staging {
signingConfig signingConfigs.debug
applicationIdSuffix ".staging"
}
release {
signingConfig isReleaseKeystoreExists ? signingConfigs.release : signingConfigs.debug
}
}
buildFeatures {
buildConfig true
viewBinding true
}
flavorDimensions "version"
productFlavors {
dev {
dimension "version"
applicationId "com.yugyd.quiz"
buildConfigField 'String', 'PRO_APP_PACKAGE', "\"DEPRECATED\""
// App use predefined database from assets
buildConfigField 'boolean', 'IS_BASED_ON_PLATFORM_APP', "false"
if (isGoogleServicesExists) {
firebaseAppDistribution {
appId = providers.environmentVariable('FIREBASE_APP_ID').getOrNull()
artifactType = "AAB"
releaseNotesFile = "releasenotes.txt"
groups = "qa"
serviceCredentialsFile = "secret/firebase-credentials.json"
}
}
}
}
namespace 'com.yugyd.quiz'
}
dependencies {
// Module
implementation project(':product:shared:data')
implementation project(':product:designsystem:uikit')
implementation project(':product:core:common-ui')
implementation project(':product:core:navigation')
implementation project(':product:core:featuretoggle')
implementation project(':product:core')
implementation project(':product:services:push')
implementation project(':product:shared:domain-api')
implementation project(':product:options:options-bl')
implementation project(':product:update:update-bl')
implementation project(':product:pro:pro-ui')
implementation project(':product:correct:correct-ui')
implementation project(':product:theme:theme-ui')
implementation project(':product:section:section-ui')
implementation project(':product:progress:progress-ui')
implementation project(':product:game:game-ui')
implementation project(':product:profile:profile-ui')
implementation project(':product:main:main-ui')
implementation project(':product:main:new-version-onboarding-ui')
implementation project(':product:update:update-ui')
implementation project(':product:errors:errors-ui')
implementation project(':product:end:end-ui')
implementation project(':product:profile:transition-ui')
implementation project(':product:content:content-bl')
implementation project(':product:content:content-ui')
implementation project(':product:core:coroutines-utils')
implementation project(':product:services:ad-impl')
implementation project(':product:core:ad')
// Kotlin
implementation libs.kotlinx.coroutines.android
// UI - Compose
implementation libs.compose.material3
implementation libs.compose.activity
implementation libs.compose.viewmodel
implementation libs.compose.lifecycle
// Accompanist
implementation libs.accompanist.systemuicontroller
implementation libs.accompanist.permissions
// Navigation
implementation libs.compose.navigation
// UI - Android X
implementation libs.core.ktx
implementation libs.appcompat
implementation libs.splashscreen
// UI - Material
implementation libs.material
// UI - Lifecycle
implementation libs.lifecycle.viewmodel.ktx
implementation libs.lifecycle.runtime.ktx
implementation libs.lifecycle.process
// Room
implementation libs.room.runtime
implementation libs.room.ktx
ksp libs.room.compiler
// Firebase: Analytics, AppIndexing, Crashlytics, Cloud Messaging
implementation platform(libs.firebase.bom)
implementation libs.firebase.analytics
implementation libs.firebase.crashlytics
implementation libs.firebase.messages
// Play Services: Ads, Auth, Games
implementation libs.play.ads
// Ad
implementation libs.yandex.ads
// Work Manager
implementation libs.work.manager.ktx
// Serialization
implementation libs.kotlinx.serialization
// Logging
implementation libs.timber
}